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
a5f81269
Commit
a5f81269
authored
Feb 27, 2012
by
Andy Yates
Browse files
We were way too generous with the _ cleanup. Applied to numbers only
parent
01afc9d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+6
-1
No files found.
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
View file @
a5f81269
...
...
@@ -468,7 +468,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
)
{
...
...
@@ -480,6 +480,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
;
...
...
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