actions Package

actions Package

class galaxy.tools.actions.DefaultToolAction[source]

Bases: object

Default tool action is to run an external command

collect_input_dataset_collections(tool, param_values)[source]
collect_input_datasets(tool, param_values, trans)[source]

Collect any dataset inputs from incoming. Returns a mapping from parameter name to Dataset instance for each tool parameter that is of the DataToolParameter type.

execute(tool, trans, incoming={}, return_job=False, set_output_hid=True, set_output_history=True, history=None, job_params=None, rerun_remap_job_id=None, mapping_over_collection=False)[source]

Executes a tool, creating job and tool outputs, associating them, and submitting the job to the job queue. If history is not specified, use trans.history as destination for tool’s output datasets.

get_output_name(output, dataset, tool, on_text, trans, incoming, history, params, job_params)[source]
class galaxy.tools.actions.ObjectStorePopulator(app)[source]

Bases: object

Small helper for interacting with the object store and making sure all datasets from a job end up with the same object_store_id.

set_object_store_id(data)[source]
class galaxy.tools.actions.ToolAction[source]

Bases: object

The actions to be taken when a tool is run (after parameters have been converted and validated).

execute(tool, trans, incoming={}, set_output_hid=True)[source]
galaxy.tools.actions.determine_output_format(output, parameter_context, input_datasets, random_input_ext)[source]

Determines the output format for a dataset based on an abstract description of the output (galaxy.tools.ToolOutput), the parameter wrappers, a map of the input datasets (name => HDA), and the last input extensions in the tool form.

TODO: Don’t deal with XML here - move this logic into ToolOutput. TODO: Make the input extension used deterministic instead of random.

galaxy.tools.actions.filter_output(output, incoming)[source]
galaxy.tools.actions.on_text_for_names(input_names)[source]

history_imp_exp Module

class galaxy.tools.actions.history_imp_exp.ExportHistoryToolAction[source]

Bases: galaxy.tools.actions.ToolAction

Tool action used for exporting a history to an archive.

execute(tool, trans, incoming={}, set_output_hid=False, overwrite=True, history=None, **kwargs)[source]
class galaxy.tools.actions.history_imp_exp.ImportHistoryToolAction[source]

Bases: galaxy.tools.actions.ToolAction

Tool action used for importing a history to an archive.

execute(tool, trans, incoming={}, set_output_hid=False, overwrite=True, history=None, **kwargs)[source]

index_genome Module

metadata Module

class galaxy.tools.actions.metadata.SetMetadataToolAction[source]

Bases: galaxy.tools.actions.__init__.ToolAction

Tool action used for setting external metadata on an existing dataset

execute(tool, trans, incoming={}, set_output_hid=False, overwrite=True, history=None, job_params=None, **kwargs)[source]

Execute using a web transaction.

execute_via_app(tool, app, session_id, history_id, user=None, incoming={}, set_output_hid=False, overwrite=True, history=None, job_params=None)[source]

Execute using application.

upload Module

class galaxy.tools.actions.upload.UploadToolAction[source]

Bases: galaxy.tools.actions.__init__.ToolAction

execute(tool, trans, incoming={}, set_output_hid=True, history=None, **kwargs)[source]

upload_common Module

galaxy.tools.actions.upload_common.active_folders(trans, folder)[source]
galaxy.tools.actions.upload_common.cleanup_unused_precreated_datasets(precreated_datasets)[source]
galaxy.tools.actions.upload_common.create_job(trans, params, tool, json_file_path, data_list, folder=None, history=None)[source]

Create the upload job.

galaxy.tools.actions.upload_common.create_paramfile(trans, uploaded_datasets)[source]

Create the upload tool’s JSON “param” file.

galaxy.tools.actions.upload_common.get_precreated_dataset(precreated_datasets, name)[source]

Return a dataset matching a name from the list of precreated (via async upload) datasets. If there’s more than one upload with the exact same name, we need to pop one (the first) so it isn’t chosen next time.

galaxy.tools.actions.upload_common.get_precreated_datasets(trans, params, data_obj, controller='root')[source]

Get any precreated datasets (when using asynchronous uploads).

galaxy.tools.actions.upload_common.get_uploaded_datasets(trans, cntrller, params, precreated_datasets, dataset_upload_inputs, library_bunch=None, history=None)[source]
galaxy.tools.actions.upload_common.handle_library_params(trans, params, folder_id, replace_dataset=None)[source]
galaxy.tools.actions.upload_common.new_upload(trans, cntrller, uploaded_dataset, library_bunch=None, history=None, state=None)[source]
galaxy.tools.actions.upload_common.persist_uploads(params)[source]

Turn any uploads in the submitted form to persisted files.