Skip to content

Commit 8a200cf

Browse files
committed
Avoid NoDataException from mann whitney test
1 parent 2f8db6f commit 8a200cf

File tree

1 file changed

+4
-0
lines changed
  • EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/task/postanalysis

1 file changed

+4
-0
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/task/postanalysis/FilterMetric.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ public double computeValue(Set<Integer> geneSet, Set<Integer> sigSet, @Nullable
263263
overlapGeneScores = Arrays.copyOf(overlapGeneScores, j);
264264
double[] scores = ranks.getScores();
265265

266+
if(overlapGeneScores.length == 0 || scores.length == 0) {
267+
return 1.0; // avoid NoDataException
268+
}
269+
266270
if(similarity == null) {
267271
MannWhitneyUTestSided mann_whit = new MannWhitneyUTestSided();
268272
return mann_whit.mannWhitneyUTest(overlapGeneScores, scores, type.mannWhitneyTestType());

0 commit comments

Comments
 (0)