Skip to content

Commit

Permalink
fixed simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
ihh committed Mar 7, 2017
1 parent 1240fe4 commit 89c202d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
var rt = sim.assocs.relevantTerms()
if (sim.excludeAncestralTerms || sim.termAssociationCutoff)
rt = rt.filter (function (termIndex) {
return ontology.children[termIndex].length == 0
&& (typeof(sim.termAssociationCutoff) === 'undefined'
return (!sim.excludeAncestralTerms
|| ontology.children[termIndex].length == 0)
&& (!sim.termAssociationCutoff
|| sim.assocs.genesByTerm[termIndex].length < sim.termAssociationCutoff)
})
for (var i = 0; i < rt.length - 1; ++i) { // Fisher-Yates shuffle
Expand Down

0 comments on commit 89c202d

Please sign in to comment.