Class GalaxyWorkflowService
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.pipeline.upload.galaxy.GalaxyWorkflowService
-
public class GalaxyWorkflowService extends java.lang.Object
Handles operating with workflows in Galaxy.
-
-
Constructor Summary
Constructors Constructor Description GalaxyWorkflowService(com.github.jmchilton.blend4j.galaxy.WorkflowsClient workflowsClient, java.nio.charset.Charset workflowCharset)
Constructs a new GalaxyWorkflowSubmitter with the given information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteWorkflow(java.lang.String workflowId)
Deletes a workflow with the given id.com.github.jmchilton.blend4j.galaxy.beans.WorkflowDetails
getWorkflowDetails(java.lang.String workflowId)
Gets details about a given workflow.java.lang.String
getWorkflowInputId(com.github.jmchilton.blend4j.galaxy.beans.WorkflowDetails workflowDetails, java.lang.String workflowInputLabel)
Given a WorkflowDetails an a workflowInputLabel find the corresponding id for this input.com.github.jmchilton.blend4j.galaxy.beans.WorkflowInvocationOutputs
runWorkflow(WorkflowInputsGalaxy inputs)
Attempts to run the workflow definined by the given WorkflowInputs object.java.lang.String
uploadGalaxyWorkflow(java.nio.file.Path workflowFile)
Uploads a workflow definined in the given file to Galaxy.
-
-
-
Constructor Detail
-
GalaxyWorkflowService
public GalaxyWorkflowService(com.github.jmchilton.blend4j.galaxy.WorkflowsClient workflowsClient, java.nio.charset.Charset workflowCharset)
Constructs a new GalaxyWorkflowSubmitter with the given information.- Parameters:
workflowsClient
- The WorkflowsClient used to connect to Galaxy workflows.workflowCharset
- TheCharset
to use for reading in workflows from files.
-
-
Method Detail
-
uploadGalaxyWorkflow
public java.lang.String uploadGalaxyWorkflow(java.nio.file.Path workflowFile) throws java.io.IOException, WorkflowUploadException
Uploads a workflow definined in the given file to Galaxy.- Parameters:
workflowFile
- The file to upload.- Returns:
- The id of the workflow in Galaxy.
- Throws:
java.io.IOException
- If there was an issue reading the file.WorkflowUploadException
- If there was an issue uploading the workflow to Galaxy.
-
getWorkflowInputId
public java.lang.String getWorkflowInputId(com.github.jmchilton.blend4j.galaxy.beans.WorkflowDetails workflowDetails, java.lang.String workflowInputLabel) throws WorkflowException
Given a WorkflowDetails an a workflowInputLabel find the corresponding id for this input.- Parameters:
workflowDetails
- The WorkflowDetails describing the workflow.workflowInputLabel
- The label defining the input to search for.- Returns:
- The id of the input corresponding to the passed label.
- Throws:
WorkflowException
- If no such input id could be found.
-
getWorkflowDetails
public com.github.jmchilton.blend4j.galaxy.beans.WorkflowDetails getWorkflowDetails(java.lang.String workflowId) throws WorkflowException
Gets details about a given workflow.- Parameters:
workflowId
- The id of the workflow.- Returns:
- A details object for this workflow.
- Throws:
WorkflowException
- If there was an issue getting the details of the workflow.
-
runWorkflow
public com.github.jmchilton.blend4j.galaxy.beans.WorkflowInvocationOutputs runWorkflow(WorkflowInputsGalaxy inputs) throws WorkflowException
Attempts to run the workflow definined by the given WorkflowInputs object.- Parameters:
inputs
- The inputs to the workflow.- Returns:
- A WorkflowOutputs object with information on output files in the workflow.
- Throws:
WorkflowException
- If there was an issue running the workflow.
-
deleteWorkflow
public void deleteWorkflow(java.lang.String workflowId) throws DeleteGalaxyObjectFailedException
Deletes a workflow with the given id.- Parameters:
workflowId
- The id of the workflow to delete.- Throws:
DeleteGalaxyObjectFailedException
- If there was an error while deleting the workflow.
-
-