9 An
'analysis control rule' is a high level blocking control structure where there is
10 a
'ctrled_analysis' which is
'BLOCKED' from running until all of its
'condition_analysis' are
'DONE'.
11 If a ctrled_analysis requires multiple analysis to be DONE before it can run, a separate
12 AnalysisCtrlRule must be created/stored
for each condtion analysis.
14 Allows the
'condition' analysis to be specified with a network savy URL like
19 Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
20 Copyright [2016-2022] EMBL-European Bioinformatics Institute
22 Licensed under the Apache License,
Version 2.0 (the
"License"); you may not use
this file except in compliance with the License.
23 You may obtain a copy of the License at
27 Unless required by applicable law or agreed to in writing, software distributed under the License
28 is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 See the License
for the specific language governing permissions and limitations under the License.
33 Please subscribe to the
Hive mailing list: http:
37 The rest of the documentation details each of the
object methods.
38 Internal methods are usually preceded with a _
43 package Bio::EnsEMBL::Hive::AnalysisCtrlRule;
51 use base (
'Bio::EnsEMBL::Hive::Storable' );
54 sub unikey { #
override the
default from
Cacheable parent
55 return [
'condition_analysis_url',
'ctrled_analysis' ];
61 ctrled_analysis_id / ctrled_analysis
66 =head2 condition_analysis_url
68 Arg[1] : (optional)
string $url
69 Usage : $self->condition_analysis_url($url);
70 Function: Get/
set method
for the analysis which must be
'DONE' in order
for 71 the controlled analysis to be un-BLOCKED. Specified as a URL.
76 sub condition_analysis_url {
80 $self->{
'_condition_analysis_url'} = shift @_;
81 if( $self->{
'_condition_analysis'} ) {
82 $self->{
'_condition_analysis'} = undef;
84 } elsif( !$self->{
'_condition_analysis_url'} and my $condition_analysis=$self->{
'_condition_analysis'} ) {
86 my $ref_pipeline = $self->ctrled_analysis && $self->ctrled_analysis->
hive_pipeline;
87 $self->{
'_condition_analysis_url'} = $condition_analysis->relative_url( $ref_pipeline ); # the URL may be shorter
if hive_pipeline is the same
for source and target
90 return $self->{
'_condition_analysis_url'};
94 =head2 condition_analysis
97 Usage : $self->condition_analysis($anal);
98 Function: Get/
set method
for the analysis which must be
'DONE' in order
for 99 the controlled analysis to be un-BLOCKED
104 sub condition_analysis {
105 my ($self, $analysis, $no_die) = @_;
107 if( defined $analysis ) {
108 unless ($analysis->isa(
'Bio::EnsEMBL::Hive::Analysis')) {
109 throw(
"condition_analysis arg must be a [Bio::EnsEMBL::Hive::Analysis] not a [$analysis]");
111 $self->{
'_condition_analysis'} = $analysis;
114 if( !$self->{
'_condition_analysis'} and my $condition_analysis_url = $self->condition_analysis_url ) { # lazy-load through
TheApiary 119 return $self->{
'_condition_analysis'};
126 Example : print $c_rule->toString().
"\n";
127 Description: returns a stringified representation of the rule
136 'AnalysisCtrlRule: ',
137 $self->condition_analysis_url,
139 $self->ctrled_analysis->logic_name,