[Bioperl-l] Locations

Heikki Lehvaslaiho heikki@ebi.ac.uk
Tue, 13 Feb 2001 11:01:54 +0000


I fixed LiveSeq code you broke by adding FuzzyLocations. 8-)

This forced me to learn to use new location classes. Here are some
thoughts about the methods and their functionality. 

It seems to me that the design principle has been that fuzzy locations
are the default ones and Bio::Location::Simple implements an
This is evident from the fact that if a location is simple, it is
possible to call ->min_start and -> max_start and they  return the
value of ->start (same for ->nnn_end).  This does not work the other
way round: If a location is fuzzy (e.g. <52..80 ),  ->start returns
undef and one has to call ->min_start. The same goes for ->end.  In
practice, this means that one can never use start and end methods
without checking what they return even if one checks first if  

   my ($start, $end);
   $featlocation->start ? $start = $featlocation->start
:                                          $start =
   $featlocation->end ?   $end = $featlocation->end :
                          $end = $featlocation->max_end;

Are you sure this is a good approach? Are fuzzy locations really that
important? My feeling is that most people want to forget fuzzyness as
long as they can.

Would it be possible to backtrack a bit and give precedence to older
behaviour of feature locations where you can call always call ->start
and ->end and they automatically return integer values that are
present in the parsed EMBL entry and _only_ if one is interested in
dealing with fyzzyness one has to start using ->min_* and ->max_*

I think ease of use is important and a lot people will not be happy
with the current behaviour when they start coding with it.

Just my feeling...


______ _/      _/_____________________________________________________
      _/      _/                      http://www.ebi.ac.uk/mutations/
     _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
    _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
   _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
  _/  _/  _/  Cambs. CB10 1SD, United Kingdom
     _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________