my $runnabledb = Bio::EnsEMBL::Analysis::RunnableDB::Genscan->
new(
-input_id => 'contig::AL805961.22.1.166258:1:166258:1',
-db => $db,
-analysis => $analysis,
);
$runnabledb->fetch_input;
$runnabledb->run;
$runnabledb->write_output;
sub fetch_input
{ my ($self) = @_;
my $slice = $self->fetch_sequence($self->input_id, $self->db,
$ANALYSIS_REPEAT_MASKING);
$self->query($slice);
my %args = %{$self->standard_args};
my $runnable = $self->runnable_path->new
(
%args,
);
my $seq = $self->query->seq;
if ($seq =~ /[CATG]{3}/) {
$self->input_is_void(0);
} else {
$self->input_is_void(1);
warning("Need at least 3 nucleotides - maybe your sequence was fully repeatmasked ...");
}
$self->runnable($runnable);
return 1; } |
sub standard_args
{ my ($self) = @_;
my %parameters;
if($self->parameters_hash){
%parameters = %{$self->parameters_hash};
}
return {
-query => $self->query,
-program => $self->analysis->program_file,
-analysis => $self->analysis,
%parameters,
-matrix => $self->analysis->db_file,
};
}
1; } |
sub write_output
{ my ($self) = @_;
my $adaptor = $self->db->get_PredictionTranscriptAdaptor;
my @output = @{$self->output};
my $ff = $self->feature_factory;
foreach my $pt(@output){
$pt->analysis($self->analysis);
$pt->slice($self->query) if(!$pt->slice);
$ff->validate_prediction_transcript($pt, 1);
$adaptor->store($pt);
} } |