diff --git a/misc-scripts/translation_attribs.pl b/misc-scripts/translation_attribs.pl index df2c22a6e8b817386dac421ce612c4bff6b8d981..764ea85ea742f769ce1882f07dbbba2bfed83b1e 100644 --- a/misc-scripts/translation_attribs.pl +++ b/misc-scripts/translation_attribs.pl @@ -254,6 +254,14 @@ sub get_pepstats { my $peptide_seq ; eval { $peptide_seq = $translation->seq}; + + if ($@) { + warn("PEPSTAT: eval() failed: $!"); + return {}; + } elsif ( $peptide_seq =~ m/[BZX]/ig ) { + return {}; + } + return {} if ($@ || $peptide_seq =~ m/[BZX]/ig); if( $peptide_seq !~ /\n$/ ){ $peptide_seq .= "\n" } $peptide_seq =~ s/\*$//;