diff options
author | Brian Cully <bjc@kublai.com> | 2022-12-12 10:06:30 -0500 |
---|---|---|
committer | Brian Cully <bjc@kublai.com> | 2022-12-12 10:06:30 -0500 |
commit | a0b19de6a07da91037787bac900453693147e0e4 (patch) | |
tree | 60820e12c593ed5a948833be3a72ca7b8e66468a | |
parent | c0c8775cb79412d515d43c7f1dc0db95b7f795a9 (diff) | |
download | fav-a0b19de6a07da91037787bac900453693147e0e4.tar.gz fav-a0b19de6a07da91037787bac900453693147e0e4.zip |
crash out early if codon lookup fails
-rwxr-xr-x | varscan2codon.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/varscan2codon.pl b/varscan2codon.pl index 8cd36c6..71d880f 100755 --- a/varscan2codon.pl +++ b/varscan2codon.pl @@ -61,6 +61,8 @@ while (<$variants>) { } my $codon = substr $genome, $start+$protein_start, 3; + die "$. - couldn't find amino acid for codon '$codon'\n" unless ($codon2aa{$codon}); + my $orig_aa = $aa2letter{$codon2aa{$codon}}; substr $codon, $offset, 1, $new_nt; my $new_aa = $aa2letter{$codon2aa{$codon}}; |