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-io
Commits
8f136ae9
Commit
8f136ae9
authored
Sep 28, 2018
by
Tiago Grego
Browse files
variable declaration moved to outside of conditional
parent
fea6cf69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
modules/Bio/EnsEMBL/IO/HubParser.pm
modules/Bio/EnsEMBL/IO/HubParser.pm
+3
-3
No files found.
modules/Bio/EnsEMBL/IO/HubParser.pm
View file @
8f136ae9
...
...
@@ -197,11 +197,11 @@ sub get_tracks {
if
(
$key
eq
'
parent
'
||
$key
eq
'
superTrack
'
||
$key
=~
/^subGroup[0-9]/
)
{
my
@values
=
split
/\s+/
,
$value
;
my
$on_off
;
if
(
$key
eq
'
parent
'
||
$key
eq
'
superTrack
')
{
if
(
$key
eq
'
superTrack
'
&&
$values
[
0
]
eq
'
on
')
{
$tracks
{
$id
}{'
superTrack
'}
=
shift
@values
;
my
$on_off
=
shift
@values
if
scalar
@values
;
$on_off
=
shift
@values
if
scalar
@values
;
if
(
$on_off
)
{
$tracks
{
$id
}{'
on_off
'}
=
$on_off
eq
'
show
'
?
'
on
'
:
'
off
';
}
...
...
@@ -209,7 +209,7 @@ sub get_tracks {
else
{
## Hack for incorrect hubs that use 'superTrack' in children instead of 'parent'
$tracks
{
$id
}{'
parent
'}
=
shift
@values
;
my
$on_off
=
shift
@values
if
scalar
@values
;
$on_off
=
shift
@values
if
scalar
@values
;
if
(
$on_off
)
{
$tracks
{
$id
}{'
on_off
'}
=
(
$on_off
eq
'
show
'
||
$on_off
eq
'
on
')
?
'
on
'
:
'
off
';
}
...
...
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