Question: Chromosome position to nucleotide - Biostrings?
3
gravatar for Brian Smith
4.8 years ago by
Brian Smith120
United States
Brian Smith120 wrote:

Hi,
 

How can I find the nucleotides, given the chromosome and the genomic positions? I was trying to use the Biostrings package, but couldn't find the function that would give me the nucleotides. For example, how do I find the nucleotides at the following positions on Chr15 (homo sapiens):

67494484,67494485,67494486,67494489,67494490,67494504

Is there any other package that would be more convenient?

thanks!

biostrings • 1.2k views
ADD COMMENTlink modified 4.8 years ago by Julian Gehring1.3k • written 4.8 years ago by Brian Smith120
Answer: Chromosome position to nucleotide - Biostrings?
2
gravatar for Julian Gehring
4.8 years ago by
Julian Gehring1.3k
Julian Gehring1.3k wrote:

Use the getSeq method of the Biostrings package.  It works with multiple representations of reference genomes, and accepts GRanges as inputs.

library(BSgenome.Hsapiens.UCSC.hg19) ## our reference sequence
library(GenomicRanges) ## GRanges lives here

gr = GRanges("chr15", IRanges(67494484, width = 1))

getSeq(BSgenome.Hsapiens.UCSC.hg19, gr) ## yields the sequence 'A' at this position
ADD COMMENTlink modified 4.8 years ago • written 4.8 years ago by Julian Gehring1.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 359 users visited in the last hour