Commit a36cc624 authored by Andy Yates's avatar Andy Yates
Browse files

Fixing bug due to overzelous _ removal. Caused issues for patch/haplotype...

Fixing bug due to overzelous _ removal. Caused issues for patch/haplotype regions mostly noticable from the region report tool.
parent 2dede3ca
......@@ -462,7 +462,7 @@ sub fetch_by_toplevel_location {
throw 'You must specify a location' if ! $location;
my $regex = qr/^(\w+) :? (\d+)? (?:-|[.]{2})? (\d+)?$/xms;
$location =~ s/\s+|,|_//g; #cleanup any nomenclature like 1_000 or 1 000 or 1,000
my $number_seps_regex = qr/\s+|,|_/;
if(my ($seq_region_name, $start, $end) = $location =~ $regex) {
if(defined $start && $start < 1) {
......@@ -474,6 +474,11 @@ sub fetch_by_toplevel_location {
}
my $coord_system_name = 'toplevel';
#cleanup any nomenclature like 1_000 or 1 000 or 1,000
$start =~ s/$number_seps_regex//g;
$end =~ s/$number_seps_regex//g;
my $slice = $self->fetch_by_region($coord_system_name, $seq_region_name, $start, $end, undef, undef, 0);
return unless $slice;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment