pintersect GRanges with empty results

Christian Ruckert <cruckert-xhPu7QH+N+StU9/[email protected]> Fri, 22 Aug 2014 12:12:40 +0200
Newsgroups gmane.science.biology.informatics.conductor
Message-ID <[email protected]>
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
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor