Commit 7ec38dd6 authored by Vidjil Team's avatar Vidjil Team Committed by Mathieu Giraud
Browse files

model.js: Switch test that doesn't depend on for loop

It is more efficient to test it outside the loop rather than inside.

Commit performed in trio-programming: @tydax @RyanHerb @mikael-s
parent 59d52948
......@@ -1076,8 +1076,8 @@ changeCloneNotation: function(cloneNotationType) {
// compute size for each germlines of newOthers
lenSA = this.system_available.length;
for (var pos = 0; pos < this.clones.length - lenSA; pos++) {
for (var sample = 0; sample < this.samples.number ; sample++) {
if (this.clone(pos).isActive()) {
if (this.clone(pos).isActive()) {
for (var sample = 0; sample < this.samples.number ; sample++) {
for (var k = 0; k < this.clusters[pos].length; k++) {
if (this.clusters[pos][k] != this.clones.length - lenSA) {
newOthers[this.clone(pos).germline][sample] -= this.clone(this.clusters[pos][k]).get('reads', sample);}
......
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