[Bioperl-l] Bio::Range and Bio::Range
Fri, 2 Feb 2001 09:00:09 -0500
----- Original Message -----
From: "Heikki Lehvaslaiho" <firstname.lastname@example.org>
To: "bioperl-l" <email@example.com>
Sent: Friday, February 02, 2001 6:29 AM
Subject: [Bioperl-l] Bio::Range and Bio::Range
> 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'?
This is correct, we will need to add protection to length as well then since
it assumes (incorrectly of course) start/end will always return a valid
> 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.)
I think this sounds fine, we should be sure and add some more tests to test
all the scenarios now.
> Shout if you object or these plans threaten to break something.
> ______ _/ _/_____________________________________________________
> _/ _/ http://www.ebi.ac.uk/mutations/
> _/ _/ _/ Heikki Lehvaslaiho firstname.lastname@example.org
> _/_/_/_/_/ 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
> ___ _/_/_/_/_/________________________________________________________
> Bioperl-l mailing list