use of org.baderlab.csplugins.enrichmentmap.model.GenericResult in project EnrichmentMapApp by BaderLab.
the class CreateGMTEnrichmentMapTask method buildEnrichmentMap.
public void buildEnrichmentMap() {
dataset.setMethod(Method.Generic);
// in this case all the genesets are of interest
dataset.setGeneSetsOfInterest(dataset.getSetOfGeneSets());
Map<String, GeneSet> currentSets = dataset.getSetOfGeneSets().getGeneSets();
// create an new Set of Enrichment Results
SetOfEnrichmentResults setOfEnrichments = new SetOfEnrichmentResults();
Map<String, EnrichmentResult> currentEnrichments = setOfEnrichments.getEnrichments();
// need also to put all genesets into enrichment results
for (Iterator<String> i = currentSets.keySet().iterator(); i.hasNext(); ) {
String geneset1Name = i.next();
GeneSet gs = currentSets.get(geneset1Name);
GenericResult tempResult = new GenericResult(gs.getName(), gs.getDescription(), 0.01, gs.getGenes().size());
currentEnrichments.put(gs.getName(), tempResult);
}
dataset.setEnrichments(setOfEnrichments);
}
Aggregations