toil.lib.trs¶
Contains functions for integrating Toil with GA4GH Tool Registry Service servers, for fetching workflows.
Attributes¶
Functions¶
|
Returns True if a workflow string smells like TRS. |
|
Parse a Dockstore workflow URL or TSR ID to a string that is definitely a TRS ID. |
|
Parse a TRS ID to workflow and optional version. |
|
Compose a TRS ID from a workflow ID and version ID. |
|
Given a Dockstore URL or TRS identifier, get the root WDL or CWL URL for the workflow, along with the TRS workflow ID and version. |
|
Returns a URL or local path to a workflow's primary descriptor file. |
|
Find the real workflow URL or filename from a command line argument. |
Module Contents¶
- toil.lib.trs.logger¶
- toil.lib.trs.TRS_ROOT = 'https://dockstore.org'¶
- toil.lib.trs.is_trs_workflow(workflow)[source]¶
Returns True if a workflow string smells like TRS.
Detects Dockstore page URLs and strings that could be Dockstore TRS IDs.
- toil.lib.trs.extract_trs_spec(workflow)[source]¶
Parse a Dockstore workflow URL or TSR ID to a string that is definitely a TRS ID.
- toil.lib.trs.compose_trs_spec(trs_workflow_id, trs_version)[source]¶
Compose a TRS ID from a workflow ID and version ID.
- toil.lib.trs.find_workflow(workflow, supported_languages=None)[source]¶
Given a Dockstore URL or TRS identifier, get the root WDL or CWL URL for the workflow, along with the TRS workflow ID and version.
Accepts inputs like:
https://dockstore.org/workflows/github.com/dockstore-testing/md5sum-checker:master?tab=info
#workflow/github.com/dockstore-testing/md5sum-checker
Assumes the input is actually one of the supported formats. See is_trs_workflow().
TODO: Needs to handle multi-workflow files if Dockstore can.
- Raises:
FileNotFoundError – if the workflow or version doesn’t exist.
ValueError – if the version is not specified but cannot be automatically determined.
- Parameters:
- Return type:
- toil.lib.trs.fetch_workflow(trs_workflow_id, trs_version, language)[source]¶
Returns a URL or local path to a workflow’s primary descriptor file.
The file will be in context with its required files so it can actually run.
- Raises:
FileNotFoundError – if the workflow or version doesn’t exist.
- Parameters:
- Return type:
- toil.lib.trs.resolve_workflow(workflow, supported_languages=None)[source]¶
Find the real workflow URL or filename from a command line argument.
Transform a workflow URL or path that might actually be a Dockstore page URL or TRS specifier to an actual URL or path to a workflow document, and optional TRS specifier.
Accepts inputs like
https://dockstore.org/workflows/github.com/dockstore-testing/md5sum-checker:master?tab=info
#workflow/github.com/dockstore-testing/md5sum-checker
./local.cwl