pintersect GRanges with empty results
1
0
Entering edit mode
@christian-ruckert-3294
Last seen 5.4 years ago
Germany
Hi all, I am searching a solution for the following problem: I have two GRanges objects, one with exon coordinates e.g. chr1 400 600 gene1 exon1 chr1 800 900 gene1 exon2 chr7 100 200 gene2 exon1 chr7 300 500 gene2 exon2 and one with the corresponding coding sequences coordinates. chr1 500 850 chr1 500 850 chr7 300 500 chr7 300 500 Coding regions were repeated accordingly, so that both GRanges have the same length. I want to restrict the exon GRanges object to the coding regions. pintersect looks promising but has problems if the two ranges don't overlap at all, which can happen if an exon falls completely within one of the UTRs (line 3 above). I tried to filter out these exons beforehand, but there is no parallel version of countOverlaps and I don't want to overlap the entries of the first GRanges with any of the second as there maybe different genes/transcripts at the same location. There must be a better solution than a for loop ;-) Regards, Christian
• 1.2k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-6705
Last seen 7.6 years ago
United States
Why not just use pintersect(exons, cds, resolve.empty="start.x")? Then drop empty ranges from the result. Michael On Fri, Aug 22, 2014 at 3:12 AM, Christian Ruckert <cruckert at="" uni-="" muenster.de=""> wrote: > Hi all, > > I am searching a solution for the following problem: > > I have two GRanges objects, one with exon coordinates e.g. > > chr1 400 600 gene1 exon1 > chr1 800 900 gene1 exon2 > chr7 100 200 gene2 exon1 > chr7 300 500 gene2 exon2 > > and one with the corresponding coding sequences coordinates. > > chr1 500 850 > chr1 500 850 > chr7 300 500 > chr7 300 500 > > Coding regions were repeated accordingly, so that both GRanges have the > same length. > > I want to restrict the exon GRanges object to the coding regions. > pintersect looks promising but has problems if the two ranges don't overlap > at all, which can happen if an exon falls completely within one of the UTRs > (line 3 above). I tried to filter out these exons beforehand, but there is > no parallel version of countOverlaps and I don't want to overlap the > entries of the first GRanges with any of the second as there maybe > different genes/transcripts at the same location. > > There must be a better solution than a for loop ;-) > > Regards, > Christian > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane. > science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 832 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