ensembl-hive  2.8.1
LeachingTest_conf.pm
Go to the documentation of this file.
1 =pod
2 
3 =head1 NAME
4 
6 
7 =head1 SYNOPSIS
8 
9  init_pipeline.pl Bio::EnsEMBL::Hive::Examples::Factories::PipeConfig::LeachingTest_conf -password <your_password>
10 
11 =head1 DESCRIPTION
12 
13  When we attempt to create a new semaphored group of jobs and the creation of the funnel job fails
14  because there is already a job with the same primary key, we reuse this funnel job and simply top up
15  the semaphore group with extra fan jobs. This is what we call "leaching".
16 
17  This is a small pipeline to test leaching via using templates.
18 
19  Note 1: this is not the recommended way to create a single backbone from multiple independent streams!
20 
21  Note 2: the 'start' analysis is only needed because of the recently adopted rule of automatically param-stacking
22  the very first job that does not have a local parent (used mainly for maintaining cross-database return capability,
23  but could prove itself useful in other contexts as well). If/when we decide against this feature,
24  we can also drop the 'start' analysis, leaving two independent seeding jobs in 'factory' analysis
25  and changing the leeching.t test accordingly (removing one execution of runWorker).
26 
27 =head1 LICENSE
28 
29  See the NOTICE file distributed with this work for additional information
30  regarding copyright ownership.
31 
32  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
33  You may obtain a copy of the License at
34 
35  http://www.apache.org/licenses/LICENSE-2.0
36 
37  Unless required by applicable law or agreed to in writing, software distributed under the License
38  is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
39  See the License for the specific language governing permissions and limitations under the License.
40 
41 =head1 CONTACT
42 
43  Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates
44 
45 =cut
46 
47 
48 package Bio::EnsEMBL::Hive::Examples::Factories::PipeConfig::LeachingTest_conf;
49 
50 use strict;
51 use warnings;
52 
53 use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
54 
55 
56 sub pipeline_analyses {
57  my ($self) = @_;
58  return [
59  { -logic_name => 'start',
60  -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
61  -input_ids => [
62  {},
63  ],
64  -flow_into => {
65  1 => {
66  'factory' => [ {'inputlist' => [ 11, 33, 55, 66, 77 ]}, {'inputlist' => [22, 44, 55, 66 ]} ],
67  'aggregator' => {},
68  },
69  },
70  },
71 
72  { -logic_name => 'factory',
73  -module => 'Bio::EnsEMBL::Hive::RunnableDB::JobFactory',
74  -parameters => {
75  'column_names' => [ 'alpha' ],
76  },
77  -flow_into => { # There are two input jobs...
78  '2->A' => 'fan',
79  'A->1' => { 'funnel' => { 'funnel_id' => 7 }}, # ...however we want all of the children to report to one common funnel
80  },
81  },
82 
83  { -logic_name => 'fan',
84  -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
85  -flow_into => {
86  1 => '?accu_name=alphas&accu_input_variable=alpha&accu_address=[]',
87  },
88  },
89 
90  { -logic_name => 'funnel',
91  -module => 'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd',
92  -parameters => {
93  'alpha_csv' => '#expr( join(",", @{#alphas#}) )expr#',
94  'cmd' => 'echo "#alpha_csv#"',
95  },
96  -flow_into => {
97  '1->A' => 'fan',
98  'A->1' => { 'aggregator' => {}, },
99  },
100  },
101 
102  { -logic_name => 'aggregator',
103  -module => 'Bio::EnsEMBL::Hive::RunnableDB::Dummy',
104  },
105  ];
106 }
107 
108 1;
Bio::EnsEMBL::Hive::Examples::Factories::PipeConfig::LeachingTest_conf
Definition: LeachingTest_conf.pm:30