Skip to content

Commit

Permalink
allow looping ranges for circular genomes. See Re: [Gmod-ajax] flatfi…
Browse files Browse the repository at this point in the history
…le-to-json.pl error with GFF
  • Loading branch information
cmungall committed Jul 27, 2010
1 parent 5891306 commit d752a4c
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Bio/SeqFeature/Tools/Unflattener.pm
Expand Up @@ -1123,6 +1123,9 @@ sub unflatten_seq{

# seq we want to unflatten
$seq = $seq || $self->seq;
if (!$self->seq) {
$self->seq($seq);
}


# prevent bad argument combinations
Expand Down Expand Up @@ -2837,10 +2840,18 @@ sub _check_order_is_consistent {
my $rangeP = $ranges[$i-1];
my $range = $ranges[$i];
if ($rangeP->start > $range->end) {
# failed - but still get one more chance..
$pass = 0;
$self->problem(2,"Ranges not in correct order. Strange ensembl genbank entry? Range: $rangestr");
last;
if ($self->seq->is_circular) {
# see for example NC_006578.gbk
# we make exceptions for circular genomes here.
# see Re: [Gmod-ajax] flatfile-to-json.pl error with GFF
# 2010-07-26
}
else {
# failed - but still get one more chance..
$pass = 0;
$self->problem(2,"Ranges not in correct order. Strange ensembl genbank entry? Range: $rangestr");
last;
}
}
}

Expand Down

0 comments on commit d752a4c

Please sign in to comment.