3 See the NOTICE file distributed with
this work
for additional information
4 regarding copyright ownership.
6 Licensed under the Apache License, Version 2.0 (the
"License");
7 you may not use
this file except in compliance with the License.
8 You may obtain a copy of the License at
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an
"AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License
for the specific language governing permissions and
16 limitations under the License.
23 Please email comments or questions to the
public Ensembl
24 developers list at <http:
26 Questions may also be sent to the Ensembl help desk at
39 -logic_name =>
'SWIRBlast',
41 -db_version => $db_version,
44 -program_version => $program_version,
45 -program_file => $program_file,
46 -gff_source => $gff_source,
47 -gff_feature => $gff_feature,
49 -module_version => $module_version,
50 -parameters => $parameters,
52 -description =>
'some warm words about this analysis',
53 -display_label =>
'UNIprot alignment',
55 -web_data =>
'web metadata info'
60 Object to store details of an analysis
run.
66 package Bio::EnsEMBL::Analysis;
76 use base
'Bio::EnsEMBL::Storable';
81 Arg [..] : Takes a set of named arguments
82 Example : $analysis =
new Bio::EnsEMBL::Analysis::Analysis(
84 -logic_name =>
'SWIRBlast',
86 -db_version => $db_version,
89 -program_version => $program_version,
90 -program_file => $program_file,
91 -gff_source => $gff_source,
92 -gff_feature => $gff_feature,
94 -module_version => $module_version,
95 -parameters => $parameters,
96 -created => $created );
97 Description: Creates a
new Analysis object
106 my($class,@args) = @_;
108 my $self = bless {},$class;
110 my ($id, $adaptor, $db, $db_version, $db_file, $program, $program_version,
111 $program_file, $gff_source, $gff_feature, $module, $module_version,
112 $parameters, $created, $logic_name, $description, $display_label,
113 $displayable, $web_data) =
139 $self->adaptor ($adaptor);
141 $self->db_version ($db_version);
142 $self->db_file ($db_file);
143 $self->program ($program);
144 $self->program_version($program_version);
145 $self->program_file ($program_file);
146 $self->module ($module);
147 $self->module_version ($module_version);
148 $self->gff_source ($gff_source);
149 $self->gff_feature ($gff_feature);
150 $self->parameters ($parameters);
151 $self->created ($created);
152 $self->logic_name ( $logic_name );
153 $self->description( $description );
154 $self->display_label( $display_label );
155 $self->displayable( $displayable );
156 $self->web_data ( $web_data );
157 return $self; # success - we hope!
164 Description: get/set
for the attribute db
173 my ($self,$arg) = @_;
185 Arg [1] :
string $db_version
186 Description: get/set
for attribute db_version
195 my ($self,$arg) = @_;
198 $self->{_db_version} = $arg;
201 return $self->{_db_version};
207 Arg [1] :
string $db_file
208 Description: get/set
for attribute db_file
217 my ($self,$arg) = @_;
220 $self->{_db_file} = $arg;
223 return $self->{_db_file};
230 Arg [1] :
string $program
231 Description: get/set
for attribute program
240 my ($self,$arg) = @_;
243 $self->{_program} = $arg;
246 return $self->{_program};
250 =head2 program_version
252 Arg [1] :
string $program_version
253 Description: get/set
for attribute program_version
261 sub program_version {
262 my ($self,$arg) = @_;
265 $self->{_program_version} = $arg;
268 return $self->{_program_version};
274 Arg [1] :
string $program_file
275 Description: get/set
for attribute program_file
284 my ($self,$arg) = @_;
287 $self->{_program_file} = $arg;
290 return $self->{_program_file};
296 Arg [1] :
string $module
297 Description: get/set
for attribute module. Usually a RunnableDB perl
298 module that executes
this analysis job.
307 my ($self,$arg) = @_;
310 $self->{_module} = $arg;
313 return $self->{_module};
317 =head2 module_version
319 Arg [1] :
string $module_version
320 Description: get/set
for attribute module_version
329 my ($self,$arg) = @_;
332 $self->{_module_version} = $arg;
335 return $self->{_module_version};
341 Arg [1] :
string $gff_source
342 Description: get/set
for attribute gff_source
351 my ($self,$arg) = @_;
354 $self->{_gff_source} = $arg;
357 return $self->{_gff_source};
363 Arg [1] :
string $gff_feature
364 Description: get/set
for attribute gff_feature
373 my ($self,$arg) = @_;
376 $self->{_gff_feature} = $arg;
379 return $self->{_gff_feature};
385 Arg [1] :
string $parameters
386 Description: get/set
for attribute parameters. This should be evaluated
387 by the module
if given or the program that is specified.
396 my ($self,$arg) = @_;
399 $self->{_parameters} = $arg;
402 return $self->{_parameters};
408 Arg [1] :
string $created
409 Description: get/set
for attribute created time.
418 my ($self,$arg) = @_;
421 $self->{_created} = $arg;
424 return $self->{_created};
430 Arg [1] :
string $logic_name
431 Description: Get/set method
for the logic_name, the name under
432 which
this typical analysis is known.
441 my ($self, $arg ) = @_;
443 ($self->{_logic_name} = $arg);
444 $self->{_logic_name};
451 Description: tests
if the db attribute is set, returns 1
if so,
461 my ($self,@args) = @_;
463 if( defined $self->db ){
return 1; }
470 Arg [1] :
string $description
472 Description: get/set
for attribute description
481 my ($self,$arg) = @_;
484 $self->{_description} = $arg;
487 return $self->{_description};
493 Arg [1] :
string $display_label
494 Description: get/set
for attribute display_label
503 my ($self,$arg) = @_;
506 $self->{_display_label} = $arg;
509 return $self->{_display_label};
514 Arg [1] :
string $displayable
515 Description: get/set
for attribute displayable
524 my ($self,$arg) = @_;
527 $self->{_displayable} = $arg;
530 return $self->{_displayable};
536 Arg [1] :
string $web_data
537 Description: get/set
for attribute web_data
544 # See also _objFromHashref in AnalysisAdaptor for context.
546 my ($self,$arg) = @_;
549 $self->{_web_data} = $arg;
552 return $self->{_web_data};
559 Description: returns 1
if this analysis is special
case of given analysis
560 returns 0
if they are equal
561 returns -1
if they are completely different
562 Returntype :
int -1,0,1
570 my ($self, $ana ) = @_;
572 throw(
"Object is not a Bio::EnsEMBL::Analysis")
573 unless $ana->isa(
"Bio::EnsEMBL::Analysis");
577 foreach my $methodName (
'program',
'program_version',
'program_file',
578 'db',
'db_version',
'db_file',
'gff_source',
'gff_feature',
'module',
579 'module_version',
'parameters',
'logic_name' ) {
580 if( defined $self->$methodName() && ! $ana->can($methodName )) {
583 if( defined $self->$methodName() && ! defined $ana->$methodName() ) {
586 # if given anal is different from this, defined or not, then its different
587 if( defined($ana->$methodName()) && defined($self->$methodName()) &&
588 ( $self->$methodName() ne $ana->$methodName() )) {
592 if( $detail == 1 ) {
return 1 };