use of org.baderlab.csplugins.enrichmentmap.integration.SerialTestTaskManager in project EnrichmentMapApp by BaderLab.
the class CreateEnrichmentMapTaskTest method buildEnrichmentMap.
protected void buildEnrichmentMap(EMCreationParameters params, DataSetFiles datasetFiles, String datasetName) {
List<DataSetParameters> dataSets = Arrays.asList(new DataSetParameters(datasetName, Method.Generic, datasetFiles));
CreateEnrichmentMapTaskFactory.Factory masterMapTaskFactoryFactory = injector.getInstance(CreateEnrichmentMapTaskFactory.Factory.class);
CreateEnrichmentMapTaskFactory taskFactory = masterMapTaskFactoryFactory.create(params, dataSets);
TaskIterator taskIterator = taskFactory.createTaskIterator();
SerialTestTaskManager taskManager = new SerialTestTaskManager();
taskManager.execute(taskIterator);
}
use of org.baderlab.csplugins.enrichmentmap.integration.SerialTestTaskManager in project EnrichmentMapApp by BaderLab.
the class LegacySessionLoadTest method loadSessionFile.
@Before
public void loadSessionFile() throws Exception {
java.lang.reflect.Method testMethod = getClass().getMethod(testName.getMethodName());
SessionFile annotation = testMethod.getAnnotation(SessionFile.class);
String fileName = annotation.value();
assertNotNull(fileName);
assertNotNull(openSessionTF);
File sessionFile = TestUtils.createTempFile(PATH, fileName);
TaskIterator tasks = openSessionTF.createTaskIterator(sessionFile);
SerialTestTaskManager taskManager = new SerialTestTaskManager();
taskManager.execute(tasks);
}
use of org.baderlab.csplugins.enrichmentmap.integration.SerialTestTaskManager 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);
}
Aggregations