Commit 2416bd72 authored by Leo Gordon's avatar Leo Gordon
Browse files

move input_id_template stringification into DFR class

parent 0cbb4afd
......@@ -117,15 +117,15 @@ sub create_rule {
return unless($from_analysis and $to_analysis_or_url);
my $rule = Bio::EnsEMBL::Hive::DataflowRule->new(
-from_analysis => $from_analysis,
-from_analysis => $from_analysis,
ref($to_analysis_or_url)
? ( -to_analysis => $to_analysis_or_url )
: ( -to_analysis_url => $to_analysis_or_url ),
? ( -to_analysis => $to_analysis_or_url )
: ( -to_analysis_url => $to_analysis_or_url ),
-branch_code => $self->branch_name_2_code($branch_name_or_code),
-input_id_template => (ref($input_id_template) ? stringify($input_id_template) : $input_id_template),
-funnel_dataflow_rule_id => $funnel_dataflow_rule_id,
-branch_code => $self->branch_name_2_code($branch_name_or_code),
-input_id_template => $input_id_template,
-funnel_dataflow_rule_id => $funnel_dataflow_rule_id,
);
return $self->store($rule, 1); # avoid redundancy
......
......@@ -54,6 +54,7 @@ use Scalar::Util ('weaken');
use Bio::EnsEMBL::Utils::Argument; # import 'rearrange()'
use Bio::EnsEMBL::Utils::Exception;
use Bio::EnsEMBL::Hive::Utils ('stringify'); # import 'stringify()'
use Bio::EnsEMBL::Hive::DBSQL::AnalysisAdaptor;
=head2 new
......@@ -163,7 +164,8 @@ sub input_id_template {
my $self = shift @_;
if(@_) { # setter mode
$self->{'_input_id_template'} = shift @_;
my $input_id_template = shift @_;
$self->{'_input_id_template'} = (ref($input_id_template) ? stringify($input_id_template) : $input_id_template),
}
return $self->{'_input_id_template'};
}
......
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