Skip to content
Snippets Groups Projects
Commit 2a4c7df7 authored by Abel Ureta-Vidal's avatar Abel Ureta-Vidal
Browse files

Committed Kathryn changes. Added runnable and output subroutine. These should...

Committed Kathryn changes. Added runnable and output subroutine. These should make the coding of Bio::EnsEMBL::Analysis::RunnableDB and Bio::EnsEMBL::Hive::Process more alike.
parent eb9cd649
No related branches found
No related tags found
No related merge requests found
......@@ -428,6 +428,81 @@ sub parameters {
}
#FIXME kfb 11.01.2006 added runnable method from Pipeline/RunnableDB. Required by
#PairAligner.
=head2 runnable
Title : runnable
Usage : $self->runnable($arg)
Function: Sets a runnable for this RunnableDB
Returns : Bio::EnsEMBL::Analysis::Runnable
Args : Bio::EnsEMBL::Analysis::Runnable
=cut
sub runnable {
my ($self,$arg) = @_;
if (!defined($self->{'_runnables'})) {
$self->{'_runnables'} = [];
}
if (defined($arg)) {
#FIXME kfb 11.01.2006 use Analysis/Runnable object rather than Pipeline/RunnableI
# if ($arg->isa("Bio::EnsEMBL::Pipeline::RunnableI")) {
# push(@{$self->{'_runnables'}},$arg);
# } else {
# &throw("[$arg] is not a Bio::EnsEMBL::Pipeline::RunnableI");
# }
if ($arg->isa("Bio::EnsEMBL::Analysis::Runnable")) {
push(@{$self->{'_runnables'}},$arg);
} else {
&throw("[$arg] is not a Bio::EnsEMBL::Analysis::Runnable");
}
}
return @{$self->{'_runnables'}};
}
#FIXME kfb 11.01.2006 added output method from Pipeline/RunnableDB. Required by
#PairAligner.
=head2 output
Title : output
Usage : $self->output()
Function:
Returns : Array of Bio::EnsEMBL::FeaturePair
Args : None
=cut
sub output {
my ($self) = @_;
$self->{'_output'} = [];
my @r = $self->runnable;
if(@r && scalar(@r)){
foreach my $r ($self->runnable){
#FIXME debug
print STDERR "Process output " . scalar(@{$r->output}) . "\n";
#FIXME kfb 12.01.2006
#push(@{$self->{'_output'}}, $r->output);
push(@{$self->{'_output'}}, @{$r->output});
}
}
#FIXME debug
print STDERR "_output " . scalar(@{$self->{'_output'}}) . "\n";
return @{$self->{'_output'}};
}
1;
......
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