[Bioperl-l] FeaturePair:length

Ewan Birney birney@ebi.ac.uk
Fri, 27 Jul 2001 17:14:09 +0100 (BST)


On Fri, 27 Jul 2001, Jason Stajich wrote:

> I think that fundamentally we are doing something wrong with SimilarityPairs.
> 
> Right now, for a feature pair (SimilarityPair isa FeaturePair) $fp->length
> is calculated from ($fp->end - $fp->start). $fp->start is really an alias
> for $fp->feature1->start so the length of the pair is really only relative
> to feature1 of the feature pair.  This causes problems for similarity
> paris where gaps can be occuring.

I think this is the right semantics for length (remember it has to honor
the seqfeature interface, which views the SimilarityPair from one "side" -
this case being feature1).


I agree we need a hsplength sort of call. What it gives... is another
question (think BLASTX results...)


> 
> I'm adding the method hsplength to the BPlite::HSP object to at least
> handle this for BPlite results, but we may want think about storing length
> on the SimilarityPair object rather than delegating it to feature1 (what
> we do right now).
> 
> Perhaps this can all go into a  more generalized HSP/Search objects which
> has been an idea kicking around for a little while now.  Probably would be
> a full rewrite of what Aaron started in Bio::Search::* but wouldn't mind
> keeping that namespace.  (*project possibility*).
> 
> -jason
> Jason Stajich
> jason@chg.mc.duke.edu
> Center for Human Genetics
> Duke University Medical Center 
> http://www.chg.duke.edu/ 
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------