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
980fcb4e
Commit
980fcb4e
authored
Feb 28, 2014
by
Leo Gordon
Browse files
cosmetic: moved fetching code (except for table contents) into build() method
parent
d4f60be9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
+12
-10
No files found.
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
View file @
980fcb4e
...
...
@@ -161,12 +161,14 @@ sub _midpoint_name {
sub
build
{
my
(
$self
)
=
@_
;
my
$all_analyses_coll
=
Bio::EnsEMBL::Hive::Utils::
Collection
->
new
(
$self
->
dba
()
->
get_AnalysisAdaptor
()
->
fetch_all
);
my
$all_control_rules_coll
=
Bio::EnsEMBL::Hive::Utils::
Collection
->
new
(
$self
->
dba
()
->
get_AnalysisCtrlRuleAdaptor
()
->
fetch_all
);
my
$all_dataflow_rules_coll
=
Bio::EnsEMBL::Hive::Utils::
Collection
->
new
(
$self
->
dba
()
->
get_DataflowRuleAdaptor
()
->
fetch_all
);
my
$dba
=
$self
->
dba
();
my
$all_analyses_coll
=
Bio::EnsEMBL::Hive::Utils::
Collection
->
new
(
$dba
->
get_AnalysisAdaptor
()
->
fetch_all
);
my
$all_control_rules_coll
=
Bio::EnsEMBL::Hive::Utils::
Collection
->
new
(
$dba
->
get_AnalysisCtrlRuleAdaptor
()
->
fetch_all
);
my
$all_dataflow_rules_coll
=
Bio::EnsEMBL::Hive::Utils::
Collection
->
new
(
$dba
->
get_DataflowRuleAdaptor
()
->
fetch_all
);
if
(
my
$job_limit
=
$self
->
config_get
('
DisplayJobs
')
)
{
my
$job_adaptor
=
$
self
->
dba
->
get_AnalysisJobAdaptor
();
my
$job_adaptor
=
$dba
->
get_AnalysisJobAdaptor
();
foreach
my
$analysis
(
$all_analyses_coll
->
list
)
{
my
@jobs
=
sort
{
$a
->
dbID
<=>
$b
->
dbID
}
@
{
$job_adaptor
->
fetch_some_by_analysis_id_limit
(
$analysis
->
dbID
,
$job_limit
+
1
)};
$analysis
->
jobs_collection
(
\
@jobs
);
...
...
@@ -208,7 +210,9 @@ sub build {
}
if
(
$self
->
config_get
('
DisplayDetails
')
)
{
$self
->
_add_hive_details
();
my
$dbc
=
$dba
->
dbc
();
my
$pipeline_label
=
sprintf
('
%s@%s
',
$dbc
->
dbname
,
$dbc
->
host
||
'
-
');
$self
->
_add_pipeline_label
(
$pipeline_label
);
}
foreach
my
$analysis
(
$all_analyses_coll
->
list
)
{
$self
->
_add_analysis_node
(
$analysis
);
...
...
@@ -324,14 +328,12 @@ sub _propagate_allocation {
}
sub
_add_
hive_details
{
my
(
$self
)
=
@_
;
sub
_add_
pipeline_label
{
my
(
$self
,
$pipeline_label
)
=
@_
;
my
$node_fontname
=
$self
->
config_get
('
Node
',
'
Details
',
'
Font
');
my
$dbc
=
$self
->
dba
()
->
dbc
();
my
$label
=
sprintf
('
%s@%s
',
$dbc
->
dbname
,
$dbc
->
host
||
'
-
');
$self
->
graph
()
->
add_node
(
'
Details
',
label
=>
$label
,
label
=>
$
pipeline_
label
,
fontname
=>
$node_fontname
,
shape
=>
'
plaintext
',
);
...
...
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