Search in sources :

Example 1 with GalaxyWorkflowService

use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyWorkflowService in project irida by phac-nml.

the class GalaxyWorkflowsIT method setup.

/**
 * Sets up files and objects for workflow tests.
 * @throws URISyntaxException
 * @throws IOException
 */
@Before
public void setup() throws URISyntaxException, IOException {
    Assume.assumeFalse(WindowsPlatformCondition.isWindows());
    dataFile1 = Paths.get(GalaxyWorkflowsIT.class.getResource("testData1.fastq").toURI());
    dataFile2 = Paths.get(GalaxyWorkflowsIT.class.getResource("testData2.fastq").toURI());
    dataFile3 = Paths.get(GalaxyWorkflowsIT.class.getResource("testData3.fastq").toURI());
    dataFile4 = Paths.get(GalaxyWorkflowsIT.class.getResource("testData4.fastq").toURI());
    workflowPath = Paths.get(GalaxyWorkflowsIT.class.getResource("GalaxyWorkflowSingleInput.ga").toURI());
    invalidWorkflowPath = Paths.get(GalaxyWorkflowsIT.class.getResource("InvalidGalaxyWorkflowSingleInput.ga").toURI());
    dataFileNotExists = Files.createTempFile("temp", ".temp");
    Files.delete(dataFileNotExists);
    assertFalse(Files.exists(dataFileNotExists));
    galaxyAdminInstance = localGalaxy.getGalaxyInstanceAdmin();
    toolsClient = galaxyAdminInstance.getToolsClient();
    workflowsClient = galaxyAdminInstance.getWorkflowsClient();
    historiesClient = galaxyAdminInstance.getHistoriesClient();
    librariesClient = galaxyAdminInstance.getLibrariesClient();
    GalaxyLibrariesService galaxyLibrariesService = new GalaxyLibrariesService(librariesClient, LIBRARY_POLLING_TIME, LIBRARY_TIMEOUT, 1);
    galaxyHistory = new GalaxyHistoriesService(historiesClient, toolsClient, galaxyLibrariesService);
    galaxyWorkflowService = new GalaxyWorkflowService(workflowsClient, StandardCharsets.UTF_8);
}
Also used : GalaxyHistoriesService(ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyHistoriesService) GalaxyWorkflowService(ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyWorkflowService) GalaxyLibrariesService(ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService) Before(org.junit.Before)

Example 2 with GalaxyWorkflowService

use of ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyWorkflowService in project irida by phac-nml.

the class GalaxyWorkflowServiceTest method setup.

/**
 * Sets up variables for workflow tests.
 * @throws URISyntaxException
 */
@Before
public void setup() throws URISyntaxException {
    MockitoAnnotations.initMocks(this);
    galaxyWorkflowService = new GalaxyWorkflowService(workflowsClient, StandardCharsets.UTF_8);
    String workflowInputId = "1";
    WorkflowInputDefinition worklowInput = new WorkflowInputDefinition();
    worklowInput.setLabel(VALID_INPUT_LABEL);
    workflowInputs = new HashMap<String, WorkflowInputDefinition>();
    workflowInputs.put(workflowInputId, worklowInput);
    when(workflowsClient.showWorkflow(VALID_WORKFLOW_ID)).thenReturn(workflowDetails);
    when(workflowDetails.getInputs()).thenReturn(workflowInputs);
}
Also used : WorkflowInputDefinition(com.github.jmchilton.blend4j.galaxy.beans.WorkflowInputDefinition) GalaxyWorkflowService(ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyWorkflowService) Before(org.junit.Before)

Aggregations

GalaxyWorkflowService (ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyWorkflowService)2 Before (org.junit.Before)2 GalaxyHistoriesService (ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyHistoriesService)1 GalaxyLibrariesService (ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyLibrariesService)1 WorkflowInputDefinition (com.github.jmchilton.blend4j.galaxy.beans.WorkflowInputDefinition)1