Search in sources :

Example 31 with DataSetFiles

use of org.baderlab.csplugins.enrichmentmap.model.DataSetFiles in project EnrichmentMapApp by BaderLab.

the class MasterDetailDialogPage method addNewDataSetToList.

private void addNewDataSetToList() {
    int n = dataSetListModel.size();
    DataSetParameters params = new DataSetParameters("Data Set " + n, Method.GSEA, new DataSetFiles());
    addDataSetToList(params);
}
Also used : DataSetParameters(org.baderlab.csplugins.enrichmentmap.resolver.DataSetParameters) DataSetFiles(org.baderlab.csplugins.enrichmentmap.model.DataSetFiles)

Example 32 with DataSetFiles

use of org.baderlab.csplugins.enrichmentmap.model.DataSetFiles in project EnrichmentMapApp by BaderLab.

the class EMGseaCommandTask method buildEnrichmentMap.

private void buildEnrichmentMap() {
    //set all files as extracted from the edb directory
    List<DataSetParameters> dataSets = new ArrayList<>(2);
    DataSetFiles files1 = initializeFiles(edbdir, expressionfile);
    dataSets.add(new DataSetParameters(LegacySupport.DATASET1, Method.GSEA, files1));
    //only add second dataset if there is a second edb directory.
    if (edbdir2 != null && !edbdir2.equalsIgnoreCase("")) {
        DataSetFiles files2 = initializeFiles(edbdir2, expressionfile2);
        dataSets.add(new DataSetParameters(LegacySupport.DATASET2, Method.GSEA, files2));
    }
    SimilarityMetric metric = EnrichmentMapParameters.stringToSimilarityMetric(similaritymetric.getSelectedValue());
    String prefix = legacySupport.getNextAttributePrefix();
    EMCreationParameters creationParams = new EMCreationParameters(prefix, pvalue, qvalue, NESFilter.ALL, Optional.empty(), metric, overlap, combinedconstant);
    CreateEnrichmentMapTaskFactory taskFactory = taskFactoryFactory.create(creationParams, dataSets);
    insertTasksAfterCurrentTask(taskFactory.createTaskIterator());
}
Also used : EMCreationParameters(org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters) CreateEnrichmentMapTaskFactory(org.baderlab.csplugins.enrichmentmap.task.CreateEnrichmentMapTaskFactory) DataSetParameters(org.baderlab.csplugins.enrichmentmap.resolver.DataSetParameters) ArrayList(java.util.ArrayList) SimilarityMetric(org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters.SimilarityMetric) DataSetFiles(org.baderlab.csplugins.enrichmentmap.model.DataSetFiles)

Example 33 with DataSetFiles

use of org.baderlab.csplugins.enrichmentmap.model.DataSetFiles in project EnrichmentMapApp by BaderLab.

the class HeatMapRanksTest method setUp.

@Before
public void setUp(EnrichmentMapManager emManager) {
    DataSetFiles files = new DataSetFiles();
    files.setGMTFileName(PATH + "Human_GO_AllPathways_no_GO_iea_April_15_2013_symbol.gmt");
    files.setExpressionFileName(PATH + "MCF7_ExprMx_v2_names.gct");
    files.setEnrichmentFileName1(PATH + "gsea_report_for_ES12_1473194913081.xls");
    files.setEnrichmentFileName2(PATH + "gsea_report_for_NT12_1473194913081.xls");
    files.setRankedFile(PATH + "ranked_gene_list_ES12_versus_NT12_1473194913081.xls");
    files.setClassFile(PATH + "ES_NT.cls");
    EMCreationParameters params = new EMCreationParameters("HeatMapRanks_", 0.005, 0.1, NESFilter.ALL, Optional.empty(), SimilarityMetric.OVERLAP, 0.5, 0.5);
    Map<Long, EnrichmentMap> maps = emManager.getAllEnrichmentMaps();
    assertEquals(0, maps.size());
    buildEnrichmentMap(params, files, Method.GSEA, LegacySupport.DATASET1);
    maps = emManager.getAllEnrichmentMaps();
    assertEquals(1, maps.size());
}
Also used : EMCreationParameters(org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters) EnrichmentMap(org.baderlab.csplugins.enrichmentmap.model.EnrichmentMap) DataSetFiles(org.baderlab.csplugins.enrichmentmap.model.DataSetFiles) Before(org.junit.Before)

Aggregations

DataSetFiles (org.baderlab.csplugins.enrichmentmap.model.DataSetFiles)33 EnrichmentMap (org.baderlab.csplugins.enrichmentmap.model.EnrichmentMap)21 Test (org.junit.Test)21 EMDataSet (org.baderlab.csplugins.enrichmentmap.model.EMDataSet)20 EMCreationParameters (org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters)14 Method (org.baderlab.csplugins.enrichmentmap.model.EMDataSet.Method)14 EnrichmentMapParameters (org.baderlab.csplugins.enrichmentmap.model.EnrichmentMapParameters)11 Map (java.util.Map)6 EnrichmentResult (org.baderlab.csplugins.enrichmentmap.model.EnrichmentResult)6 DataSetParameters (org.baderlab.csplugins.enrichmentmap.resolver.DataSetParameters)5 CyNetwork (org.cytoscape.model.CyNetwork)5 GMTFileReaderTask (org.baderlab.csplugins.enrichmentmap.parsers.GMTFileReaderTask)4 Baton (org.baderlab.csplugins.enrichmentmap.util.Baton)4 ArrayList (java.util.ArrayList)3 ExpressionFileReaderTask (org.baderlab.csplugins.enrichmentmap.parsers.ExpressionFileReaderTask)3 File (java.io.File)2 Path (java.nio.file.Path)2 HashMap (java.util.HashMap)2 BaseIntegrationTest (org.baderlab.csplugins.enrichmentmap.integration.BaseIntegrationTest)2 SimilarityMetric (org.baderlab.csplugins.enrichmentmap.model.EMCreationParameters.SimilarityMetric)2