Hi,
I have a problem with Galaxy API.
I have a workflow defined like this:
I am trying to run a workflow using blend4j. Blend4j does not support invoke_workflow, show I am trying to run a workflow using this code:
String url = "myUrl";
String apiKey = "myAPI_Key";
final GalaxyInstance instance = GalaxyInstanceFactory.get(url, apiKey);
final WorkflowsClient workflowsClient = instance.getWorkflowsClient();
Workflow matchingWorkflow = null;
for(Workflow workflow : workflowsClient.getWorkflows()) {
if(workflow.getId().equals(id)) {
matchingWorkflow = workflow;
}
}
final WorkflowDetails workflowDetails = workflowsClient.showWorkflow(matchingWorkflow.getId());
for(final Map.Entry<String, WorkflowStepDefinition> stepDefinitionEntry : workflowDetails.getSteps().entrySet()) {
System.out.println(stepDefinitionEntry.getKey());
for(final Map.Entry<String, WorkflowStepDefinition.WorkflowStepOutput> inputSteps : stepDefinitionEntry.getValue().getInputSteps().entrySet()) {
System.out.println(inputSteps.getKey());
}
}
ArrayList<WorkflowInputDefinition> workflowInputDefinitionArrayList = new ArrayList<>();
for(final Map.Entry<String, WorkflowInputDefinition> inputEntry : workflowDetails.getInputs().entrySet()) {
workflowInputDefinitionArrayList.add(inputEntry.getValue());
}
final WorkflowInputs inputs = new WorkflowInputs();
inputs.setWorkflowId(id);
inputs.setStepParameter(5,"classname", "play");
inputs.setStepParameter(5,"dataset", "naiveBayes");
inputs.setStepParameter(5,"columns", "outlook,temperature,humidity,windy");
inputs.setStepParameter(5,"kfold", 3);
inputs.setStepParameter(6,"alpha", 0.1);
final WorkflowOutputs output = workflowsClient.runWorkflow(inputs);
return ResponseEntity.ok(output);
But I get null GalaxyResponse. Is there any way to run a workflow with step Parameters through blend4J?
If this is not possible, can I run it through python using Bioblend or using API calls?
Thank you very much.