From a0b19de6a07da91037787bac900453693147e0e4 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 12 Dec 2022 10:06:30 -0500 Subject: crash out early if codon lookup fails --- varscan2codon.pl | 2 ++ 1 file changed, 2 insertions(+) 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}}; -- cgit v1.2.3