diff --git a/modules/Bio/EnsEMBL/Transcript.pm b/modules/Bio/EnsEMBL/Transcript.pm index 13851ca7d8230dd1395d36184eff97e1005e03db..b66eec3452fdebae0af25aacb978b4c57335e64b 100755 --- a/modules/Bio/EnsEMBL/Transcript.pm +++ b/modules/Bio/EnsEMBL/Transcript.pm @@ -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 ) {