Skip to content

Commit

Permalink
make _coord_adjust work with negative positions
Browse files Browse the repository at this point in the history
changed the regex that manipualtes @coords in _coord_adjust so that
an optional "-" is now accepted, which makes it possible to feed the
function negative postions.
  • Loading branch information
fs5sanger committed Jan 18, 2012
1 parent f7661d8 commit b17657e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Bio/SeqUtils.pm
Expand Up @@ -1267,7 +1267,7 @@ sub _coord_adjust {
my @coords=($_->start, $_->end);
my $strand=$_->strand;
my $type=$_->location_type;
map s/(\d+)/if ($add+$1<1) {'<1'} elsif (defined $length and $add+$1>$length) {">$length"} else {$add+$1}/ge, @coords;
map s/(-?\d+)/if ($add+$1<1) {'<1'} elsif (defined $length and $add+$1>$length) {">$length"} else {$add+$1}/ge, @coords;

push @loc, $self->_location_objects_from_coordinate_list(
[\@coords], $strand, $type
Expand Down

0 comments on commit b17657e

Please sign in to comment.