Commit da353cab authored by Jessica Severin's avatar Jessica Severin
Browse files

added default methods reset_job, global_cleanup, and branch_code to

Bio::EnsEMBL::Analysis::RunnableDB via namespace extension syntax
so that hive system can use analysis.modules that inherit from Bio::EnsEMBL::Analysis::RunnableDB
parent 78917424
......@@ -32,6 +32,7 @@ use Bio::EnsEMBL::Analysis;
use Bio::EnsEMBL::DBSQL::DBConnection;
use Bio::EnsEMBL::DBSQL::AnalysisAdaptor;
use Bio::EnsEMBL::Pipeline::RunnableDB;
#use Bio::EnsEMBL::Analysis::RunnableDB;
=head2 runnableDB
......@@ -156,6 +157,10 @@ sub Bio::EnsEMBL::Analysis::stats
return $stats;
}
#######################################
# extensions to
# Bio::EnsEMBL::Pipeline::RunnableDB
#######################################
sub Bio::EnsEMBL::Pipeline::RunnableDB::reset_job
{
......@@ -177,6 +182,35 @@ sub Bio::EnsEMBL::Pipeline::RunnableDB::branch_code
return $self->{'_branch_code'};
}
#######################################
# extensions to
# Bio::EnsEMBL::Analysis::RunnableDB
#######################################
sub Bio::EnsEMBL::Analysis::RunnableDB::reset_job
{
my $self = shift;
return 1;
}
sub Bio::EnsEMBL::Analysis::RunnableDB::global_cleanup
{
my $self = shift;
return 1;
}
sub Bio::EnsEMBL::Analysis::RunnableDB::branch_code
{
my $self = shift;
$self->{'_branch_code'} = shift if(@_);
$self->{'_branch_code'}=1 unless($self->{'_batch_size'});
return $self->{'_branch_code'};
}
#######################################
# top level functions
#######################################
sub main::encode_hash
{
my $hash_ref = shift;
......
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