[Bioperl-l] Bio::Range and Bio::Range

Heikki Lehvaslaiho heikki@ebi.ac.uk
Fri, 02 Feb 2001 11:29:43 +0000

I'd like to update Bio::RangeI and Bio::Range before  branching to
OK Hilmar?

I already talked to Matthew Pocock who wrote them in the first place
and I'll take the responsibility on caring for them from here on.

Bio::Range will be useful for the up-coming Marker classes.

What I am planning to do:

1. Bio::Range throws an error if both start and end attributes are not
set in the constructor. Move to more relaxed bioperl style that allows
the creation of an object and then setting the attributes one by one.

2. Check that values for start and end are integers (positive or
negative). Negative values sets this class apart from Bio::LocationI
compliant classes that store locations on real sequences, i.e. >0

	Jason, is this correct? Bio::Location::Simple does not 
	enforce positive integers and returns '0' when 
	undefined. Shouldn't the return value be 'undef'?

3. Add checks into range operator methods ->overlaps, ->contains and
->equals in Bio::RangeI.
   - $self->start
   - $self->end
   - $other->start
   - $other->end
   - $other->isa('Bio::RangeI')

 	Bio::Location objects need these in place, too.

4. Rename union and intersection to _union and _intersection in
Bio::RangeI. They return an array of three values. Instantiable
classes like Bio::Range should recreate union and intersection and
return a new object created from the array values. (->overlap_extent
is kept as it is.)

Shout if you object or these plans threaten to break something.


______ _/      _/_____________________________________________________
      _/      _/                      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
___ _/_/_/_/_/________________________________________________________