[BioC] Annotated a snp list to find where these snp are located.

Valerie Obenchain vobencha at fhcrc.org
Thu Apr 11 00:41:15 CEST 2013


Hello,

The seqlevels (chromosome names) in the txdb and SNPlocs packages don't 
match.

 > rsID <- c("rs1929842", "rs10448261", "rs16942913", "rs9530156")
 > SNPs.gr  <- rsidsToGRanges(rsID)
 > seqlevels(SNPs.gr)
  [1] "ch1"  "ch2"  "ch3"  "ch4"  "ch5"  "ch6"  "ch7"  "ch8"  "ch9"
...

 >   library(TxDb.Hsapiens.UCSC.hg19.knownGene)
 >   txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
 > seqlevels(txdb)
  [1] "chr1"                  "chr2"                 "chr3"
...

You can rename seqlevels in your GRanges using renameSeqlevels(), 
paste(), or seqlevels()<-. See any of ?locateVariants, ?renameSeqlevels, 
?seqlevels for examples and details.

Valerie


On 04/10/2013 03:16 PM, Fabrice Tourre wrote:
> Dear list,
> I want to annotate a snp list to find where these snp are located. I
> used fellow code. But there is a error. Or do you have other solution
> for this purpose?
>
> rsID <- c("rs1929842", "rs10448261", "rs16942913", "rs9530156",
> "rs9543238", "rs3757718", "rs17564689","rs10167958", "rs13444824",
> "rs10777752", "rs10072700", "rs10842099","rs11024171", "rs797516",
> "rs2046545", "rs12996997", "rs6135128","rs2143072", "rs12585354"
> ,"rs797515",  "rs17073211", "rs10496454","rs17197639", "rs4704128",
> "rs2143071", "rs3748997", "rs2292100")
> library(Homo.sapiens)
> library(VariantAnnotation)
> library("SNPlocs.Hsapiens.dbSNP.20120608")
> SNPs.gr  <- rsidsToGRanges(rsID)
> vars <- locateVariants(SNPs.gr, TxDb.Hsapiens.UCSC.hg19.knownGene,
>                                         AllVariants())
>
> Error in .mk_isActiveSeqReplacementValue(x, value) :
>    the names of the supplied 'isActiveSeq' must match the names of the
> current 'isActiveSeq'
>
> unlist(mget(vars$GENEID, org.Hs.egSYMBOL))
>
>
> Thank you.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list