use of org.baderlab.csplugins.enrichmentmap.task.CreateGMTEnrichmentMapTask in project EnrichmentMapApp by BaderLab.
the class DetermineEnrichmentResultFileReader method getParsers.
/**
* Parse Enrichment results file
*/
public TaskIterator getParsers() {
String enrichmentsFileName1 = dataset.getEnrichments().getFilename1();
String enrichmentsFileName2 = dataset.getEnrichments().getFilename2();
TaskIterator parserTasks = new TaskIterator();
try {
if (!Strings.isNullOrEmpty(enrichmentsFileName1)) {
AbstractTask current = readFile(enrichmentsFileName1);
if (current instanceof ParseGREATEnrichmentResults)
parserTasks.append(new GREATWhichPvalueQuestionTask(dataset.getMap()));
parserTasks.append(current);
}
if (!Strings.isNullOrEmpty(enrichmentsFileName2)) {
parserTasks.append(readFile(enrichmentsFileName2));
}
//If both of the enrichment files are null then we want to default to building a gmt file only build
if (Strings.isNullOrEmpty(enrichmentsFileName1) && Strings.isNullOrEmpty(enrichmentsFileName2)) {
parserTasks.append(new CreateGMTEnrichmentMapTask(dataset));
}
} catch (IOException e) {
e.printStackTrace();
}
return parserTasks;
}
Aggregations