workflow Package¶
modules
Module¶
Modules used in building workflows
-
class
galaxy.workflow.modules.
InputDataCollectionModule
(trans)[source]¶ Bases:
galaxy.workflow.modules.InputModule
-
collection_type
= 'list'¶
-
default_collection_type
= 'list'¶
-
default_name
= 'Input Dataset Collection'¶
-
name
= 'Input dataset collection'¶
-
state_fields
= ['name', 'collection_type']¶
-
type
= 'data_collection_input'¶
-
-
class
galaxy.workflow.modules.
InputDataModule
(trans)[source]¶ Bases:
galaxy.workflow.modules.InputModule
-
default_name
= 'Input Dataset'¶
-
name
= 'Input dataset'¶
-
state_fields
= ['name']¶
-
type
= 'data_input'¶
-
-
exception
galaxy.workflow.modules.
MissingToolException
[source]¶ Bases:
exceptions.Exception
WorkflowModuleInjector will raise this if the tool corresponding to the module is missing.
-
class
galaxy.workflow.modules.
PauseModule
(trans)[source]¶ Bases:
galaxy.workflow.modules.SimpleWorkflowModule
Initially this module will unconditionally pause a workflow - will aim to allow conditional pausing later on.
-
default_name
= 'Pause for Dataset Review'¶
-
do_invocation_step_action
(step, action)[source]¶ Update or set the workflow invocation state action - generic extension point meant to allows users to interact with interactive workflow modules. The action object returned from this method will be attached to the WorkflowInvocationStep and be available the next time the workflow scheduler visits the workflow.
-
name
= 'Pause for dataset review'¶
-
state_fields
= ['name']¶
-
type
= 'pause'¶
-
-
class
galaxy.workflow.modules.
SimpleWorkflowModule
(trans)[source]¶ Bases:
galaxy.workflow.modules.WorkflowModule
-
classmethod
default_state
(Class)[source]¶ This method should return a dictionary describing each configuration property and its default value.
-
recover_runtime_state
(runtime_state)[source]¶ Take secure runtime state from persisted invocation and convert it into a DefaultToolState object for use during workflow invocation.
-
classmethod
-
class
galaxy.workflow.modules.
ToolModule
(trans, tool_id, tool_version=None)[source]¶ Bases:
galaxy.workflow.modules.WorkflowModule
-
recover_runtime_state
(runtime_state)[source]¶ Take secure runtime state from persisted invocation and convert it into a DefaultToolState object for use during workflow invocation.
-
recover_state
(state, **kwds)[source]¶ Recover module configuration state property (a DefaultToolState object) using the tool’s params_from_strings method.
-
type
= 'tool'¶
-
-
class
galaxy.workflow.modules.
WorkflowModule
(trans)[source]¶ Bases:
object
-
check_and_update_state
()[source]¶ If the state is not in sync with the current implementation of the module, try to update. Returns a list of messages to be displayed
-
compute_runtime_state
(trans, step_updates=None, source='html')[source]¶ Determine the runtime state (potentially different from self.state which describes configuration state). This (again unlike self.state) is currently always a DefaultToolState object.
If step_updates is None, this is likely for rendering the run form for instance and no runtime properties are available and state must be solely determined by the default runtime state described by the step.
If step_updates are available they describe the runtime properties supplied by the workflow runner (potentially including a tool_state parameter which is the serialized default encoding state created with encode_runtime_state above).
-
do_invocation_step_action
(step, action)[source]¶ Update or set the workflow invocation state action - generic extension point meant to allows users to interact with interactive workflow modules. The action object returned from this method will be attached to the WorkflowInvocationStep and be available the next time the workflow scheduler visits the workflow.
-
encode_runtime_state
(trans, state)[source]¶ Encode the default runtime state at return as a simple str for use in a hidden parameter on the workflow run submission form.
This default runtime state will be combined with user supplied parameters in compute_runtime_state below at workflow invocation time to actually describe how each step will be executed.
-
execute
(trans, progress, invocation, step)[source]¶ Execute the given workflow step in the given workflow invocation. Use the supplied workflow progress object to track outputs, find inputs, etc...
-
classmethod
from_dict
(Class, trans, d)[source]¶ Create a new instance of the module initialized from values in the dictionary d.
-
get_config_form
()[source]¶ Render form that is embedded in workflow editor for modifying the step state of a node.
-
get_errors
()[source]¶ It seems like this is effectively just used as boolean - some places in the tool shed self.errors is set to boolean, other places ‘unavailable’, likewise in Galaxy it stores a list containing a string with an unrecognized tool id error message.
-
get_runtime_input_dicts
(step_annotation)[source]¶ Get runtime inputs (inputs and parameters) as simple dictionary.
-
get_runtime_inputs
()[source]¶ Used internally by modules and when displaying inputs in workflow editor and run workflow templates.
Note: The ToolModule doesn’t implement this and these templates contain specialized logic for dealing with the tool and state directly in the case of ToolModules.
-
get_state
()[source]¶ Return a serializable representation of the persistable state of the step - for tools it DefaultToolState.encode returns a string and for simpler module types a json description is dumped out.
-
classmethod
new
(Class, trans, tool_id=None)[source]¶ Create a new instance of the module with default state
-
-
class
galaxy.workflow.modules.
WorkflowModuleFactory
(module_types)[source]¶ Bases:
object
-
class
galaxy.workflow.modules.
WorkflowModuleInjector
(trans)[source]¶ Bases:
object
Injects workflow step objects from the ORM with appropriate module and module generated/influenced state.
-
inject
(step, step_args=None, source='html')[source]¶ Pre-condition: step is an ORM object coming from the database, if supplied step_args is the representation of the inputs for that step supplied via web form.
Post-condition: The supplied step has new non-persistent attributes useful during workflow invocation. These include ‘upgrade_messages’, ‘state’, ‘input_connections_by_name’, and ‘module’.
If step_args is provided from a web form this is applied to generate ‘state’ else it is just obtained from the database.
-