Search in sources :

Example 1 with AnalysisWorkspaceServiceGalaxy

use of ca.corefacility.bioinformatics.irida.service.analysis.workspace.galaxy.AnalysisWorkspaceServiceGalaxy in project irida by phac-nml.

the class AnalysisWorkspaceServiceGalaxyTest method setup.

/**
 * Sets up variables for testing.
 *
 * @throws IOException
 * @throws GalaxyDatasetException
 * @throws UploadException
 */
@Before
public void setup() throws IOException, UploadException, GalaxyDatasetException {
    MockitoAnnotations.initMocks(this);
    sFileA = new SequenceFile(createTempFile("fileA", "fastq"));
    sFileB = new SequenceFile(createTempFile("fileB", "fastq"));
    sFileC = new SequenceFile(createTempFile("fileC", "fastq"));
    sObjA = new SingleEndSequenceFile(sFileA);
    sObjB = new SingleEndSequenceFile(sFileB);
    sObjC = new SingleEndSequenceFile(sFileC);
    sequenceFilePair = new SequenceFilePair(sFileB, sFileC);
    singleEndSequenceFile = sObjA;
    Sample sampleA = new Sample();
    sampleA.setSampleName("SampleA");
    Sample sampleB = new Sample();
    sampleB.setSampleName("SampleB");
    Sample sampleC = new Sample();
    sampleC.setSampleName("SampleC");
    sampleSingleSequenceFileMap = ImmutableMap.of(sampleA, singleEndSequenceFile);
    sampleSequenceFilePairMap = ImmutableMap.of(sampleB, sequenceFilePair);
    sampleSequenceFilePairMapSampleA = ImmutableMap.of(sampleA, sequenceFilePair);
    refFile = createTempFile("reference", "fasta");
    referenceFile = new ReferenceFile(refFile);
    inputFiles = new HashSet<>();
    inputFiles.addAll(Arrays.asList(sObjA, sObjB, sObjC));
    submission = AnalysisSubmission.builder(workflowId).name("my analysis").inputFiles(inputFiles).referenceFile(referenceFile).build();
    workflowHistory = new History();
    workflowHistory.setId(HISTORY_ID);
    workflowLibrary = new Library();
    workflowLibrary.setId(LIBRARY_ID);
    workflowDetails = new WorkflowDetails();
    workflowDetails.setId(WORKFLOW_ID);
    workflowPreparation = new AnalysisWorkspaceServiceGalaxy(galaxyHistoriesService, galaxyWorkflowService, galaxyLibrariesService, iridaWorkflowsService, analysisCollectionServiceGalaxy, analysisProvenanceServiceGalaxy, analysisParameterServiceGalaxy, sequencingObjectService);
    output1Dataset = new Dataset();
    output1Dataset.setId("1");
    output1Dataset.setName("output1.txt");
    output2Dataset = new Dataset();
    output2Dataset.setId("2");
    output2Dataset.setName("output2.txt");
    collectionResponseSingle = new CollectionResponse();
    collectionResponseSingle.setId(COLLECTION_SINGLE_ID);
    collectionResponsePaired = new CollectionResponse();
    collectionResponsePaired.setId(COLLECTION_PAIRED_ID);
    singleInputFiles = Sets.newHashSet(singleEndSequenceFile);
    pairedInputFiles = Sets.newHashSet(sequenceFilePair);
}
Also used : SequenceFilePair(ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFilePair) ReferenceFile(ca.corefacility.bioinformatics.irida.model.project.ReferenceFile) AnalysisWorkspaceServiceGalaxy(ca.corefacility.bioinformatics.irida.service.analysis.workspace.galaxy.AnalysisWorkspaceServiceGalaxy) SequenceFile(ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFile) SingleEndSequenceFile(ca.corefacility.bioinformatics.irida.model.sequenceFile.SingleEndSequenceFile) Sample(ca.corefacility.bioinformatics.irida.model.sample.Sample) CollectionResponse(com.github.jmchilton.blend4j.galaxy.beans.collection.response.CollectionResponse) SingleEndSequenceFile(ca.corefacility.bioinformatics.irida.model.sequenceFile.SingleEndSequenceFile) Before(org.junit.Before)

Aggregations

ReferenceFile (ca.corefacility.bioinformatics.irida.model.project.ReferenceFile)1 Sample (ca.corefacility.bioinformatics.irida.model.sample.Sample)1 SequenceFile (ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFile)1 SequenceFilePair (ca.corefacility.bioinformatics.irida.model.sequenceFile.SequenceFilePair)1 SingleEndSequenceFile (ca.corefacility.bioinformatics.irida.model.sequenceFile.SingleEndSequenceFile)1 AnalysisWorkspaceServiceGalaxy (ca.corefacility.bioinformatics.irida.service.analysis.workspace.galaxy.AnalysisWorkspaceServiceGalaxy)1 CollectionResponse (com.github.jmchilton.blend4j.galaxy.beans.collection.response.CollectionResponse)1 Before (org.junit.Before)1