using GenomicFeature
1
0
Entering edit mode
Zhi Zhang ▴ 70
@zhi-zhang-4941
Last seen 10.2 years ago
Hi, All, I wonder if I can generate an Granges in GenomicFeature for 5kb upstream from start codons, and intergenic region of Drosophila genome, then I can find overlap between my SNP position and GenomicFeature. Like txdb <- TxDb.Dmelanogaster.UCSC.dm3.ensGene UTR5 <- fiveUTRsByTranscript(txdb) rngs <- GRanges("chr4", IRanges(c(252054, 252561), width=1)) findOverlaps(rngs, UTR5) but not UTR5, replaced by custom GenomicFeature for 5kb upstream from start codons, and intergenic region of Drosophila genome thanks Zhi Zhang, Ph. D. Sanford-Burnham Medical Research Institute 10901 North Torrey Pines Rd. La Jolla, CA 92037, USA Phone 858-646-3100 ext. 3801 Fax 858-795-5298 [[alternative HTML version deleted]]
SNP SNP • 902 views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States
Hi, On Tue, Dec 6, 2011 at 4:13 PM, Zhi Zhang <zhizhang at="" sanfordburnham.org=""> wrote: > Hi, All, > I wonder if I can generate an Granges in GenomicFeature for 5kb upstream from start codons, and intergenic region of Drosophila genome, then I can find overlap between my SNP position and GenomicFeature. Like > > > > txdb <- TxDb.Dmelanogaster.UCSC.dm3.ensGene > UTR5 <- fiveUTRsByTranscript(txdb) > rngs <- GRanges("chr4", IRanges(c(252054, 252561), width=1)) > findOverlaps(rngs, UTR5) > > but not UTR5, replaced by custom ?GenomicFeature for 5kb upstream from start codons, and intergenic region of Drosophila genome Let's assume you don't need this in a GRangesList object -- or if you do, I'll let you figure out how to reconstruct the GRangesList from the resulting GRanges below :-) ## use use.names=TRUE here: R> utr5 <- fiveUTRsByTranscript(txdb, use.names=TRUE) R> up5kb <- resize(unlist(utr5), width=5000, fix='end') You'll need to do a bit more bookkeeping if you need to make sure that the 5kb upstream doesn't run into a gene that's less than 5kb away. HTH, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD COMMENT

Login before adding your answer.

Traffic: 882 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6