Search in sources :

Example 11 with IridaWorkflowDescription

use of ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription in project irida by phac-nml.

the class TestDataFactory method getIridaWorkflow.

public static IridaWorkflow getIridaWorkflow(UUID id) {
    IridaWorkflowInput input = new IridaWorkflowInput();
    List<IridaWorkflowOutput> outputs = ImmutableList.of(new IridaWorkflowOutput());
    List<IridaWorkflowToolRepository> tools = ImmutableList.of();
    List<IridaWorkflowParameter> parameters = ImmutableList.of();
    IridaWorkflowDescription description = new IridaWorkflowDescription(id, "My Workflow", "V1", AnalysisType.DEFAULT, input, outputs, tools, parameters);
    IridaWorkflowStructure structure = new IridaWorkflowStructure(null);
    return new IridaWorkflow(description, structure);
}
Also used : IridaWorkflowOutput(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowOutput) IridaWorkflowInput(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowInput) IridaWorkflowParameter(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowParameter) IridaWorkflow(ca.corefacility.bioinformatics.irida.model.workflow.IridaWorkflow) IridaWorkflowDescription(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription) IridaWorkflowStructure(ca.corefacility.bioinformatics.irida.model.workflow.structure.IridaWorkflowStructure) IridaWorkflowToolRepository(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowToolRepository)

Example 12 with IridaWorkflowDescription

use of ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription in project irida by phac-nml.

the class IridaWorkflowLoaderServiceIT method testLoadWorkflowDescriptionRequiresSingleSampleUnset.

/**
 * Tests loading up the workflow description file that has no requires single sample parameter set.
 *
 * @throws IOException
 * @throws IridaWorkflowLoadException
 */
@Test
public void testLoadWorkflowDescriptionRequiresSingleSampleUnset() throws IOException, IridaWorkflowLoadException {
    IridaWorkflowDescription iridaWorkflowDescription = buildTestDescriptionRequiresSingleSampleUnset();
    IridaWorkflowDescription iridaWorkflowFromFile = workflowLoaderService.loadWorkflowDescription(workflowRequiresSingleSampleUnsetXmlPath);
    assertEquals("irida workflow description is invalid", iridaWorkflowFromFile, iridaWorkflowDescription);
}
Also used : IridaWorkflowDescription(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription) Test(org.junit.Test)

Example 13 with IridaWorkflowDescription

use of ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription in project irida by phac-nml.

the class IridaWorkflowLoaderServiceIT method buildTestDescription.

private IridaWorkflowDescription buildTestDescription(UUID id, String name, String version, String sequenceReadsSingle, String sequenceReadsPaired, boolean requiresSingleSample) throws MalformedURLException {
    List<IridaWorkflowOutput> outputs = new LinkedList<>();
    outputs.add(new IridaWorkflowOutput("output1", "output1.txt"));
    outputs.add(new IridaWorkflowOutput("output2", "output2.txt"));
    List<IridaWorkflowToolRepository> tools = new LinkedList<>();
    IridaWorkflowToolRepository workflowTool = new IridaWorkflowToolRepository("sam_to_bam", "devteam", new URL("http://toolshed.g2.bx.psu.edu/"), "8176b2575aa1");
    tools.add(workflowTool);
    List<IridaWorkflowParameter> parameters = new LinkedList<>();
    IridaToolParameter tool1 = new IridaToolParameter("irida.corefacility.ca/galaxy-shed/repos/irida/test-tool/0.1", "a");
    IridaToolParameter tool2 = new IridaToolParameter("irida.corefacility.ca/galaxy-shed/repos/irida/test-tool/0.1", "b");
    IridaWorkflowParameter parameter1 = new IridaWorkflowParameter("test-parameter", "1", Lists.newArrayList(tool1, tool2));
    parameters.add(parameter1);
    IridaWorkflowDescription iridaWorkflow = new IridaWorkflowDescription(id, name, version, AnalysisType.DEFAULT, new IridaWorkflowInput(sequenceReadsSingle, sequenceReadsPaired, "reference", requiresSingleSample), outputs, tools, parameters);
    return iridaWorkflow;
}
Also used : IridaWorkflowOutput(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowOutput) IridaWorkflowParameter(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowParameter) IridaWorkflowInput(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowInput) IridaToolParameter(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaToolParameter) IridaWorkflowDescription(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription) LinkedList(java.util.LinkedList) IridaWorkflowToolRepository(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowToolRepository) URL(java.net.URL)

Example 14 with IridaWorkflowDescription

use of ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription in project irida by phac-nml.

the class IridaWorkflowLoaderServiceIT method testLoadWorkflowDescriptionNotRequiresSingleSample.

/**
 * Tests loading up the workflow description file that does not require a single sample.
 *
 * @throws IOException
 * @throws IridaWorkflowLoadException
 */
@Test
public void testLoadWorkflowDescriptionNotRequiresSingleSample() throws IOException, IridaWorkflowLoadException {
    IridaWorkflowDescription iridaWorkflowDescription = buildTestDescriptionNotRequiresSingleSample();
    IridaWorkflowDescription iridaWorkflowFromFile = workflowLoaderService.loadWorkflowDescription(workflowNotRequiresSingleSampleXmlPath);
    assertEquals("irida workflow description is invalid", iridaWorkflowFromFile, iridaWorkflowDescription);
}
Also used : IridaWorkflowDescription(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription) Test(org.junit.Test)

Example 15 with IridaWorkflowDescription

use of ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription in project irida by phac-nml.

the class IridaWorkflowLoaderServiceIT method testLoadWorkflowDescriptionSingle.

/**
 * Tests loading up the workflow description file (single end data).
 *
 * @throws IOException
 * @throws IridaWorkflowLoadException
 */
@Test
public void testLoadWorkflowDescriptionSingle() throws IOException, IridaWorkflowLoadException {
    IridaWorkflowDescription iridaWorkflowDescription = buildTestDescriptionSingle();
    IridaWorkflowDescription iridaWorkflowFromFile = workflowLoaderService.loadWorkflowDescription(workflowSingleXmlPath);
    assertEquals("irida workflow description is invalid", iridaWorkflowFromFile, iridaWorkflowDescription);
}
Also used : IridaWorkflowDescription(ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription) Test(org.junit.Test)

Aggregations

IridaWorkflowDescription (ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowDescription)22 Test (org.junit.Test)10 IridaWorkflow (ca.corefacility.bioinformatics.irida.model.workflow.IridaWorkflow)8 IridaWorkflowInput (ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowInput)5 IridaWorkflowParameter (ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowParameter)5 AnalysisSubmission (ca.corefacility.bioinformatics.irida.model.workflow.submission.AnalysisSubmission)5 IridaWorkflowNotFoundException (ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowNotFoundException)4 Project (ca.corefacility.bioinformatics.irida.model.project.Project)4 ImmutableMap (com.google.common.collect.ImmutableMap)4 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)4 IridaWorkflowParameterException (ca.corefacility.bioinformatics.irida.exceptions.IridaWorkflowParameterException)3 ReferenceFile (ca.corefacility.bioinformatics.irida.model.project.ReferenceFile)3 IridaWorkflowOutput (ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowOutput)3 IridaWorkflowToolRepository (ca.corefacility.bioinformatics.irida.model.workflow.description.IridaWorkflowToolRepository)3 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 Map (java.util.Map)3 DuplicateSampleException (ca.corefacility.bioinformatics.irida.exceptions.DuplicateSampleException)2 AnalysisType (ca.corefacility.bioinformatics.irida.model.enums.AnalysisType)2 Sample (ca.corefacility.bioinformatics.irida.model.sample.Sample)2