diff --git a/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm index 0d30a7fa907b99ecf5fc88c1bff69bae1a9cff27..dc358483842e0d2a6fc4bfef0aee0dd9f28bdcd0 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm @@ -146,7 +146,7 @@ sub fetch_by_Slice_start_end_strand { $start = 1 if(!defined($start)); - if ( ( $start > $end || $start < 0 || $end < 0 || $slice->start> $slice->end ) && $slice->is_circular ) { + if ( ( !defined($end) || $start > $end || $start < 0 || $end < 0 || $slice->start> $slice->end ) && $slice->is_circular ) { if ($start > $end ) { return $self->_fetch_by_Slice_start_end_strand_circular( $slice, $start, $end, $strand ); } @@ -158,6 +158,9 @@ sub fetch_by_Slice_start_end_strand { $end += $slice->seq_region_length; } + if ( !defined($end) ) { + } + if($slice->start> $slice->end) { return $self->_fetch_by_Slice_start_end_strand_circular( $slice, $slice->start, $slice->end, $strand ); }