From 0b480921aeb83bcaea237880d10f0e4ed59f4c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?= <ak4@sanger.ac.uk> Date: Fri, 27 Aug 2010 16:00:31 +0000 Subject: [PATCH] In check_and_register(): Modify commented out sanity check so that it's throw() has the correct message (but leave it commented out since it would stop circular genomes working). In overlap_size(): Correct documentation. All from Michael S. --- modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm b/modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm index e131c836d3..b53eb490fc 100644 --- a/modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm +++ b/modules/Bio/EnsEMBL/Mapper/RangeRegistry.pm @@ -154,14 +154,17 @@ sub check_and_register { throw("ID, start, end arguments are required"); } + # The following was commented out due to Ensembl Genomes requirements + # for bacterial genomes. + # ## if ( $start > $end ) { - ## throw("start argument [$start] must be less than end argument [$end]"); + ## throw( "start argument [$start] must be less than " + ## . "(or equal to) end argument [$end]" ); ## } - + ## ## if ( $rstart > $rend ) { - ## throw( - ## "rend [$rstart] argument must be less than rend [$rend] argument" - ## ); + ## throw( "rstart argument [$rstart] must be less than " + ## . "(or equal to) rend argument [$rend] argument" ); ## } if ( $rstart > $start ) { @@ -284,7 +287,7 @@ sub check_and_register { Arg [1] : string $id Arg [2] : int $start - Arg [1] : int $end + Arg [3] : int $end Example : my $overlap_size = $rr->( "chr1", 1, 100_000_000 ) Description: finds out how many bases of the given range are registered Returntype : int -- GitLab