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-hive
Commits
6f2c2062
Commit
6f2c2062
authored
Jan 21, 2016
by
Leo Gordon
Browse files
limited the displayed length of conditions by DisplayConditionLength JSON parameter
parent
3dc78d6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
hive_config.json
hive_config.json
+1
-0
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
+12
-7
No files found.
hive_config.json
View file @
6f2c2062
...
...
@@ -109,6 +109,7 @@
"DisplayStats"
:
"barchart"
,
"DisplayJobs"
:
0
,
"DisplayData"
:
0
,
"DisplayConditionLength"
:
64
,
"DisplayInputIDTemplate"
:
1
,
"DisplayDetails"
:
1
,
...
...
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
View file @
6f2c2062
...
...
@@ -541,6 +541,7 @@ sub _twopart_arrow {
my
$switch_colour
=
$self
->
config_get
('
Node
',
'
Switch
',
'
Colour
');
my
$switch_font
=
$self
->
config_get
('
Node
',
'
Switch
',
'
Font
');
my
$switch_fontcolour
=
$self
->
config_get
('
Node
',
'
Switch
',
'
FontColour
');
my
$display_cond_length
=
$self
->
config_get
('
DisplayConditionLength
');
my
$from_analysis
=
$df_rule
->
from_analysis
;
my
$from_node_name
=
$self
->
_analysis_node_name
(
$from_analysis
);
...
...
@@ -554,9 +555,16 @@ sub _twopart_arrow {
foreach
my
$i
(
0
..
scalar
(
@$df_targets
)
-
1
)
{
my
$df_target
=
$df_targets
->
[
$i
];
my
$condition
=
$df_target
->
on_condition
;
$condition
=~
s{"}{"}g
if
(
defined
(
$condition
));
# should fix a string display bug for pre-2.16 GraphViz'es
$condition
=~
s{<}{<}g
if
(
defined
(
$condition
));
$condition
=~
s{>}{>}g
if
(
defined
(
$condition
));
if
(
$display_cond_length
)
{
if
(
defined
(
$condition
))
{
$condition
=~
s{"}{"}g
;
# should fix a string display bug for pre-2.16 GraphViz'es
$condition
=~
s{<}{<}g
;
$condition
=~
s{>}{>}g
;
$condition
=~
s{^(.{$display_cond_length}
).+}
{$1 \.\.\.}
;
# shorten down to $display_cond_length characters
}
}
else
{
$condition
&&=
'
condition_
'
.
$i
;
}
$tablabel
.=
qq{<tr><td port="cond_$i">}
.
(
$condition
?
"
WHEN
$condition
"
:
$choice
?
'
ELSE
'
:
'')
.
"
</td></tr>
";
}
$tablabel
.=
'
</table>>
';
...
...
@@ -591,10 +599,7 @@ sub _twopart_arrow {
);
foreach
my
$i
(
0
..
scalar
(
@$df_targets
)
-
1
)
{
my
$df_target
=
$df_targets
->
[
$i
];
my
$condition
=
$df_target
->
on_condition
;
$condition
=~
s{"}{"}g
if
(
defined
(
$condition
));
# should fix a string display bug for pre-2.16 GraphViz'es
$self
->
_last_part_arrow
(
$from_analysis
,
$midpoint_name
,
'',
$df_target
,
$choice
?
[
tailport
=>
"
cond_
$i
"
]
:
[
tailport
=>
'
s
'
]);
$self
->
_last_part_arrow
(
$from_analysis
,
$midpoint_name
,
'',
$df_targets
->
[
$i
],
$choice
?
[
tailport
=>
"
cond_
$i
"
]
:
[
tailport
=>
'
s
'
]);
}
return
$midpoint_name
;
...
...
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