'first_mult'=>'9650156169',# the actual numbers to be multiplied can also be specified from the command line
'second_mult'=>'327358788',
'take_time'=>0,# how much time (in seconds) should each job take -- to slow things down
};
}
...
...
@@ -98,6 +100,24 @@ sub pipeline_create_commands {
}
=head2 pipeline_wide_parameters
Description : Interface method that should return a hash of pipeline_wide_parameter_name->pipeline_wide_parameter_value pairs.
The value doesn't have to be a scalar, can be any Perl structure now (will be stringified and de-stringified automagically).
Please see existing PipeConfig modules for examples.
=cut
sub pipeline_wide_parameters{
my($self)=@_;
return{
%{$self->SUPER::pipeline_wide_parameters},# here we inherit anything from the base class
'take_time'=>$self->o('take_time'),
};
}
=head2 pipeline_analyses
Description : Implements pipeline_analyses() interface method of Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf that defines the structure of the pipeline: analyses, jobs, rules, etc.
@@ -37,6 +37,8 @@ use base ('Bio::EnsEMBL::Hive::Process');
param('b_multiplier'): The second long number (also a string of digits).
param('take_time'): How much time to spend sleeping (seconds).
=cut
sub fetch_input{
...
...
@@ -58,16 +60,21 @@ sub fetch_input {
$self->param('output_ids',\@output_ids);
}
=head2 run
Description : Implements run() interface method of Bio::EnsEMBL::Hive::Process that is used to perform the main bulk of the job (minus input and output).
Here we don't have any real work to do, just input and output, so run() remains empty.
Here we don't have any real work to do, just input and output, so run() just spends some time waiting.
=cut
sub run{
my$self=shift@_;
sleep($self->param('take_time'));
}
=head2 write_output
Description : Implements write_output() interface method of Bio::EnsEMBL::Hive::Process that is used to deal with job's output after the execution.