#### The support.bioconductor.org editor has been updated to markdown! Please see more info at: Tutorial: Updated Support Site Editor

Question: Chromosome position to nucleotide - Biostrings?
3
4.4 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.1k views
modified 4.4 years ago by Julian Gehring1.3k • written 4.4 years ago by Brian Smith120
Answer: Chromosome position to nucleotide - Biostrings?
2
4.4 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.4 years ago • written 4.4 years ago by Julian Gehring1.3k