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);
}
Aggregations