Re: pintersect GRanges with empty results

Michael Lawrence <michafla-RuTDbSqP/[email protected]> Fri, 22 Aug 2014 04:06:36 -0700
Newsgroups gmane.science.biology.informatics.conductor
Message-ID <CAOQ5Nye5eJ5rpU+9a95q6EJYVOYOfGtLGOM_L_h8BUuKkyg7JQ@mail.gmail.com>
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-xhPu7QH+N+StU9/[email protected]
> 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
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.
> science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

_______________________________________________
Bioconductor mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/bioconductor
Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor