Skip to content
Snippets Groups Projects
Commit e4e065a5 authored by Graham McVicker's avatar Graham McVicker
Browse files

made translateable_seq() and translate() more careful about the possible absence of Translation

parent 949abb12
No related branches found
No related tags found
No related merge requests found
......@@ -426,6 +426,10 @@ sub spliced_seq {
sub translateable_seq {
my ( $self ) = @_;
if(!$self->translation()) {
return '';
}
my $mrna = $self->spliced_seq();
my $start = $self->cdna_coding_start();
my $end = $self->cdna_coding_end();
......@@ -1099,8 +1103,10 @@ sub get_all_translateable_Exons {
Example : none
Description: return the peptide (plus eventuel stop codon) for this
transcript. Does N padding of non phase matching exons.
It uses translateable_seq internally.
Returntype : Bio::Seq
It uses translateable_seq internally.
Returns undef if this Transcript does not have a translation
(i.e. pseudogene).
Returntype : Bio::Seq or undef
Exceptions : If no Translation is set in this Transcript
Caller : general
......@@ -1109,6 +1115,10 @@ sub get_all_translateable_Exons {
sub translate {
my ($self) = @_;
if(!$self->translation()) {
return undef;
}
my $mrna = $self->translateable_seq();
my $display_id;
if( defined $self->translation->stable_id ) {
......
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