Skip to content
Prev 5887 / 21312 Next

[Bioc-devel] seqnames of SNPlocs.*

Hi Peter,

Yes, as Vince said, the chromosome names are those used by dbSNP. For
whatever reason, dbSNP, which is part of NCBI, felt the need to use
a different naming convention than the rest of NCBI :-/
On 06/17/2014 07:57 PM, Peter Hickey wrote:
The seqlevelsStyle() setter first requires that the seqlevels() setter
works on a SNPlocs object, which itself requires that the seqinfo()
setter works. Unfortunately, it doesn't at the moment:

   > library(SNPlocs.Hsapiens.dbSNP.20120608)

   > snps <- SNPlocs.Hsapiens.dbSNP.20120608

   > seqlevels(snps) <- sub("^ch", "chr", seqlevels(snps))
   Error in (function (classes, fdef, mtable)  :
     unable to find an inherited method for function ?seqinfo<-? for 
signature ?"SNPlocs"?

Something I'm adding on my list.

In the mean time you can do the renaming on the GRanges objects
you extract with 'getSNPlocs(..., as.GRanges=TRUE)' or with
'rsidsToGRanges(...)'. Maybe it's not very convenient to have to do
this each time you extract snps in a GRanges object but OTOH it's
really easy those days now that we have seqlevelsStyle().

Hope this helps.

Cheers,
H.