[Bioperl-l] Bio::RangeI intersection proposal

Sendu Bala bix at sendu.me.uk
Wed Jun 21 08:20:37 UTC 2006


Bio::Map::PositionI (in bioperl-live) needs intersections of a list of 
ranges. It inherits from Bio::RangeI but unlike RangeI's union, 
intersection does not take a list. PositionI currently calls 
intersection repeatedly to handle a list.

If there is no particular reason for this limitation, I propose making 
RangeI intersection handle lists natively. This won't do any harm to 
existing code at the time of the change, but its possible that someone 
has written a module that implements RangeI but overrides intersection 
(without making it accept a list), so that future code written that 
expects a RangeI to handle lists will break when getting a RangeI from 
that module.

So the question is, has anyone overridden intersection in RangeI? Is the 
small risk of possible breakage compensated by the benefit of 
intersections of a list of ranges (which is surely useful in lots of 
situations, not just for PositionI)?

I'm tempted to go ahead with this unless there are objections.



More information about the Bioperl-l mailing list