Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl
Commits
2efd152a
Commit
2efd152a
authored
Mar 15, 2012
by
Andy Yates
Browse files
Only do cleanup if we had a number
parent
80d5e26c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+11
-10
No files found.
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
View file @
2efd152a
...
...
@@ -471,20 +471,21 @@ sub fetch_by_toplevel_location {
my
$number_seps_regex
=
qr/\s+|,|_/
;
if
(
my
(
$seq_region_name
,
$start
,
$end
)
=
$location
=~
$regex
)
{
if
(
defined
$start
&&
$start
<
1
)
{
warning
"
Start was less than 1 (
${start}
) which is not allowed. Resetting to 1
"
if
!
$no_warnings
;
$start
=
1
;
if
(
defined
$start
)
{
if
(
$start
<
1
)
{
warning
"
Start was less than 1 (
${start}
) which is not allowed. Resetting to 1
"
if
!
$no_warnings
;
$start
=
1
;
}
$start
=~
s/$number_seps_regex//g
;
#cleanup any nomenclature like 1_000 or 1 000 or 1,000
}
if
(
defined
$end
&&
$end
<
1
)
{
throw
"
Cannot request negative or 0 end indexes through this interface. Given
$end
but expected something greater than 0
";
if
(
defined
$end
)
{
if
(
$end
<
1
)
{
throw
"
Cannot request negative or 0 end indexes through this interface. Given
$end
but expected something greater than 0
";
}
$end
=~
s/$number_seps_regex//g
;
#cleanup any nomenclature like 1_000 or 1 000 or 1,000
}
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment