Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ensembl-hive
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
7
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
ensembl-hive
Commits
413d2a1a
Commit
413d2a1a
authored
10 years ago
by
Leo Gordon
Browse files
Options
Downloads
Plain Diff
pulled in from version/2.1 : bugfix: added checking dataflow targets for fetchability
parents
c7d37a45
6c7d78de
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
+25
-11
25 additions, 11 deletions
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
with
25 additions
and
11 deletions
modules/Bio/EnsEMBL/Hive/Utils/Graph.pm
+
25
−
11
View file @
413d2a1a
...
...
@@ -186,12 +186,20 @@ sub build {
if
(
UNIVERSAL::
isa
(
$target_object
,
'
Bio::EnsEMBL::Hive::Analysis
'))
{
$target_object
->
{'
_inflow_count
'}
++
;
}
}
elsif
(
$df_rule
->
to_analysis
->
isa
('
Bio::EnsEMBL::Hive::Analysis
')
)
{
# dataflow target is a foreign Analysis
$target_object
=
$df_rule
->
to_analysis
();
$target_object
->
{'
_foreign
'}
=
1
;
Bio::EnsEMBL::Hive::
Analysis
->
collection
()
->
add
(
$target_object
);
# add it to the collection
my
$foreign_stats
=
$target_object
->
stats
or
die
"
Could not fetch foreign stats for
"
.
$target_object
->
display_name
(
$self
->
hive_dba
);
Bio::EnsEMBL::Hive::
AnalysisStats
->
collection
()
->
add
(
$foreign_stats
);
# add it to the collection
}
else
{
$target_object
=
$df_rule
->
to_analysis
or
die
"
Could not fetch a target object for url='
"
.
$df_rule
->
to_analysis_url
.
"
', please check your database for consistency.
\n
";
if
(
UNIVERSAL::
isa
(
$target_object
,
'
Bio::EnsEMBL::Hive::Analysis
')
)
{
# dataflow target is a foreign Analysis
$target_object
->
{'
_foreign
'}
=
1
;
Bio::EnsEMBL::Hive::
Analysis
->
collection
()
->
add
(
$target_object
);
# add it to the collection
my
$foreign_stats
=
$target_object
->
stats
or
die
"
Could not fetch foreign stats for
"
.
$target_object
->
display_name
(
$self
->
hive_dba
);
Bio::EnsEMBL::Hive::
AnalysisStats
->
collection
()
->
add
(
$foreign_stats
);
# add it to the collection
}
elsif
(
UNIVERSAL::
isa
(
$target_object
,
'
Bio::EnsEMBL::Hive::NakedTable
')
)
{
}
elsif
(
UNIVERSAL::
isa
(
$target_object
,
'
Bio::EnsEMBL::Hive::Accumulator
')
)
{
}
else
{
warn
"
Do not know how to handle the type '
"
.
ref
(
$target_object
)
.
"
'
";
}
}
if
(
my
$funnel_dataflow_rule
=
$df_rule
->
funnel_dataflow_rule
)
{
...
...
@@ -282,7 +290,9 @@ sub _propagate_allocation {
my
(
$self
,
$source_analysis
)
=
@_
;
foreach
my
$df_rule
(
@
{
$source_analysis
->
dataflow_rules_collection
}
)
{
# this will only work if the analyses objects are ALL cached before loading DFRs
my
$target_object
=
$df_rule
->
to_analysis
();
my
$target_object
=
$df_rule
->
to_analysis
or
die
"
Could not fetch a target object for url='
"
.
$df_rule
->
to_analysis_url
.
"
', please check your database for consistency.
\n
";
my
$target_node_name
;
if
(
UNIVERSAL::
isa
(
$target_object
,
'
Bio::EnsEMBL::Hive::Analysis
'))
{
...
...
@@ -292,7 +302,7 @@ sub _propagate_allocation {
}
elsif
(
UNIVERSAL::
isa
(
$target_object
,
'
Bio::EnsEMBL::Hive::Accumulator
'))
{
next
;
}
else
{
warn
(
'
Do not know how to handle the type
'
.
ref
(
$target_object
));
warn
(
"
Do not know how to handle the type '
"
.
ref
(
$target_object
)
.
"
'
"
);
next
;
}
...
...
@@ -454,8 +464,12 @@ sub _add_dataflow_rules {
foreach
my
$df_rule
(
@$dataflow_rules
)
{
my
(
$from_analysis
,
$branch_code
,
$funnel_dataflow_rule
,
$target_object
)
=
(
$df_rule
->
from_analysis
,
$df_rule
->
branch_code
,
$df_rule
->
funnel_dataflow_rule
,
$df_rule
->
to_analysis
);
my
(
$from_analysis
,
$branch_code
,
$funnel_dataflow_rule
)
=
(
$df_rule
->
from_analysis
,
$df_rule
->
branch_code
,
$df_rule
->
funnel_dataflow_rule
);
my
$target_object
=
$df_rule
->
to_analysis
or
die
"
Could not fetch a target object for url='
"
.
$df_rule
->
to_analysis_url
.
"
', please check your database for consistency.
\n
";
my
$from_node_name
=
$self
->
_analysis_node_name
(
$from_analysis
);
my
$target_node_name
;
...
...
@@ -474,7 +488,7 @@ sub _add_dataflow_rules {
$target_node_name
=
_midpoint_name
(
$from_analysis
->
{'
_funnel_dfr
'}
);
}
else
{
warn
(
'
Do not know how to handle the type
'
.
ref
(
$target_object
));
warn
(
"
Do not know how to handle the type '
"
.
ref
(
$target_object
)
.
"
'
"
);
next
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment