Skip to content

Commit 10b15ef

Browse files
committed
Fixed issue #91 related to empty cluster names
1 parent 80cbba9 commit 10b15ef

File tree

1 file changed

+2
-1
lines changed
  • EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/autoannotate/model

1 file changed

+2
-1
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/autoannotate/model/Cluster.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ public String makeLabel(ArrayList<WordInfo> wordInfos, String mostCentralNodeLab
381381
WordInfo nextWord = biggestWord;
382382
wordInfosCopy.remove(0);
383383
for (WordInfo word : wordInfosCopy) {
384-
if (mostCentralNodeLabel.toLowerCase().contains(word.getWord())) {
384+
if (mostCentralNodeLabel != null && !mostCentralNodeLabel.equals("")
385+
&& mostCentralNodeLabel.toLowerCase().contains(word.getWord())) {
385386
word.setSize(word.getSize() + centralityBonus);
386387
}
387388
}

0 commit comments

Comments
 (0)