Skip to content

Commit cc1f2db

Browse files
committed
Fix 'enrichmentmap build' command bogus second dataset
1 parent 575a765 commit cc1f2db

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/commands/EMBuildCommandTask.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ private DataSetFiles getDataSet2Files() {
183183
return dataset2files;
184184
}
185185

186+
187+
private boolean is2DataSet() {
188+
return expressionDataset2 != null || enrichmentsDataset2 != null || enrichments2Dataset2 != null;
189+
}
190+
186191

187192
@Override
188193
public void run(TaskMonitor tm) {
@@ -192,8 +197,8 @@ public void run(TaskMonitor tm) {
192197
DataSetFiles dataset1files = getDataSet1Files();
193198
dataSets.add(new DataSetParameters(LegacySupport.DATASET1, method, dataset1files));
194199

195-
DataSetFiles dataset2files = getDataSet2Files();
196-
if(!dataset2files.isEmpty()) {
200+
if(is2DataSet()) {
201+
DataSetFiles dataset2files = getDataSet2Files();
197202
dataSets.add(new DataSetParameters(LegacySupport.DATASET2, method, dataset2files));
198203
}
199204

EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/model/DataSetFiles.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,4 @@ public void copy(DataSetFiles copy) {
114114
this.phenotype2 = copy.getPhenotype2();
115115
}
116116

117-
118-
public boolean isEmpty() {
119-
if(this.GMTFileName != null && !this.GMTFileName.equalsIgnoreCase(""))
120-
return false;
121-
if(this.expressionFileName != null && !this.expressionFileName.equalsIgnoreCase(""))
122-
return false;
123-
if(this.enrichmentFileName1 != null && !this.enrichmentFileName1.equalsIgnoreCase(""))
124-
return false;
125-
if(this.enrichmentFileName2 != null && !this.enrichmentFileName2.equalsIgnoreCase(""))
126-
return false;
127-
return true;
128-
}
129117
}

0 commit comments

Comments
 (0)