[Bioc-sig-seq] Extracting DNA sequences from BSgenome.Mmusculus.UCSC.mm9_1.3.11
Ivan Gregoretti
ivangreg at gmail.com
Thu May 28 18:41:51 CEST 2009
Hello everyone,
It is very easy to display one sequence of DNA from the mouse genome.
For example
> library(BSgenome.Mmusculus.UCSC.mm9)
> DNAString(Mmusculus$chr1)[100000000:100000050]
51-letter "DNAString" instance
seq: GGACTGCTGTTGCTGATTCATGTTTGATGTTTTAGACTGCTAATATCCTGA
My question:
Now lets say I have a BED-like list of genomic spaces like this
> head(A[ , c("chr", "start", "end")])
chr start end
1 chr1 3644952 3649720
2 chr1 4599146 4601342
3 chr1 5015865 5018830
4 chr1 5072928 5076881
5 chr1 5504220 5507065
6 chr1 5513886 5516391
How do I display many sequences from different chromosomes?
Another question:
I wish to add these sequences to my BED-like data.frame as a new
field. How do I convert them to strings?
In my defense:
The first question is not covered in the documentation of
BSgenome.Mmusculus.UCSC.mm9.
Thank you,
Ivan
Ivan Gregoretti, PhD
National Institute of Diabetes and Digestive and Kidney Diseases
National Institutes of Health
5 Memorial Dr, Building 5, Room 205.
Bethesda, MD 20892. USA.
Phone: 1-301-496-1592
Fax: 1-301-496-9878
More information about the Bioc-sig-sequencing
mailing list