Commit de0049cb authored by Mathieu Giraud's avatar Mathieu Giraud

js/tools.js: do not put end-codon on the last nucleotide when the codon is incomplete

Close #3325.
parent e86a950f
Pipeline #41389 passed with stages
in 4 minutes and 34 seconds
......@@ -128,7 +128,7 @@ function get_mutations(ref, seq, frame, with_end_codon) {
}
nb_pos++;
}
if (typeof with_end_codon !== undefined && with_end_codon)
if (typeof with_end_codon !== undefined && with_end_codon && (i < codons.ref.length - 1 || codons.ref[i].length >= 3))
mutations[nb_pos-1] = END_CODON + (typeof mutations[nb_pos-1] === 'undefined' ? '' : mutations[nb_pos-1])
}
return mutations;
......
Markdown is supported
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