[Bioperl-l] Overlapping sets of coordinates?

Bob Freeman bobfreemanma at speakeasy.net
Wed Jun 5 16:02:10 UTC 2013


Thanks, Roy. I'll dig into the Bio::RangeI methods to see what's there, and how I should create these objects from tab-delimited coordinate data that I have.

I should have mentioned that this is NOT NGen data, but good old mapping data of transcripts against genome using PASA, so I'm not too sure if bedtools or htseq-count would work.

Most grateful!
Bob

On Jun 5, 2013, at 11:52 AM, Roy Chaudhuri <roy.chaudhuri at gmail.com> wrote:

> Hi Bob,
> 
> There are methods for this in Bio::RangeI (overlaps, contains), which are inherited by SeqFeatures, so you could do something like:
> 
> #$transcript_feat and $gene_feat are Bio::SeqFeatureI objects
> 
> if ($gene_feat->contains($transcript_feat)) { $overlap=1 }
> elsif ($gene_feat->overlaps($transcript_feat)) {$partial_overlap=1}
> else {$no_overlap=1}
> 
> However, depending on the form of your data, you may be better off using off-the-shelf software such as bedtools or htseq-count.
> 
> Cheers,
> Roy.
> 
> On 5 June 2013 15:53, Bob Freeman <bobfreemanma at speakeasy.net> wrote:
> Dear knowledgeable & experienced community,
> 
> I've been racking my brains on this one and I'm sure it's been solved before, but can't seem to find where/how to do this without major amounts of custom coding: I have a set of transcripts mapped against a genome. I'd like to know which transcripts overlap a given set of coordinates (e.g. coordinates for a certain gene model). Is there an easy way to ascertain overlap, non-overlap, partial overlap, etc. in BioPerl??
> 
> Thanks,
> Bob
> 
> -----------------------------------------------------
> Bob Freeman, Ph.D.
> Acorn Worm Informatics, Kirschner lab
> Dept of Systems Biology, Alpert 524
> Harvard Medical School
> 200 Longwood Avenue
> Boston, MA  02115
> 617/432.2294, vox
> 
> "Sorry I'm late. Oh, God, that sounded insincere. I'm late."
>         -- Karen Walker, from Will and Grace
> 
> 
> 
> 
> 
> -----------------------------------------------------
> Bob Freeman, Ph.D.
> 51 Downer Avenue, #2
> Dorchester, MA  02125
> 617/699.7057, vox
> 
> "Well, I'm thankful that I found a pharmacologist who is as dumb as a box of hair."
>         -- Karen Walker, from Will and Grace
> 
> 
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------
Bob Freeman, Ph.D.
51 Downer Avenue, #2
Dorchester, MA  02125
617/699.7057, vox

"Well, I'm thankful that I found a pharmacologist who is as dumb as a box of hair."
	-- Karen Walker, from Will and Grace







More information about the Bioperl-l mailing list