# cwltool.subgraph

## Attributes

`UP` |
`DOWN` |
`INPUT` |
`OUTPUT` |
`STEP` |

## Functions

`find_step`(steps, stepid, loading_context) | Find the step (raw dictionary and WorkflowStep) for a given step id.
`get_subgraph`(roots, tool, loading_context) | Extract the subgraph for the given roots.
`get_step`(tool, step_id, loading_context) | Extract a single WorkflowStep for the given step_id.
`get_process`(tool, step_id, loading_context) | Find the underlying Process for a given Workflow step id.

## Module Contents

cwltool.subgraph.UP = 'up'

cwltool.subgraph.DOWN = 'down'

cwltool.subgraph.INPUT = 'input'

cwltool.subgraph.OUTPUT = 'output'

cwltool.subgraph.STEP = 'step'

cwltool.subgraph.find_step(steps, stepid, loading_context)

  Find the step (raw dictionary and WorkflowStep) for a given step id.

  Parameters:

    - steps (list[cwltool.workflow.WorkflowStep])

    - stepid (str)

    - loading_context (cwltool.context.LoadingContext)

  Return type:

    tuple[cwltool.utils.CWLObjectType | None, cwltool.workflow.WorkflowStep | None]

cwltool.subgraph.get_subgraph(roots, tool, loading_context)

  Extract the subgraph for the given roots.

  Parameters:

    - roots (collections.abc.MutableSequence[str])

    - tool (cwltool.workflow.Workflow)

    - loading_context (cwltool.context.LoadingContext)

  Return type:

    ruamel.yaml.comments.CommentedMap

cwltool.subgraph.get_step(tool, step_id, loading_context)

  Extract a single WorkflowStep for the given step_id.

  Parameters:

    - tool (cwltool.workflow.Workflow)

    - step_id (str)

    - loading_context (cwltool.context.LoadingContext)

  Return type:

    ruamel.yaml.comments.CommentedMap

cwltool.subgraph.get_process(tool, step_id, loading_context)

  Find the underlying Process for a given Workflow step id.

  Parameters:

    - tool (cwltool.workflow.Workflow)

    - step_id (str)

    - loading_context (cwltool.context.LoadingContext)

  Return type:

    tuple[Any, cwltool.workflow.WorkflowStep]