Search in sources :

Example 6 with GenericResult

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);
}
Also used : EnrichmentResult(org.baderlab.csplugins.enrichmentmap.model.EnrichmentResult) GeneSet(org.baderlab.csplugins.enrichmentmap.model.GeneSet) SetOfEnrichmentResults(org.baderlab.csplugins.enrichmentmap.model.SetOfEnrichmentResults) GenericResult(org.baderlab.csplugins.enrichmentmap.model.GenericResult)

Aggregations

EnrichmentResult (org.baderlab.csplugins.enrichmentmap.model.EnrichmentResult)6 GenericResult (org.baderlab.csplugins.enrichmentmap.model.GenericResult)6 GeneSet (org.baderlab.csplugins.enrichmentmap.model.GeneSet)5 ImmutableSet (com.google.common.collect.ImmutableSet)4 EnrichmentMap (org.baderlab.csplugins.enrichmentmap.model.EnrichmentMap)4 NullTaskMonitor (org.baderlab.csplugins.enrichmentmap.util.NullTaskMonitor)4 SetOfEnrichmentResults (org.baderlab.csplugins.enrichmentmap.model.SetOfEnrichmentResults)2 HashMap (java.util.HashMap)1 Set (java.util.Set)1 EMCreationParameters (org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters)1 GreatFilter (org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters.GreatFilter)1 EMDataSet (org.baderlab.csplugins.enrichmentmap.model.EMDataSet)1 GSEAResult (org.baderlab.csplugins.enrichmentmap.model.GSEAResult)1 CyNode (org.cytoscape.model.CyNode)1 CyRow (org.cytoscape.model.CyRow)1