diff --git a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm index 3056aaa0eaa628917258e89c38d1733ea0963e04..fdc9fa2fef1c1b73ba694952987f947204ad0f2b 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm @@ -103,6 +103,7 @@ use Bio::EnsEMBL::LRGSlice; use Bio::EnsEMBL::Utils::Exception qw(throw deprecate warning stack_trace_dump); use Bio::EnsEMBL::ProjectionSegment; use Scalar::Util qw/looks_like_number/; +use Bio::EnsEMBL::Utils::Scalar qw/assert_integer/; @ISA = ('Bio::EnsEMBL::DBSQL::BaseAdaptor'); @@ -196,6 +197,9 @@ sub fetch_by_region { $strand, $version, $no_fuzz ) = @_; + assert_integer($start, 'start') if $start; + assert_integer($end, 'end') if $end; + if ( !defined($start) ) { $start = 1 } if ( !defined($strand) ) { $strand = 1 }