sub strict_hash_format{# This public virtual must be redefined to "return 0;" in all inheriting classes
# that want more flexibility for the format of parameters() or input_id()
return1;
}
sub param_init{# normally will run automatically on the first execution of $self->param(),
# but you can enforce it by running manually, optionally supplying the default values
...
...
@@ -38,23 +43,15 @@ sub param_init { # normally will run automatically on the first execution of
if(!$self->{'_param_hash'}orscalar(@_)){
my$defaults=scalar(@_)?{@_}:{};# built-in defaults have the lowest precedence
my$defaults_hash=scalar(@_)?{@_}:{};# module-wide built-in defaults have the lowest precedence (will always be the same for this module)
my$parameters=eval($self->parameters())||{};
if($@){
die"The module '".ref($self)."' for analysis '".$self->analysis->logic_name()
."' assumes analysis.parameters should evaluate into a {'param'=>'value'} hashref."
." The current value is '".$self->parameters()."'\n";
}
my$meta_params_hash=$self->_parse_meta();# then come the pipeline-wide parameters from the 'meta' table (define things common to all modules in this pipeline)
my$input_id=eval($self->input_id())||{};
if($@){
die"The module '".ref($self)."' for analysis '".$self->analysis->logic_name()
."' assumes analysis_job.input_id should evaluate into a {'param'=>'value'} hashref."
." The current value is '".$self->input_id()."'\n";
}
my$parameters_hash=$self->_parse_string('parameters');# analysis-wide 'parameters' are even more specific (can be defined differently for several occurence of the same module)