[Bioperl-l] FeaturePair:length

Jason Stajich jason@chg.mc.duke.edu
Fri, 27 Jul 2001 12:07:17 -0400 (EDT)


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'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/