Warning
This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.tools package
Classes encapsulating galaxy tools and tool configuration.
- class galaxy.tools.safe_update(min_version, current_version)[source]
Bases:
tuple
- min_version: LegacyVersion | Version
Alias for field number 0
- current_version: LegacyVersion | Version
Alias for field number 1
- galaxy.tools.create_tool_from_source(app, tool_source: ToolSource, config_file: str | PathLike | None = None, **kwds)[source]
- galaxy.tools.create_tool_from_representation(app, raw_tool_source: str, tool_dir: str | PathLike | None = None, tool_source_class='XmlToolSource') Tool [source]
- class galaxy.tools.NullToolTagManager[source]
Bases:
AbstractToolTagManager
- class galaxy.tools.PersistentToolTagManager(app)[source]
Bases:
AbstractToolTagManager
- class galaxy.tools.ToolBox(config_filenames, tool_root_dir, app, save_integrated_tool_panel=True)[source]
Bases:
AbstractToolBox
A derivative of AbstractToolBox with Galaxy tooling-specific functionality and knowledge about Tool internals - how to construct them, action types, dependency management, etc.
- __init__(config_filenames, tool_root_dir, app, save_integrated_tool_panel=True)[source]
Create a toolbox from the config files named by config_filenames, using tool_root_dir as the base directory for finding individual tool config files.
- tool_tag_manager()[source]
Build a tool tag manager according to app’s configuration and return it.
- property sa_session
Returns a SQLAlchemy session
- persist_cache(register_postfork=False)[source]
Persists any modified tool cache files to disk.
Set
register_postfork
to stop database thread queue, close database connection and register re-open function that re-opens the database after forking.
- property all_requirements
- property tools_by_id
- class galaxy.tools.DefaultToolState[source]
Bases:
object
Keeps track of the state of a users interaction with a tool between requests.
- class galaxy.tools.Tool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
UsesDictVisibleKeys
Represents a computational tool that can be executed through Galaxy.
- tool_type = 'default'
- requires_setting_metadata = True
- produces_entry_points = False
- default_tool_action
alias of
DefaultToolAction
- tool_action: ToolAction
- tool_type_local = False
- dict_collection_visible_keys = ['id', 'name', 'version', 'description', 'labels']
- __init__(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Load a tool from the config named by config_file
- property history_manager
- property version_object
- property sa_session
Returns a SQLAlchemy session
- property lineage
Return ToolLineage for this tool.
- property tool_versions
- property is_latest_version
- property latest_version
- property is_datatype_converter
- property tool_shed_repository
- property produces_collections_with_unknown_structure
- property valid_input_states
- property requires_galaxy_python_environment
Indicates this tool’s runtime requires Galaxy’s Python environment.
- get_configured_job_handler(job_params=None)[source]
Get the configured job handler for this Tool given the provided job_params.
Unlike the former
get_job_handler()
method, this does not perform “preassignment” (random selection of a configured handler ID from a tag).- Parameters:
job_params (dict or None) – Any params specific to this job (e.g. the job source)
- Returns:
str or None – The configured handler for a job run of this Tool
- get_job_destination(job_params=None)[source]
- Returns:
galaxy.jobs.JobDestination – The destination definition and runner parameters.
- allow_user_access(user, attempting_access=True)[source]
- Returns:
bool – Whether the user is allowed to access the tool.
- parse(tool_source: ToolSource, guid: str | None = None, dynamic: bool = False) None [source]
Read tool configuration from the element root and fill in self.
- property tests
- parse_inputs(tool_source: ToolSource)[source]
Parse the “<inputs>” element and create appropriate ToolParameter s. This implementation supports multiple pages and grouping constructs.
- parse_outputs(tool_source)[source]
Parse <outputs> elements and fill in self.outputs (keyed by name)
- parse_stdio(tool_source: ToolSource)[source]
Parse <stdio> element(s) and fill in self.return_codes, self.stderr_rules, and self.stdout_rules. Return codes have a range and an error type (fault or warning). Stderr and stdout rules have a regular expression and an error level (fault or warning).
- parse_input_elem(page_source: PageSource, enctypes, context=None) Dict[str, Group | ToolParameter] [source]
Parse a parent element whose children are inputs – these could be groups (repeat, conditional) or param elements. Groups will be parsed recursively.
- parse_param_elem(input_source: InputSource, enctypes, context) ToolParameter [source]
Parse a single “<param>” element and return a ToolParameter instance. Also, if the parameter has a ‘required_enctype’ add it to the set enctypes.
- property help: Template
- property biotools_reference: str | None
Return a bio.tools ID if external reference to it is found.
If multiple bio.tools references are found, return just the first one.
- property is_workflow_compatible
- check_workflow_compatible(tool_source)[source]
Determine if a tool can be used in workflows. External tools and the upload tool are currently not supported by workflows.
- new_state(trans)[source]
Create a new DefaultToolState for this tool. It will be initialized with default values for inputs. Grouping elements are filled in recursively.
- get_hook(name)[source]
Returns an object from the code file referenced by code_namespace (this will normally be a callable object)
- visit_inputs(values, callback)[source]
Call the function callback on each parameter of this tool. Visits grouping parameters recursively and constructs unique prefixes for each nested set of The callback method is then called as:
callback( level_prefix, parameter, parameter_value )
- expand_incoming(request_context: WorkRequestContext, incoming: Dict[str, Any], input_format: typing_extensions.Literal[legacy, 21.01] = 'legacy') Tuple[List[Dict[str, Any]], List[Dict[str, Any]], int | None, MatchingCollections | None] [source]
- completed_jobs(trans, use_cached_job: bool, all_params: List[Dict[str, Any]]) Dict[int, Job | None] [source]
- handle_input(trans, incoming: Dict[str, Any], history: History | None = None, use_cached_job: bool = False, preferred_object_store_id: str | None = None, input_format: typing_extensions.Literal[legacy, 21.01] = 'legacy')[source]
Process incoming parameters for this tool from the dict incoming, update the tool state (or create if none existed), and either return to the form or execute the tool (only if ‘execute’ was clicked and there were no errors).
- handle_incoming_errors(all_errors: List[Dict[str, Dict[str, ParameterValidationErrorsT | str | Exception] | str | Exception]]) None [source]
- handle_single_execution(trans, rerun_remap_job_id: int | None, execution_slice: ExecutionSlice, history: History, execution_cache: ToolExecutionCache, completed_job: Job | None, collection_info: MatchingCollections | None, job_callback: Callable | None, preferred_object_store_id: str | None, flush_job: bool, skip: bool)[source]
Return a pair with whether execution is successful as well as either resulting output data or an error message indicating the problem.
- property params_with_missing_data_table_entry
Return all parameters that are dynamically generated select lists whose options require an entry not currently in the tool_data_table_conf.xml file.
- property params_with_missing_index_file
Return all parameters that are dynamically generated select lists whose options refer to a missing .loc file.
- get_static_param_values(trans)[source]
Returns a map of parameter names and values if the tool does not require any user input. Will raise an exception if any parameter does require input.
- execute(trans, incoming: Dict[str, Any] | None = None, history: History | None = None, set_output_hid: bool = True, flush_job: bool = True)[source]
Execute the tool using parameter values in incoming. This just dispatches to the ToolAction instance specified by self.tool_action. In general this will create a Job that when run will build the tool’s outputs, e.g. DefaultToolAction.
_execute has many more options but should be accessed through handle_single_execution. The public interface to execute should be rarely used and in more specific ways.
- check_and_update_param_values(values, trans, update_values=True, workflow_building_mode=False)[source]
Check that all parameters have values, and fill in with default values where necessary. This could be called after loading values from a database in case new parameters have been added.
- build_dependency_shell_commands(job_directory=None, metadata=False)[source]
Return a list of commands to be run to populate the current environment to include this tools requirements.
- property installed_tool_dependencies
- property tool_requirements
Return all requiremens of type package
- property tool_requirements_status
Return a list of dictionaries for all tool dependencies with their associated status
- property output_discover_patterns
- build_redirect_url_params(param_dict)[source]
Substitute parameter values into self.redirect_url_params
- parse_redirect_url(data, param_dict)[source]
Parse the REDIRECT_URL tool param. Tools that send data to an external application via a redirect must include the following 3 tool params:
REDIRECT_URL - the url to which the data is being sent
DATA_URL - the url to which the receiving application will send an http post to retrieve the Galaxy data
GALAXY_URL - the url to which the external application may post data as a response
- call_hook(hook_name, *args, **kwargs)[source]
Call the custom code hook function identified by ‘hook_name’ if any, and return the results
- exec_after_process(app, inp_data, out_data, param_dict, job, final_job_state: str | None = None)[source]
- discover_outputs(out_data, out_collections, tool_provided_metadata, tool_working_directory, job, input_ext, input_dbkey, inp_data=None, final_job_state='ok')[source]
Find any additional datasets generated by a tool and attach (for cases where number of outputs is not known in advance).
- to_dict(trans, link_details=False, io_details=False, tool_help=False)[source]
Returns dict of tool.
- to_json(trans, kwd=None, job=None, workflow_building_mode=False, history=None)[source]
Recursively creates a tool dictionary containing repeats, dynamic options and updated states.
- class galaxy.tools.OutputParameterJSONTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
Tool
Alternate implementation of Tool that provides parameters and other values JSONified within the contents of an output dataset
- tool_type = 'output_parameter_json'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.ExpressionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
Tool
- requires_js_runtime = True
- tool_type = 'expression'
- tool_type_local = True
- EXPRESSION_INPUTS_NAME = '_expression_inputs_.json'
- parse_outputs(tool_source)[source]
Parse <outputs> elements and fill in self.outputs (keyed by name)
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.DataSourceTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
OutputParameterJSONTool
Alternate implementation of Tool for data_source tools – those that allow the user to query and extract data from another web site.
- tool_type = 'data_source'
- default_tool_action
alias of
DataSourceToolAction
- property wants_params_cleaned
Indicates whether received, but undeclared request params should be cleaned.
- parse_inputs(tool_source)[source]
Parse the “<inputs>” element and create appropriate ToolParameter s. This implementation supports multiple pages and grouping constructs.
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.AsyncDataSourceTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DataSourceTool
- tool_type = 'data_source_async'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.DataDestinationTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
Tool
- tool_type = 'data_destination'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.SetMetadataTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
Tool
Tool implementation for special tool that sets metadata on an existing dataset.
- tool_type = 'set_metadata'
- requires_setting_metadata = False
- tool_action: SetMetadataToolAction
- class galaxy.tools.ExportHistoryTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
Tool
- tool_type = 'export_history'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.ImportHistoryTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
Tool
- tool_type = 'import_history'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.InteractiveTool(config_file, tool_source, app, **kwd)[source]
Bases:
Tool
- tool_type = 'interactive'
- produces_entry_points = True
- __init__(config_file, tool_source, app, **kwd)[source]
Load a tool from the config named by config_file
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.DataManagerTool(config_file, root, app, guid=None, data_manager_id=None, **kwds)[source]
Bases:
OutputParameterJSONTool
- tool_type = 'manage_data'
- default_tool_action
alias of
DataManagerToolAction
- __init__(config_file, root, app, guid=None, data_manager_id=None, **kwds)[source]
Load a tool from the config named by config_file
- allow_user_access(user, attempting_access=True) bool [source]
Check user access to this tool.
- Parameters:
user (galaxy.model.User) – model object representing user.
attempting_access (bool) – is the user attempting to do something with the the tool (set false for incidental checks like toolbox listing)
- Returns:
Whether the user is allowed to access the tool. Data Manager tools are only accessible to admins.
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.DatabaseOperationTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
Tool
- default_tool_action
alias of
ModelOperationToolAction
- require_terminal_states = True
- require_dataset_ok = True
- tool_type_local = True
- require_terminal_or_paused_states = False
- property valid_input_states
- property allow_errored_inputs
- produce_outputs(trans: ProvidesUserContext, out_data, output_collections, incoming, history, **kwds)[source]
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.UnzipCollectionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'unzip_collection'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.ZipCollectionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'zip_collection'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.CrossProductFlatCollectionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'cross_product_flat'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.CrossProductNestedCollectionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'cross_product_nested'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.BuildListCollectionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'build_list'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.ExtractDatasetCollectionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'extract_dataset'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.MergeCollectionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'merge_collection'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.FilterDatasetsTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- require_terminal_states = True
- require_dataset_ok = False
- static element_is_valid(element: DatasetCollectionElement)[source]
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.FilterFailedDatasetsTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
FilterDatasetsTool
- tool_type = 'filter_failed_datasets_collection'
- require_dataset_ok = False
- static element_is_valid(element: DatasetCollectionElement)[source]
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.KeepSuccessDatasetsTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
FilterDatasetsTool
- tool_type = 'keep_success_datasets_collection'
- require_terminal_states = False
- require_dataset_ok = False
- require_terminal_or_paused_states = True
- static element_is_valid(element: DatasetCollectionElement)[source]
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.FilterEmptyDatasetsTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
FilterDatasetsTool
- tool_type = 'filter_empty_datasets_collection'
- require_dataset_ok = False
- static element_is_valid(element: DatasetCollectionElement)[source]
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.FilterNullTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
FilterDatasetsTool
- tool_type = 'filter_null'
- require_dataset_ok = True
- static element_is_valid(element: DatasetCollectionElement)[source]
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.FlattenTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'flatten_collection'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.SortTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'sort_collection'
- require_terminal_states = True
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.HarmonizeTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'harmonize_list'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.RelabelFromFileTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'relabel_from_file'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.ApplyRulesTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'apply_rules'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.TagFromFileTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'tag_from_file'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.FilterFromFileTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'filter_from_file'
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.DuplicateFileToCollectionTool(config_file: str | PathLike | None, tool_source: ToolSource, app: UniverseApplication, guid: str | None = None, repository_id=None, tool_shed_repository=None, allow_code_files: bool = True, dynamic: bool = False, tool_dir: str | PathLike | None = None)[source]
Bases:
DatabaseOperationTool
- tool_type = 'duplicate_file_to_collection'
- require_terminal_states = False
- require_dataset_ok = False
- tool_action: ToolAction
- stdio_exit_codes: List
- stdio_regexes: List
- inputs_by_page: List[Dict]
- display_by_page: List
- labels: List
- input_params: List[ToolParameter]
- dependencies: List
- class galaxy.tools.TracksterConfig(actions)[source]
Bases:
object
Trackster configuration encapsulation.
Subpackages
- galaxy.tools.actions package
ToolAction
DefaultToolAction
OutputCollections
get_ext_or_implicit_ext()
determine_output_format()
- Submodules
- galaxy.tools.actions.data_manager module
- galaxy.tools.actions.data_source module
- galaxy.tools.actions.history_imp_exp module
- galaxy.tools.actions.metadata module
- galaxy.tools.actions.model_operations module
- galaxy.tools.actions.upload module
- galaxy.tools.actions.upload_common module
- galaxy.tools.data package
RefgenieToolDataTable
RefgenieToolDataTable.dict_collection_visible_keys
RefgenieToolDataTable.dict_element_visible_keys
RefgenieToolDataTable.dict_export_visible_keys
RefgenieToolDataTable.type_key
RefgenieToolDataTable.__init__()
RefgenieToolDataTable.data
RefgenieToolDataTable.configure_and_load()
RefgenieToolDataTable.parse_column_spec()
RefgenieToolDataTable.parse_file_fields()
RefgenieToolDataTable.empty_field_value
RefgenieToolDataTable.empty_field_values
RefgenieToolDataTable.filenames
TabularToolDataField
TabularToolDataField.dict_collection_visible_keys
TabularToolDataField.__init__()
TabularToolDataField.get_base_path()
TabularToolDataField.get_base_dir()
TabularToolDataField.clean_base_dir()
TabularToolDataField.get_files()
TabularToolDataField.get_filesize_map()
TabularToolDataField.get_fingerprint()
TabularToolDataField.to_dict()
TabularToolDataTable
TabularToolDataTable.dict_collection_visible_keys
TabularToolDataTable.dict_element_visible_keys
TabularToolDataTable.dict_export_visible_keys
TabularToolDataTable.type_key
TabularToolDataTable.__init__()
TabularToolDataTable.data
TabularToolDataTable.configure_and_load()
TabularToolDataTable.merge_tool_data_table()
TabularToolDataTable.handle_found_index_file()
TabularToolDataTable.get_fields()
TabularToolDataTable.get_field()
TabularToolDataTable.get_named_fields_list()
TabularToolDataTable.get_version_fields()
TabularToolDataTable.parse_column_spec()
TabularToolDataTable.extend_data_with()
TabularToolDataTable.parse_file_fields()
TabularToolDataTable.get_column_name_list()
TabularToolDataTable.get_entry()
TabularToolDataTable.get_entries()
TabularToolDataTable.get_filename_for_source()
TabularToolDataTable.filter_file_fields()
TabularToolDataTable.xml_string
TabularToolDataTable.to_dict()
TabularToolDataTable.empty_field_value
TabularToolDataTable.empty_field_values
TabularToolDataTable.filenames
ToolDataTable
ToolDataTable.type_key
ToolDataTable.data
ToolDataTable.from_dict()
ToolDataTable.__init__()
ToolDataTable.empty_field_value
ToolDataTable.empty_field_values
ToolDataTable.filenames
ToolDataTable.get_empty_field_by_name()
ToolDataTable.add_entry()
ToolDataTable.add_entries()
ToolDataTable.remove_entry()
ToolDataTable.is_current_version()
ToolDataTable.merge_tool_data_table()
ToolDataTable.reload_from_files()
ToolDataTableManager
- galaxy.tools.data_manager package
- galaxy.tools.error_reports package
ErrorReports
NullErrorPlugin
ErrorPlugin
- Subpackages
- galaxy.tools.error_reports.plugins package
ErrorPlugin
- Submodules
- galaxy.tools.error_reports.plugins.base_git module
- galaxy.tools.error_reports.plugins.email module
- galaxy.tools.error_reports.plugins.github module
- galaxy.tools.error_reports.plugins.gitlab module
- galaxy.tools.error_reports.plugins.influxdb module
- galaxy.tools.error_reports.plugins.json module
- galaxy.tools.error_reports.plugins.sentry module
- galaxy.tools.error_reports.plugins package
- galaxy.tools.expressions package
- galaxy.tools.filters package
- galaxy.tools.imp_exp package
- galaxy.tools.parameters package
DataCollectionToolParameter
DataCollectionToolParameter.__init__()
DataCollectionToolParameter.multiple
DataCollectionToolParameter.collection_types
DataCollectionToolParameter.match_collections()
DataCollectionToolParameter.match_multirun_collections()
DataCollectionToolParameter.from_json()
DataCollectionToolParameter.to_text()
DataCollectionToolParameter.to_dict()
DataToolParameter
DataToolParameter.__init__()
DataToolParameter.multiple
DataToolParameter.from_json()
DataToolParameter.to_param_dict_string()
DataToolParameter.to_text()
DataToolParameter.get_dependencies()
DataToolParameter.converter_safe()
DataToolParameter.get_options_filter_attribute()
DataToolParameter.to_dict()
SelectToolParameter
SelectToolParameter.value_label
SelectToolParameter.__init__()
SelectToolParameter.get_options()
SelectToolParameter.get_legal_values()
SelectToolParameter.get_legal_names()
SelectToolParameter.from_json()
SelectToolParameter.to_param_dict_string()
SelectToolParameter.to_json()
SelectToolParameter.to_python()
SelectToolParameter.get_initial_value()
SelectToolParameter.to_text()
SelectToolParameter.get_dependencies()
SelectToolParameter.to_dict()
SelectToolParameter.validate()
- Submodules
- galaxy.tools.parameters.basic module
ImplicitConversionRequired
contains_workflow_parameter()
is_runtime_context()
parse_dynamic_options()
assert_throws_param_value_error()
ParameterValueError
ToolParameter
ToolParameter.dict_collection_visible_keys
ToolParameter.__init__()
ToolParameter.name
ToolParameter.visible
ToolParameter.get_label()
ToolParameter.from_json()
ToolParameter.get_initial_value()
ToolParameter.get_required_enctype()
ToolParameter.get_dependencies()
ToolParameter.to_json()
ToolParameter.to_python()
ToolParameter.value_to_basic()
ToolParameter.value_from_basic()
ToolParameter.value_to_display_text()
ToolParameter.to_text()
ToolParameter.to_param_dict_string()
ToolParameter.validate()
ToolParameter.to_dict()
ToolParameter.build()
ToolParameter.parse_name()
SimpleTextToolParameter
TextToolParameter
IntegerToolParameter
FloatToolParameter
BooleanToolParameter
BooleanToolParameter.__init__()
BooleanToolParameter.from_json()
BooleanToolParameter.to_python()
BooleanToolParameter.to_json()
BooleanToolParameter.get_initial_value()
BooleanToolParameter.to_param_dict_string()
BooleanToolParameter.to_dict()
BooleanToolParameter.legal_values
BooleanToolParameter.name
FileToolParameter
FTPFileToolParameter
HiddenToolParameter
ColorToolParameter
BaseURLToolParameter
iter_to_string()
SelectToolParameter
SelectToolParameter.value_label
SelectToolParameter.__init__()
SelectToolParameter.get_options()
SelectToolParameter.get_legal_values()
SelectToolParameter.get_legal_names()
SelectToolParameter.from_json()
SelectToolParameter.to_param_dict_string()
SelectToolParameter.to_json()
SelectToolParameter.to_python()
SelectToolParameter.get_initial_value()
SelectToolParameter.to_text()
SelectToolParameter.get_dependencies()
SelectToolParameter.to_dict()
SelectToolParameter.validate()
SelectToolParameter.name
GenomeBuildParameter
SelectTagParameter
SelectTagParameter.__init__()
SelectTagParameter.from_json()
SelectTagParameter.get_tag_list()
SelectTagParameter.get_options()
SelectTagParameter.get_initial_value()
SelectTagParameter.get_legal_values()
SelectTagParameter.get_dependencies()
SelectTagParameter.to_dict()
SelectTagParameter.value_label
SelectTagParameter.name
ColumnListParameter
ColumnListParameter.__init__()
ColumnListParameter.to_json()
ColumnListParameter.from_json()
ColumnListParameter.get_column_list()
ColumnListParameter.get_options()
ColumnListParameter.get_initial_value()
ColumnListParameter.get_legal_values()
ColumnListParameter.is_file_empty()
ColumnListParameter.get_dependencies()
ColumnListParameter.to_dict()
ColumnListParameter.value_label
ColumnListParameter.name
DrillDownSelectToolParameter
DrillDownSelectToolParameter.__init__()
DrillDownSelectToolParameter.get_options()
DrillDownSelectToolParameter.get_legal_values()
DrillDownSelectToolParameter.from_json()
DrillDownSelectToolParameter.to_param_dict_string()
DrillDownSelectToolParameter.get_initial_value()
DrillDownSelectToolParameter.to_text()
DrillDownSelectToolParameter.get_dependencies()
DrillDownSelectToolParameter.to_dict()
DrillDownSelectToolParameter.value_label
DrillDownSelectToolParameter.name
BaseDataToolParameter
src_id_to_item()
DataToolParameter
DataToolParameter.__init__()
DataToolParameter.multiple
DataToolParameter.from_json()
DataToolParameter.to_param_dict_string()
DataToolParameter.to_text()
DataToolParameter.get_dependencies()
DataToolParameter.converter_safe()
DataToolParameter.get_options_filter_attribute()
DataToolParameter.to_dict()
DataToolParameter.name
DataCollectionToolParameter
DataCollectionToolParameter.__init__()
DataCollectionToolParameter.multiple
DataCollectionToolParameter.collection_types
DataCollectionToolParameter.match_collections()
DataCollectionToolParameter.match_multirun_collections()
DataCollectionToolParameter.from_json()
DataCollectionToolParameter.to_text()
DataCollectionToolParameter.to_dict()
DataCollectionToolParameter.name
HiddenDataToolParameter
BaseJsonToolParameter
DirectoryUriToolParameter
RulesListToolParameter
raw_to_galaxy()
history_item_dict_to_python()
history_item_to_json()
- galaxy.tools.parameters.dataset_matcher module
- galaxy.tools.parameters.dynamic_options module
Filter
StaticValueFilter
RegexpFilter
DataMetaFilter
ParamValueFilter
UniqueValueFilter
MultipleSplitterFilter
AttributeValueSplitterFilter
AdditionalValueFilter
RemoveValueFilter
SortByColumnFilter
DynamicOptions
DynamicOptions.__init__()
DynamicOptions.tool_data_table
DynamicOptions.missing_tool_data_table_name
DynamicOptions.parse_column_definitions()
DynamicOptions.parse_file_fields()
DynamicOptions.get_dependency_names()
DynamicOptions.get_fields()
DynamicOptions.get_user_options()
DynamicOptions.hda_to_table_entries()
DynamicOptions.get_option_from_dataset()
DynamicOptions.get_fields_by_value()
DynamicOptions.get_field_by_name_for_value()
DynamicOptions.get_options()
DynamicOptions.column_spec_to_index()
FromUrlOptions
strip_or_none()
parse_from_url_options()
template_or_none()
- galaxy.tools.parameters.grouping module
Group
Repeat
Section
Dataset
UploadDataset
UploadDataset.type
UploadDataset.__init__()
UploadDataset.inputs
UploadDataset.get_composite_dataset_name()
UploadDataset.get_file_base_name()
UploadDataset.get_file_type()
UploadDataset.get_dbkey()
UploadDataset.get_datatype_ext()
UploadDataset.get_datatype()
UploadDataset.title_plural
UploadDataset.group_title()
UploadDataset.title_by_index()
UploadDataset.value_to_basic()
UploadDataset.value_from_basic()
UploadDataset.get_file_count()
UploadDataset.get_initial_value()
UploadDataset.get_uploaded_datasets()
Conditional
ConditionalWhen
- galaxy.tools.parameters.history_query module
- galaxy.tools.parameters.input_translation module
- galaxy.tools.parameters.meta module
- galaxy.tools.parameters.sanitize module
ToolParameterSanitizer
ToolParameterSanitizer.VALID_PRESET
ToolParameterSanitizer.MAPPING_PRESET
ToolParameterSanitizer.DEFAULT_INVALID_CHAR
ToolParameterSanitizer.from_element()
ToolParameterSanitizer.get_valid_by_name()
ToolParameterSanitizer.get_mapping_by_name()
ToolParameterSanitizer.__init__()
ToolParameterSanitizer.restore_text()
ToolParameterSanitizer.sanitize_text()
ToolParameterSanitizer.sanitize_param()
- galaxy.tools.parameters.validation module
Validator
RegexValidator
ExpressionValidator
InRangeValidator
LengthValidator
DatasetOkValidator
DatasetEmptyValidator
DatasetExtraFilesPathEmptyValidator
MetadataValidator
MetadataEqualValidator
UnspecifiedBuildValidator
NoOptionsValidator
EmptyTextfieldValidator
MetadataInFileColumnValidator
ValueInDataTableColumnValidator
ValueNotInDataTableColumnValidator
MetadataInDataTableColumnValidator
MetadataNotInDataTableColumnValidator
MetadataInRangeValidator
parse_xml_validators()
to_validators()
- galaxy.tools.parameters.wrapped module
- galaxy.tools.parameters.wrapped_json module
- galaxy.tools.search package
- galaxy.tools.util package
- Subpackages
- Submodules
- galaxy.tools.util.maf_utilities module
maketrans()
src_split()
src_merge()
get_species_in_block()
tool_fail()
TempFileHandler
RegionAlignment
RegionAlignment.DNA_COMPLEMENT
RegionAlignment.MAX_SEQUENCE_SIZE
RegionAlignment.__init__()
RegionAlignment.add_species()
RegionAlignment.get_species_names()
RegionAlignment.get_sequence()
RegionAlignment.get_sequence_reverse_complement()
RegionAlignment.set_position()
RegionAlignment.set_range()
RegionAlignment.flush()
GenomicRegionAlignment
SplicedAlignment
maf_index_by_uid()
open_or_build_maf_index()
build_maf_index_species_chromosomes()
build_maf_index()
component_overlaps_region()
chop_block_by_region()
orient_block_by_region()
get_oriented_chopped_blocks_for_region()
get_oriented_chopped_blocks_with_index_offset_for_region()
iter_blocks_split_by_src()
iter_blocks_split_by_species()
get_chopped_blocks_for_region()
get_chopped_blocks_with_index_offset_for_region()
get_region_alignment()
reduce_block_by_primary_genome()
fill_region_alignment()
get_spliced_region_alignment()
line_enumerator()
get_starts_ends_fields_from_gene_bed()
iter_components_by_src()
get_components_by_src()
iter_components_by_src_start()
get_components_by_src_start()
sort_block_components_by_block()
get_species_in_maf()
parse_species_option()
remove_temp_index_file()
get_fasta_header()
get_attributes_from_fasta_header()
iter_fasta_alignment()
Submodules
galaxy.tools.biotools module
Adapt Galaxy-agnostic abstraction galaxy.tool_util.biotools to Galaxy config and dependencies.
- galaxy.tools.biotools.get_galaxy_biotools_metadata_source(config) BiotoolsMetadataSource [source]
Build a BiotoolsMetadataSource from a Galaxy configuration object.
galaxy.tools.cache module
- class galaxy.tools.cache.ToolDocumentCache(cache_dir)[source]
Bases:
object
- property cache_file_is_writeable
- class galaxy.tools.cache.ToolCache[source]
Bases:
object
Cache tool definitions to allow quickly reloading the whole toolbox.
- cleanup()[source]
Remove uninstalled tools from tool cache if they are not on disk anymore or if their content has changed.
Returns list of tool_ids that have been removed.
- get_tool(config_filename)[source]
Get the tool at config_filename from the cache if the tool is up to date.
galaxy.tools.data_fetch module
- galaxy.tools.data_fetch.do_fetch(request_path: str, working_directory: str, registry: Registry, file_sources_dict: Dict | None = None)[source]
- class galaxy.tools.data_fetch.UploadConfig(request: Dict[str, Any], registry: Registry, working_directory: str, allow_failed_collections: bool, file_sources_dict: Dict | None = None)[source]
Bases:
object
- __init__(request: Dict[str, Any], registry: Registry, working_directory: str, allow_failed_collections: bool, file_sources_dict: Dict | None = None)[source]
- property file_sources
galaxy.tools.errors module
Functionality for dealing with tool errors.
- class galaxy.tools.errors.EmailErrorReporter(hda, app)[source]
Bases:
ErrorReporter
galaxy.tools.evaluation module
- exception galaxy.tools.evaluation.ToolTemplatingException(*args: object, tool_id: str | None, tool_version: str, is_latest: bool)[source]
Bases:
Exception
- galaxy.tools.evaluation.global_tool_logs(func, config_file: str, action_str: str, tool: Tool)[source]
- class galaxy.tools.evaluation.ToolEvaluator(app: MinimalToolApp, tool, job, local_working_directory)[source]
Bases:
object
An abstraction linking together a tool and a job runtime to evaluate tool inputs in an isolated, testable manner.
- __init__(app: MinimalToolApp, tool, job, local_working_directory)[source]
- app: MinimalToolApp
- set_compute_environment(compute_environment: ComputeEnvironment, get_special: Callable | None = None)[source]
Setup the compute environment and established the outline of the param_dict for evaluating command and config cheetah templates.
- build_param_dict(incoming, input_datasets, output_datasets, output_collections)[source]
Build the dictionary of parameters for substituting into the command line. Each value is wrapped in a InputValueWrapper, which allows all the attributes of the value to be used in the template, but when the __str__ method is called it actually calls the to_param_dict_string method of the associated input.
- class galaxy.tools.evaluation.PartialToolEvaluator(app: MinimalToolApp, tool, job, local_working_directory)[source]
Bases:
ToolEvaluator
ToolEvaluator that only builds Environment Variables.
- build()[source]
Build runtime description of job to execute, evaluate command and config templates corresponding to this tool with these inputs on this compute environment.
- app: MinimalToolApp
- class galaxy.tools.evaluation.RemoteToolEvaluator(app: MinimalToolApp, tool, job, local_working_directory)[source]
Bases:
ToolEvaluator
ToolEvaluator that skips unnecessary steps already executed during job setup.
- app: MinimalToolApp
galaxy.tools.exception_handling module
galaxy.tools.execute module
Once state information has been calculated, handle actually executing tools from various states, tracking results, and building implicit dataset collections from matched collections.
- galaxy.tools.execute.execute(trans, tool: Tool, mapping_params: MappingParameters, history: History, rerun_remap_job_id: int | None = None, preferred_object_store_id: str | None = None, collection_info: MatchingCollections | None = None, workflow_invocation_uuid: str | None = None, invocation_step: WorkflowInvocationStep | None = None, max_num_jobs: int | None = None, job_callback: Callable | None = None, completed_jobs: Dict[int, Job | None] | None = None, workflow_resource_parameters: Dict[str, Any] | None = None, validate_outputs: bool = False)[source]
Execute a tool and return object containing summary (output data, number of failures, etc…).
galaxy.tools.recommendations module
Compute tool recommendations
galaxy.tools.remote_tool_eval module
- class galaxy.tools.remote_tool_eval.ToolAppConfig(name, tool_data_path, galaxy_data_manager_data_path, nginx_upload_path, len_file_path, builds_file_path, root, is_admin_user, admin_users)[source]
Bases:
tuple
- class galaxy.tools.remote_tool_eval.ToolApp(sa_session: SessionlessContext, tool_app_config: ToolAppConfig, datatypes_registry: Registry, object_store: BaseObjectStore, tool_data_table_manager: ToolDataTableManager, file_sources: ConfiguredFileSources)[source]
Bases:
MinimalToolApp
Dummy App that allows loading tools
- __init__(sa_session: SessionlessContext, tool_app_config: ToolAppConfig, datatypes_registry: Registry, object_store: BaseObjectStore, tool_data_table_manager: ToolDataTableManager, file_sources: ConfiguredFileSources)[source]
- object_store: BaseObjectStore
- tool_data_tables: ToolDataTableManager
- file_sources: ConfiguredFileSources
- security: IdEncodingHelper
galaxy.tools.repositories module
Provides a subset of app for verifying tools.
- class galaxy.tools.repositories.ValidationContext(app_name: str, model, security, tool_data_path, shed_tool_data_path, tool_data_tables=None, registry=None, hgweb_config_manager=None, biotools_metadata_source=None)[source]
Bases:
object
Minimal App object for tool validation.
- is_webapp = True
- __init__(app_name: str, model, security, tool_data_path, shed_tool_data_path, tool_data_tables=None, registry=None, hgweb_config_manager=None, biotools_metadata_source=None)[source]
- config: ValidationContextConfig
galaxy.tools.special_tools module
galaxy.tools.test module
galaxy.tools.wrappers module
- class galaxy.tools.wrappers.ToolParameterValueWrapper[source]
Bases:
object
Base class for object that Wraps a Tool Parameter and Value.
- input: ToolParameter
- class galaxy.tools.wrappers.RawObjectWrapper(obj: Any)[source]
Bases:
ToolParameterValueWrapper
Wraps an object so that __str__ returns module_name:class_name.
- input: ToolParameter
- class galaxy.tools.wrappers.InputValueWrapper(input: ToolParameter, value: str | None, other_values: Dict[str, str] | None = None, profile: float | None = None)[source]
Bases:
ToolParameterValueWrapper
Wraps an input so that __str__ gives the “param_dict” representation.
- __init__(input: ToolParameter, value: str | None, other_values: Dict[str, str] | None = None, profile: float | None = None) None [source]
- input: ToolParameter
- class galaxy.tools.wrappers.SelectToolParameterWrapper(input: SelectToolParameter, value: str | List[str], other_values: Dict[str, str] | None = None, compute_environment: ComputeEnvironment | None = None)[source]
Bases:
ToolParameterValueWrapper
Wraps a SelectTooParameter so that __str__ returns the selected value, but all other attributes are accessible.
- class SelectToolParameterFieldWrapper(input: SelectToolParameter, value: str | List[str], other_values: Dict[str, str] | None, compute_environment: ComputeEnvironment | None)[source]
Bases:
object
Provide access to any field by name or index for this particular value. Only applicable for dynamic_options selects, which have more than simple ‘options’ defined (name, value, selected).
- __init__(input: SelectToolParameter, value: str | List[str], other_values: Dict[str, str] | None = None, compute_environment: ComputeEnvironment | None = None)[source]
- input: SelectToolParameter
- class galaxy.tools.wrappers.DatasetFilenameWrapper(dataset: DatasetInstance | DatasetCollectionElement | None, datatypes_registry: Registry | None = None, tool: Tool | None = None, name: str | None = None, compute_environment: ComputeEnvironment | None = None, identifier: str | None = None, io_type: str = 'input', formats: List[str] | None = None)[source]
Bases:
ToolParameterValueWrapper
Wraps a dataset so that __str__ returns the filename, but all other attributes are accessible.
- class MetadataWrapper(dataset: DatasetInstance, compute_environment: ComputeEnvironment | None = None)[source]
Bases:
object
Wraps a Metadata Collection to return MetadataParameters wrapped according to the metadata spec. Methods implemented to match behavior of a Metadata Collection.
- __init__(dataset: DatasetInstance, compute_environment: ComputeEnvironment | None = None) None [source]
- __init__(dataset: DatasetInstance | DatasetCollectionElement | None, datatypes_registry: Registry | None = None, tool: Tool | None = None, name: str | None = None, compute_environment: ComputeEnvironment | None = None, identifier: str | None = None, io_type: str = 'input', formats: List[str] | None = None) None [source]
- class galaxy.tools.wrappers.DatasetListWrapper(job_working_directory: str | None, datasets: Sequence[None | DatasetInstance | DatasetCollectionInstance | DatasetCollectionElement] | DatasetInstance, **kwargs: Any)[source]
Bases:
List
[DatasetFilenameWrapper
],ToolParameterValueWrapper
,HasDatasets
- __init__(job_working_directory: str | None, datasets: Sequence[None | DatasetInstance | DatasetCollectionInstance | DatasetCollectionElement] | DatasetInstance, **kwargs: Any) None [source]
- get_datasets_for_group(group: str) List[DatasetFilenameWrapper] [source]
- input: ToolParameter
- class galaxy.tools.wrappers.DatasetCollectionWrapper(job_working_directory: str | None, has_collection: None | DatasetCollectionElement | HistoryDatasetCollectionAssociation, datatypes_registry: Registry, **kwargs: Any)[source]
Bases:
ToolParameterValueWrapper
,HasDatasets
- __init__(job_working_directory: str | None, has_collection: None | DatasetCollectionElement | HistoryDatasetCollectionAssociation, datatypes_registry: Registry, **kwargs: Any) None [source]
- collection: DatasetCollection
- get_datasets_for_group(group: str) List[DatasetFilenameWrapper] [source]
- get_all_staging_paths(invalid_chars: Sequence[str] = ('/',), include_collection_name: bool = False) List[str] [source]