toil.lib.integration

Contains functions for integrating Toil with external services such as Dockstore.

Attributes

logger

session

Functions

is_dockstore_workflow(workflow)

Returns True if a workflow string smells Dockstore-y.

find_trs_spec(workflow)

Parse a Dockstore workflow URL or TSR ID to a string that is definitely a TRS ID.

parse_trs_spec(trs_spec)

Parse a TRS ID to workflow and optional version.

get_workflow_root_from_dockstore(workflow[, ...])

Given a Dockstore URL or TRS identifier, get the root WDL or CWL URL for the workflow.

resolve_workflow(workflow[, supported_languages])

Find the real workflow URL or filename from a command line argument.

Module Contents

toil.lib.integration.logger
toil.lib.integration.session[source]
toil.lib.integration.is_dockstore_workflow(workflow)[source]

Returns True if a workflow string smells Dockstore-y.

Detects Dockstore page URLs and strings that could be Dockstore TRS IDs.

Parameters:

workflow (str)

Return type:

bool

toil.lib.integration.find_trs_spec(workflow)[source]

Parse a Dockstore workflow URL or TSR ID to a string that is definitely a TRS ID.

Parameters:

workflow (str)

Return type:

str

toil.lib.integration.parse_trs_spec(trs_spec)[source]

Parse a TRS ID to workflow and optional version.

Parameters:

trs_spec (str)

Return type:

tuple[str, Optional[str]]

toil.lib.integration.get_workflow_root_from_dockstore(workflow, supported_languages=None)[source]

Given a Dockstore URL or TRS identifier, get the root WDL or CWL URL for the workflow.

Accepts inputs like:

Assumes the input is actually one of the supported formats. See is_dockstore_workflow().

TODO: Needs to handle multi-workflow files if Dockstore can.

Parameters:
  • workflow (str)

  • supported_languages (Optional[set[str]])

Return type:

str

toil.lib.integration.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.

Parameters:
  • workflow (str)

  • supported_languages (Optional[set[str]])

Return type:

str