Skip to content
Snippets Groups Projects
Commit 25e0ecd1 authored by William McLaren's avatar William McLaren
Browse files

Fix for partial codons

parent 871b3e81
No related branches found
No related tags found
No related merge requests found
......@@ -129,6 +129,9 @@ sub get_all_peptide_variations {
#calculate the peptide coordinate of the snp
my $peptide = ($start - $translation_start +
($codon_length - $codon_pos)) / $codon_length;
# skip this SNP if it falls in a partial codon
next if $start - $codon_pos + $codon_length > length($cdna);
#retrieve the codon
my $codon = substr($cdna, $start - $codon_pos-1, $codon_length);
......
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