Search in sources :

Example 1 with EMBuildCommandTask

use of org.baderlab.csplugins.enrichmentmap.commands.EMBuildCommandTask in project EnrichmentMapApp by BaderLab.

the class Protocol1Test method testProtocol1.

@Test
public void testProtocol1() throws Exception {
    EMBuildCommandTask task = injector.getInstance(EMBuildCommandTask.class);
    File enrichmentFile = TestUtils.createTempFile(PATH, "gprofiler_results_mesenonly_ordered_computedinR.txt");
    assertTrue(enrichmentFile.exists());
    task.analysisType.setSelectedValue(EnrichmentMapParameters.method_generic);
    task.coeffecients.setSelectedValue(EnrichmentMapParameters.SM_JACCARD);
    task.enrichmentsDataset1 = enrichmentFile;
    task.pvalue = 1.0;
    task.qvalue = 0.00001;
    task.similaritycutoff = 0.25;
    SerialTestTaskManager taskManager = new SerialTestTaskManager();
    taskManager.execute(new TaskIterator(task));
    // Assert the network was created
    CyNetwork generatedNetwork = assertAndGetOnlyNetwork();
    CyNetwork expectedNetwork = importNetworkFromFile(PATH, "protocol_1_expected.xgmml");
    Set<String> columnsToIgnore = ImmutableSet.of("EM1_ENR_SET", "EM1_ENRICHMENT_SET", "EM1_Data Set");
    assertNetworksEqual(expectedNetwork, generatedNetwork, columnsToIgnore);
}
Also used : SerialTestTaskManager(org.baderlab.csplugins.enrichmentmap.integration.SerialTestTaskManager) TaskIterator(org.cytoscape.work.TaskIterator) CyNetwork(org.cytoscape.model.CyNetwork) EMBuildCommandTask(org.baderlab.csplugins.enrichmentmap.commands.EMBuildCommandTask) File(java.io.File) BaseIntegrationTest(org.baderlab.csplugins.enrichmentmap.integration.BaseIntegrationTest) Test(org.junit.Test)

Aggregations

File (java.io.File)1 EMBuildCommandTask (org.baderlab.csplugins.enrichmentmap.commands.EMBuildCommandTask)1 BaseIntegrationTest (org.baderlab.csplugins.enrichmentmap.integration.BaseIntegrationTest)1 SerialTestTaskManager (org.baderlab.csplugins.enrichmentmap.integration.SerialTestTaskManager)1 CyNetwork (org.cytoscape.model.CyNetwork)1 TaskIterator (org.cytoscape.work.TaskIterator)1 Test (org.junit.Test)1