sub fetch_input
{ my($self) = @_;
$self->throw("No input id") unless defined($self->input_id);
my $slice = $self->fetch_sequence;
$self->query($slice);
my %blast = %{$self->BLAST_PARAMS};
my $parser = $self->make_parser;
my $filter;
if($self->BLAST_FILTER){
$filter = $self->make_filter;
}
my (@representative_trans);
my $genes = $self->db->get_GeneAdaptor->fetch_all_by_Slice($self->query);
foreach my $gene (@$genes) {
next if $gene->start < 1;
my ($longest_pep_tran, $longest_pep_tran_len);
foreach my $tran (@{$gene->get_all_Transcripts}) {
if ($tran->translation) {
my $pep_string = $tran->translate->seq;
if (not defined $longest_pep_tran or length($pep_string) > $longest_pep_tran_len) {
$longest_pep_tran = $tran;
$longest_pep_tran_len = length($pep_string);
}
}
}
push @representative_trans, $longest_pep_tran;
}
foreach my $t (@representative_trans) {
foreach my $db (split ',', ($self->analysis->db_file)) {
$self->runnable(Bio::EnsEMBL::Analysis::Runnable::BlastTranscriptPep
->new(
-transcript => $t,
-query => $self->query,
-program => $self->analysis->program_file,
-parser => $parser,
-filter => $filter,
-database => $db,
-analysis => $self->analysis,
%blast,
));
}
}
return 1;
}
1; } |
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _'