Skip to content

Commit

Permalink
Fix condition for removing *
Browse files Browse the repository at this point in the history
  • Loading branch information
juanneilson committed Nov 28, 2023
1 parent 6fd542c commit faab54a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function getAminoAcidStringFromSequenceString(sequenceString) {
return;
}
// Check if the current amino acid is the last in the sequence and is a stop codon
if (index === aminoAcidsPerBase.length - 1 && aa.aminoAcid.value === '*') {
if (index >= aminoAcidsPerBase.length - 3 && aa.aminoAcid.value === '*') {
return;
}
aaArray[aa.aminoAcidIndex] = aa.aminoAcid.value;
Expand Down

0 comments on commit faab54a

Please sign in to comment.