use of com.github.jmchilton.blend4j.galaxy.beans.Dataset in project irida by phac-nml.
the class AnalysisWorkspaceServiceGalaxy method prepareReferenceFile.
/**
* Prepares a reference file for input to the workflow.
*
* @param referenceFile
* The {@link ReferenceFile} for the workflow.
* @param workflowHistory
* The {@link History} for the workflow.
* @param referenceFileLabel
* The label for the reference file in the workflow.
* @param workflowDetails
* The {@link WorkflowDetails} for the workflow.
* @param inputs
* The {@link WorkflowInputs} object used to setup inputs for the
* workflow.
* @throws UploadException
* If there's an exception when uploading files to the workflow
* engine.
* @throws GalaxyDatasetException
* If there's an exception with Galaxy datasets.
* @throws WorkflowException
* If there's an exception with workflow methods.
*/
private void prepareReferenceFile(ReferenceFile referenceFile, History workflowHistory, String referenceFileLabel, WorkflowDetails workflowDetails, WorkflowInputs inputs) throws UploadException, GalaxyDatasetException, WorkflowException {
Dataset referenceDataset = galaxyHistoriesService.fileToHistory(referenceFile.getFile(), InputFileType.FASTA, workflowHistory);
String workflowReferenceFileInputId = galaxyWorkflowService.getWorkflowInputId(workflowDetails, referenceFileLabel);
inputs.setInput(workflowReferenceFileInputId, new WorkflowInputs.WorkflowInput(referenceDataset.getId(), WorkflowInputs.InputSourceType.HDA));
}
Aggregations