Commit bf9f517c authored by Mathieu Giraud's avatar Mathieu Giraud

tests: get_mutations, keep previous tests, without end codons

parent aba08aca
......@@ -1299,7 +1299,7 @@ genSeq.prototype= {
ref = this.segmenter.sequence[this.segmenter.first_clone].seq;
}
if (this.segmenter.aligned) {
mutations = get_mutations(ref, seq, reference_phase);
mutations = get_mutations(ref, seq, reference_phase, true);
}
var i_am_first_clone = (this.id == this.segmenter.first_clone)
......
......@@ -87,7 +87,7 @@ function get_codons(ref, seq, frame) {
* @return a dictionary whose keys are positions of mutations / end of codons in the alignment
* and whose values are a combinations of SUBST/SILENT/INS/DEL/END_CODON
*/
function get_mutations(ref, seq, frame) {
function get_mutations(ref, seq, frame, with_end_codon) {
var codons = get_codons(ref, seq, frame);
var mutations = {};
var nb_pos = 0;
......@@ -128,7 +128,8 @@ function get_mutations(ref, seq, frame) {
}
nb_pos++;
}
mutations[nb_pos-1] = END_CODON + (typeof mutations[nb_pos-1] === 'undefined' ? '' : mutations[nb_pos-1])
if (typeof with_end_codon !== undefined && with_end_codon)
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