blend4php
v0.1
A PHP API for interacting with Galaxy
|
Public Member Functions | |
__construct (GalaxyInstance $galaxy) | |
index ($is_published=FALSE) | |
show ($workflow_id, $show_published=true) | |
delete ($workflow_id) | |
export ($workflow_id) | |
download ($workflow_id) | |
update ($workflow_id, $JSON_Workflow) | |
buildModule ($tool_id, $tool_input_ids=NULL, $tool_version=NULL, $annotation=NULL) | |
indexInvocations ($workflow_id) | |
showInvocations ($workflow_id, $invocation_id) | |
cancelInvocation ($workflow_id, $invocation_id) | |
invocationSteps ($workflow_id, $invocation_id, $step_id) | |
updateInvocationSteps ($workflow_id, $invocation_id, $step_id, $payload=array()) | |
invoke ($workflow_id, $input_dataset_ids, $parameters=NULL, $hist_id=NULL) | |
create ($params) | |
GalaxyWorkflows::__construct | ( | GalaxyInstance | $galaxy | ) |
The Workflows constructor.
GalaxyInstance | $galaxy | A GalaxyInstance object. |
GalaxyWorkflows::buildModule | ( | $tool_id, | |
$tool_input_ids = NULL , |
|||
$tool_version = NULL , |
|||
$annotation = NULL |
|||
) |
TODO incomplete
GalaxyWorkflows::cancelInvocation | ( | $workflow_id, | |
$invocation_id | |||
) |
Cancel an invocation request.
Corresponds to the Galaxy API/path at DELETE /api/workflows/{workflow_id}/invocation/{invocation_id}
$workflow_id | The id of the workflow that the invocation belongs to. To obtain a workflow invocation, please use this class's index() function. |
$invocation_id | The id of the invocation to invoke. |
GalaxyWorkflows::create | ( | $params | ) |
Creates or edits a workflow with the given parameters.
Corresponds to the Galaxy api/path at POST /api/workflows
$params | An associative array containing the input parameters for this function. The following parameters are available: |
If importing a JSON workflow:
If running workflow from pre-existing workflow:
If Creating / Running workflows from a History
GalaxyWorkflows::delete | ( | $workflow_id | ) |
Delete a specified workflow.
Corresponds to the Galaxy API/method at DELETE /api/workflows/{encoded_workflow_id}
$workflow_id | The id of the workflow to delete. To obtain a workflow id please use this class's index function. |
GalaxyWorkflows::download | ( | $workflow_id | ) |
Returns a selected workflow (using a filepath) to download.
It is similar to the export function except the returned array does not include a 'inputs' field.
Corresponds to the Galaxy API/path GET /api/workflows/{encoded_workflow_id}/download
$workflow_id | Id of the Workflow to retreive To obtain a workflow id, please use this class index() function. |
GalaxyWorkflows::export | ( | $workflow_id | ) |
Exports a workflow
$workflow_id | Encoded workflow ID. |
GalaxyWorkflows::index | ( | $is_published = FALSE | ) |
Retreive a list of all the workflows.
Corresponds to the Galaxy API/path at GET /api/workflows
$is_published | Optional, if true, published workflows will be displayed. |
GalaxyWorkflows::indexInvocations | ( | $workflow_id | ) |
Retreive a list of the workflow invocations for a given workflow.
Corresponds to the Galaxy API/path GET /api/workflows/{workflow_id}/invocations
$workflow_id | The id of the workflow whos invocations to retreive. |
GalaxyWorkflows::invocationSteps | ( | $workflow_id, | |
$invocation_id, | |||
$step_id | |||
) |
Returns the invocation steps for a workflow.
Corresponds to the Galaxy API/path at GET /api/workflows/{workflow_id}/invocation/{invocation_id}/steps/{step_id}
$workflow_id | The id of the workflow whos invocation steps to retreive. To obtain a workflow id, please use this class's index function. |
$invocation_id | The id of the invocation the step belongs to. To obtain an invocaiton id please use this class's indexInvocation function. |
$step_id | The id of the step to retreive. |
GalaxyWorkflows::invoke | ( | $workflow_id, | |
$input_dataset_ids, | |||
$parameters = NULL , |
|||
$hist_id = NULL |
|||
) |
Invokes (runs) a specified workflow.
Corresponds to the Galaxy API method/path at POST /api/workflows/{encoded_workflow_id}/invocations
If a $hist_id or $hist_name are not provided then a new history is created.
$workflow_id | The ID of the workflow to invoke. |
$input_dataset_ids | The list of id's of the datasets to enter into the workflow. These id's can be found using the dataset class's index() function. For right now the dataset must come from a history. Also The dataset 'state' must be 'ok and 'deleted' must be set to false. |
$parameters | Workflow tool parameters. |
$hist_id | Optional. The id of the history to export the results to. If a new history is not created. Leave this ommitted if a new history is to be created. |
GalaxyWorkflows::show | ( | $workflow_id, | |
$show_published = true |
|||
) |
Retreive detailed information about a specific workflow.
Corresponds to the Galaxy API/path at GET /api/workflows/{encoded_workflow_id}
$workflow_id | ||
show | $show_published | If true, show published workflows. |
GalaxyWorkflows::showInvocations | ( | $workflow_id, | |
$invocation_id | |||
) |
Retreive a detailed specific workflow invocation
Corresponds to the Galaxy API/path at GET /api/workflows/{workflow_id}/invocation/{invocation_id}
$workflow_id | The specified workflow of the invocation to show. To obtain a workflow id please use this class index function. |
$invocation_id | The id of the invocaiton. To obtain an invocation id, please use this class's index invocation function. |
GalaxyWorkflows::update | ( | $workflow_id, | |
$JSON_Workflow | |||
) |
Updates an existing workflow using a pre-built JSON object.
Corresponds to the Galaxy API method and path PUT /api/workflows/{encoded_workflow_id}
$workflow_id | The id of the workflow to update. You can obtain a workflow id through this class's index() function. |
$JSON_Workflow | The JSON representation of what the final workflow should look like, including the updates. |
GalaxyWorkflows::updateInvocationSteps | ( | $workflow_id, | |
$invocation_id, | |||
$step_id, | |||
$payload = array() |
|||
) |
Update state of running workflow step invocations.
Corresponds to the Galaxy API/path at PUT /api/workflows/{workflow_id}/invocation/{invocation_id}/steps/{step_id}
$workflow_id | The id of the workflow whos invocation steps to update. To obtain a workflow id, please use this class's index function. |
$invocation_id | The id of the invocation the step belongs to. To obtain an invocaiton id please use this class's indexInvocation function. |
$step_id | The id of the step to update. |
$payload | The workflow as a JSON object (in an array), containing any or all update fields for the workflow. |