R packages for position anotation?
2
0
Entering edit mode
Jinyan Huang ▴ 190
@jinyan-huang-4157
Last seen 10.2 years ago
Dear all, Is there a Bioconductor packages can do like something like this? Giving a position, it can tell where this position locate in the gene (3' UTR, 5' UTR Exon, intron and so on). Thanks.
• 1.3k views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States
Hi, On Mon, Dec 13, 2010 at 10:59 AM, Jinyan Huang <jhuang.ceph at="" gmail.com=""> wrote: > Dear all, > Is there a Bioconductor packages can do like something like this? > Giving a position, it can tell where this position locate in the gene > (3' UTR, 5' UTR Exon, intron and so on). With a bit of coding, you can use the GenomicFeatures package to get this info. Build your TranscriptDb, then look at the help pages in ?transcriptsBy If you store your query positions in a GRanges object, you can use the results returned from the functions above with findOverlaps/countOverlaps to find your hits. -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
0
Entering edit mode
Hi Steve, Thanks for your suggestion. What I understand your suggestion is I shoud use exonsBy, intronsByTranscript, fiveUTRsByTranscrip, threeUTRsByTranscript separately. For example, if I want to check whether a position is in exon or not. I do as fellow. But this is just suitable for one position each time. Is it possible to check many positions at the same time? Thanks. >txdb <- loadFeatures(samplefile) >annotGr <- exonsBy(txdb, "tx") >gr <- GRanges( seqnames = c("chr11"), ranges = IRanges(start = c(74994500), end = c(74994500)), strand = c("-")) >OL <- findOverlaps(query = annotGr, subject = gr) >tdata <- annotGr[unique(queryHits(OL)),] >tdata GRangesList of length 2 $44081 GRanges with 16 ranges and 3 elementMetadata values On Mon, Dec 13, 2010 at 5:23 PM, Steve Lianoglou <mailinglist.honeypot at="" gmail.com=""> wrote: > Hi, > > On Mon, Dec 13, 2010 at 10:59 AM, Jinyan Huang <jhuang.ceph at="" gmail.com=""> wrote: >> Dear all, >> Is there a Bioconductor packages can do like something like this? >> Giving a position, it can tell where this position locate in the gene >> (3' UTR, 5' UTR Exon, intron and so on). > > With a bit of coding, you can use the GenomicFeatures package to get this info. > > Build your TranscriptDb, then look at the help pages in ?transcriptsBy > > If you store your query positions in a GRanges object, you can use the > results returned from the functions above with > findOverlaps/countOverlaps to find your hits. > > -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 REPLY
0
Entering edit mode
Hi, On Tue, Dec 14, 2010 at 1:37 PM, Jinyan Huang <jhuang.ceph at="" gmail.com=""> wrote: > Hi Steve, > > Thanks for your suggestion. > > What I understand your suggestion is I shoud use exonsBy, > intronsByTranscript, fiveUTRsByTranscrip, threeUTRsByTranscript > separately. For example, if I want to check whether a position is in > exon or not. I do as fellow. But this is just suitable for one > position each time. Is it possible to check many positions at the same > time? Thanks. I'm not sure which direction of "many" you are looking for. If you want to test if multiple positions are in any exon, you can make your `gr` GRanges object bigger (include those positions), and tease apart your findOverlaps results by which subjectHits are overlapping with which queryHits ... Is that what you're asking? -- 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 REPLY
0
Entering edit mode
@steve-lianoglou-2771
Last seen 21 months ago
United States
Hi Jinyang, Don't forget to hit "reply all" when replying to bioconductor emails so that all correspondence is on list and, therefore, helpful to other people who might land in the same boat as you. On Tue, Dec 14, 2010 at 4:45 PM, Jinyan Huang <jhuang.ceph at="" gmail.com=""> wrote: > Hi Steve, > > Thanks. Now I know how to use subjectHits to check them. > > I want to check whether are they located in 5'UTR or 3'UTR or exon or > intron or non-gene region. What I think I shoud check these positions > using exonsBy, intronsByTranscript, fiveUTRsByTranscrip, > threeUTRsByTranscript separately. If a position is not in the result > of above, this position should be a non-gene region. Is it right? Well, assuming your annotations are "perfect," what else could it be? -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: 613 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