Commit 9316e72d authored by Leo Gordon's avatar Leo Gordon
Browse files

added a quad_pipeline test walkthrough

parent d1856e16
package Bio::EnsEMBL::Hive::Examples::QPT::PipeConfig::AAA_conf;
use strict;
use warnings;
use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
use Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf; # Allow this particular config to use conditional dataflow and INPUT_PLUS
sub pipeline_create_commands {
my ($self) = @_;
return [
@{$self->SUPER::pipeline_create_commands}, # inheriting database and hive tables' creation
# additional tables needed for long multiplication pipeline's operation:
$self->db_cmd('CREATE TABLE final_result (a_multiplier varchar(40) NOT NULL, b_multiplier varchar(40) NOT NULL, result varchar(80) NOT NULL, PRIMARY KEY (a_multiplier, b_multiplier))'),
];
}
sub pipeline_analyses {
my ($self) = @_;
return [
{ -logic_name => 'call_BBB',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
-input_ids => [
{ 'a_multiplier' => '9650156169', 'b_multiplier' => '327358788' },
{ 'a_multiplier' => '327358788', 'b_multiplier' => '9650156169' },
],
-flow_into => {
'1->A' => $self->o('BBB_url').'?logic_name=call_CCC_or_DDD',
'A->1' => 'AAA_funnel',
},
},
{ -logic_name => 'AAA_funnel',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
-flow_into => {
2 => '?table_name=final_result',
},
},
];
}
1;
package Bio::EnsEMBL::Hive::Examples::QPT::PipeConfig::BBB_conf;
use strict;
use warnings;
use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
use Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf; # Allow this particular config to use conditional dataflow and INPUT_PLUS
sub pipeline_analyses {
my ($self) = @_;
return [
{ -logic_name => 'call_CCC_or_DDD',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
-flow_into => {
'1->A' => WHEN( '#a_multiplier# > #b_multiplier#' => $self->o('CCC_url').'?logic_name=perform_task_X', ),
'A->1' => WHEN( '#a_multiplier# > #b_multiplier#' => 'BBB_funnel', ),
'1' => WHEN( '#a_multiplier# <= #b_multiplier#' => [ 'perform_local_part', $self->o('DDD_url').'?logic_name=perform_task_Y', ], ),
},
},
{ -logic_name => 'perform_local_part',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
},
{ -logic_name => 'BBB_funnel',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
-flow_into => {
2 => '?accu_name=intermediate_result',
},
},
];
}
1;
package Bio::EnsEMBL::Hive::Examples::QPT::PipeConfig::CCC_conf;
use strict;
use warnings;
use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
use Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf; # Allow this particular config to use conditional dataflow and INPUT_PLUS
sub pipeline_analyses {
my ($self) = @_;
return [
{ -logic_name => 'perform_task_X',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
-flow_into => {
2 => '?accu_name=intermediate_result',
},
},
];
}
1;
package Bio::EnsEMBL::Hive::Examples::QPT::PipeConfig::DDD_conf;
use strict;
use warnings;
use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
use Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf; # Allow this particular config to use conditional dataflow and INPUT_PLUS
sub pipeline_analyses {
my ($self) = @_;
return [
{ -logic_name => 'perform_task_Y',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
-flow_into => {
1 => 'perform_aftertask_of_Y',
},
},
{ -logic_name => 'perform_aftertask_of_Y',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
-flow_into => {
2 => '?accu_name=intermediate_result',
},
},
];
}
1;
......@@ -116,6 +116,23 @@ my $name_2_plan = {
w(5, 1), w(7, 0), b([qw(-sync)], 1), b([qw(-sync)], 0), z(0),
w(6, 0), z(0),
],
'quad_pipe' => [
i(3, 'Bio::EnsEMBL::Hive::Examples::QPT::PipeConfig::DDD_conf', [ -hive_force_init => 1 ], [ ] ),
i(2, 'Bio::EnsEMBL::Hive::Examples::QPT::PipeConfig::CCC_conf', [ -hive_force_init => 1 ], [ ] ),
i(1, 'Bio::EnsEMBL::Hive::Examples::QPT::PipeConfig::BBB_conf', sub { return [ -hive_force_init => 1, -DDD_url => $vj_url{3}, -CCC_url => $vj_url{2} ] }, [ ] ),
i(0, 'Bio::EnsEMBL::Hive::Examples::QPT::PipeConfig::AAA_conf', sub { return [ -hive_force_init => 1, -BBB_url => $vj_url{1} ] }, [ ] ),
z(0),
w(1, 0), b([qw(-analyses_pattern AAA_funnel -sync)], 0), z(0),
w(1, 1), w(2, 0), b([qw(-sync)], 0), z(0),
w(3, 1), b([qw(-sync)], 0), b([qw(-sync)], 1), z(0),
w(1, 2), b([qw(-sync)], 1), z(0),
w(2, 1), b([qw(-sync)], 0), z(0),
w(3, 0), w(1, 3), z(0),
w(2, 3), z(0),
w(4, 1), b([qw(-sync)], 0), z(0),
w(4, 0), z(0),
],
};
my @test_names_to_run = ($test_name eq '*') ? keys %$name_2_plan : ( $test_name );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment