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
dc480578
Commit
dc480578
authored
Aug 16, 2012
by
Andy Yates
Browse files
Allow users to ignore seemingly wrong coordinates
parent
9755392d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
+5
-3
No files found.
modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm
View file @
dc480578
...
...
@@ -510,6 +510,8 @@ sub fetch_by_toplevel_location {
separated by C<..>, C<:> or C<->.
Arg[2] : boolean $no_warnings
Suppress warnings from this method
Arg[3] : boolean $no_errors
Supress errors being thrown from this method
Example : my ($name, $start, $end, $strand) = $sa->parse_location_to_values('X:1..100:1);
Description : Takes in an Ensembl location String and returns the parsed
values
...
...
@@ -519,7 +521,7 @@ sub fetch_by_toplevel_location {
sub
parse_location_to_values
{
my
(
$self
,
$location
,
$no_warnings
)
=
@_
;
my
(
$self
,
$location
,
$no_warnings
,
$no_errors
)
=
@_
;
throw
'
You must specify a location
'
if
!
$location
;
...
...
@@ -549,12 +551,12 @@ sub parse_location_to_values {
if
(
defined
$end
)
{
$end
=~
s/$number_seps_regex//g
;
if
(
$end
<
1
)
{
throw
"
Cannot request negative or 0 end indexes through this interface. Given
$end
but expected something greater than 0
";
throw
"
Cannot request negative or 0 end indexes through this interface. Given
$end
but expected something greater than 0
"
unless
$no_errors
;
}
}
if
(
defined
$start
&&
defined
$end
&&
$start
>
$end
)
{
throw
"
Cannot request a slice whose start is greater than its end. Start:
$start
. End:
$end
";
throw
"
Cannot request a slice whose start is greater than its end. Start:
$start
. End:
$end
"
unless
$no_errors
;
}
}
...
...
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