my $runnabledb = Bio::EnsEMBL::Analysis::RunnableDB::Finished::Augustus->
new(
-input_id => 'contig::AL805961.22.1.166258:1:166258:1',
-db => $db,
-analysis => $analysis,
);
$runnabledb->fetch_input;
$runnabledb->run;
$runnabledb->write_output;
sub write_output
{ my ($self) = @_;
my $adaptor = $self->db->get_PredictionTranscriptAdaptor;
my $dbh = $self->db->dbc->db_handle;
my @output = @{$self->output};
my $ff = $self->feature_factory;
$dbh->begin_work;
eval {
foreach my $pt(@output){
$pt->analysis($self->analysis);
$pt->slice($self->query) if(!$pt->slice);
print STDERR "Validate transcript ".$pt->seqname."\n";
eval {
$ff->validate_prediction_transcript($pt, 1);
};
if($@){ warning($@); next; }
$adaptor->store($pt);
}
$dbh->commit;
};
if ($@) {
$dbh->rollback;
throw("UNABLE TO WRITE PREDICTION TRANSCRIPTS IN DATABASE\n[$@]\n");
}
}
1; } |