[Bioperl-l] Bio::Location::{Simple,Fuzzy} and "IN-BETWEEN"

George Hartzell hartzell at alerce.com
Tue Mar 10 20:31:49 EDT 2009

I just tripped over the $self->throw() in B::L::Fuzzy->start where it
won't let me use a Fuzzy if the start and end are adjacent.

I think that this is going to be one of those More Than One Way To Do
It kind of things, but I don't understand the restriction.

I have some data for insertions that get a location between two
adjacent bases, e.g. s^e, an IN-BETWEEN that starts at s and ends at

Then I map that location via an alignment to a second sequence and it
maps into a gap on the second sequence.  In this case the sequences
are no longer adjacent, e.g. the left edge of the gap is l and the
right edge is r.  At this point I know less than I did, and am trying
to represent it as >l^<r, e.g. an IN-BETWEEN that starts somewhere
after l and ends somewhere before r.  This seems to work.

If I have something on the second sequence in the gap region and am
mapping it back to the first then it's going to end up with adjacent
start and end.

It seems like it's be useful for me to just use Bio::Location::Fuzzy's
everywhere and use exact info when I have it.  Unfortunately several
methods in Bio::Location::Fuzzy check for the first case and throw an

I'm hoping that a history lesson or other insight might help me
understand why those checks are there.  There don't seem to be any
other checks that prevent one from specifying something exact in a
Fuzzy and there doesn't seem to be any restriction about specifying an
IN-BETWEEN Fuzzy....


More information about the Bioperl-l mailing list