Skip to content
Prev 5903 / 21312 Next

[Bioc-devel] seqnames of SNPlocs.*

Hi Peter,

Just added support for "dbSNP" seqlevels style for Human (in
GenomeInfoDb 1.1.9, will become available tomorrow):

   library(SNPlocs.Hsapiens.dbSNP.20120608)
   myrsids <- c("rs2639606", "rs75264089", "rs73396229", "rs55871206",
                "rs10932221", "rs56219727", "rs73709730", "rs55838886",
                "rs3734153", "rs79381275", "rs1516535")
   gr <- rsidsToGRanges(myrsids)

Then:

   > seqnames(gr)
   factor-Rle of length 11 with 11 runs
     Lengths:    1    1    1    1    1    1    1    1    1    1    1
     Values :  ch9  ch6 ch11 ch13  ch2  ch4  ch7  ch2  ch5 ch11  ch4
   Levels(25): ch1 ch2 ch3 ch4 ch5 ch6 ch7 ... ch19 ch20 ch21 ch22 chX 
chY chMT

   > seqlevelsStyle(gr)
   [1] "dbSNP"

   > seqlevelsStyle(gr) <- "NCBI"

   > seqnames(gr)
   factor-Rle of length 11 with 11 runs
     Lengths:  1  1  1  1  1  1  1  1  1  1  1
     Values :  9  6 11 13  2  4  7  2  5 11  4
   Levels(25): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 
X Y MT

   > seqlevelsStyle(gr) <- "UCSC"

   > seqnames(gr)
   factor-Rle of length 11 with 11 runs
     Lengths:     1     1     1     1     1     1     1     1     1 
1     1
     Values :  chr9  chr6 chr11 chr13  chr2  chr4  chr7  chr2  chr5 
chr11  chr4
   Levels(25): chr1 chr2 chr3 chr4 chr5 chr6 ... chr20 chr21 chr22 chrX 
chrY chrM

Make the seqlevelsStyle() setter work directly on the
SNPlocs.Hsapiens.dbSNP.20120608 object itself will take more time
though. It'll actually be part of some more important SNPlocs
refactoring plans I've had on my list for a while now. Won't happen
before a couple of months.

Cheers,
H.
On 06/17/2014 10:37 PM, Herv? Pag?s wrote: