11 init_pipeline.pl
FailureTest_conf.pm -host=localhost -password <your_password> -job_count 100 -failure_rate 3
15 This is an example pipeline built around FailureTest.pm RunnableDB. It consists of two analyses:
17 Analysis_1: JobFactory.pm is used to create an array of jobs -
19 these jobs are sent down the branch #2 into the second analysis
21 Analysis_2: FailureTest.pm either succeeds or dies, depending on the parameters.
25 See the NOTICE file distributed with
this work
for additional information
26 regarding copyright ownership.
28 Licensed under the Apache License,
Version 2.0 (the
"License"); you may not use
this file except in compliance with the License.
29 You may obtain a copy of the License at
33 Unless required by applicable law or agreed to in writing, software distributed under the License
34 is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35 See the License
for the specific language governing permissions and limitations under the License.
39 Please subscribe to the
Hive mailing list: http:
44 package Bio::EnsEMBL::Hive::Examples::FailureTest::PipeConfig::FailureTest_conf;
49 use base (
'Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf'); # All
Hive databases configuration files should inherit from HiveGeneric, directly or indirectly
51 =head2 default_options
53 Description : Implements default_options()
interface method of
Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf that is used to initialize default options.
54 In addition to the standard things it defines three options:
55 o('job_count') controls the total number of FailureTest jobs
56 o('failure_rate') controls the rate of jobs that are programmed to fail
57 o('state') controls the state in which the jobs will be failing
58 o('lethal_after') when job_number is above this (nonzero) threshold, job's death becomes lethal to the
Worker
60 There is a rule dependent on one option that does not have a default (this makes it mandatory):
61 o('password') your read-write password for creation and maintenance of the hive database
68 %{ $self->SUPER::default_options() }, # inherit other stuff from the base
class
70 'job_count' => 10, # controls the total number of FailureTest jobs
71 'failure_rate' => 3, # controls the rate of jobs that are programmed to fail
72 'state' =>
'RUN', # controls in which state the jobs are programmed to fail
77 =head2 pipeline_analyses
79 Description : Implements pipeline_analyses()
interface method of
Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf that defines the structure of the pipeline: analyses, jobs, rules, etc.
80 Here it defines two analyses:
82 * 'generate_jobs' generates a list of jobs
84 * 'failure_test' either succeeds or fails, depending on parameters
88 sub pipeline_analyses {
91 { -logic_name =>
'generate_jobs',
92 -module =>
'Bio::EnsEMBL::Hive::RunnableDB::JobFactory',
94 'inputlist' =>
'#expr([0..#job_count#-1])expr#', #
this expression will evaluate into a listref
95 'column_names' => [
'value' ],
98 {
'job_count' => $self->o(
'job_count') },
101 '2->A' => [
'failure_test' ],
102 'A->1' => [
'funnel' ],
106 { -logic_name =>
'failure_test',
107 -module =>
'Bio::EnsEMBL::Hive::Examples::FailureTest::RunnableDB::FailureTest',
109 'divisor' => $self->o(
'failure_rate'),
110 'state' => $self->o(
'state'),
111 'lethal_after' => $self->o(
'lethal_after'),
115 { -logic_name =>
'funnel',
116 -module =>
'Bio::EnsEMBL::Hive::RunnableDB::Dummy',