Python classes for loading, manipulating CWL documents¶
This is the reference implementation of the Common Workflow Language. It is intended to be feature complete and provide comprehensive validation of CWL files as well as provide other tools related to working with CWL.
Modules¶
Contents:
Example scripts¶
docker_extract.py¶
Tool to save docker images from a cwl workflow.
usage: docker_extract.py [-h] [-s] dir input
- dir¶
Directory in which to save images
- input¶
Input CWL workflow
- -h, --help¶
show this help message and exit
- -s, --singularity¶
Use singularity to pull the image
cwl_expression_refactor.py¶
Tool to refactor CWL documents so that any CWL expression are separate steps as either ExpressionTools or CommandLineTools. Exit code 7 means a single CWL document was provided but it did not need modification.
usage: cwl_expression_refactor.py [-h] [--etools] [--skip-some1]
[--skip-some2]
dir inputs [inputs ...]
- dir¶
Directory in which to save converted files
- inputs¶
One or more CWL documents.
- -h, --help¶
show this help message and exit
- --etools¶
Output ExpressionTools, don’t go all the way to CommandLineTools.
- --skip-some1¶
Don’t process CommandLineTool.inputs.inputBinding and CommandLineTool.arguments sections.
- --skip-some2¶
Don’t process CommandLineTool.outputEval or CommandLineTool.requirements.InitialWorkDirRequirement.
graph_split.py¶
Split the packed CWL.
usage: graph_split.py [-h] [-m MAINFILE] [-f {json,yaml}] [-p] [-C OUTDIR]
cwlfile
- cwlfile¶
- -h, --help¶
show this help message and exit
- -m <mainfile>, --mainfile <mainfile>¶
Specify the name of the main document.
- -f {json,yaml}, --output-format {json,yaml}¶
Specify the format of the output CWL files.
- -p, --pretty¶
Beautify the output CWL document, only works with yaml format.
- -C <outdir>, --outdir <outdir>¶
Output folder for the unpacked CWL files.
cwl_normalizer.py¶
Tool to normalize CWL documents. Will upgrade to CWL v1.2, and pack the result. Can optionally refactor out CWL expressions.
usage: cwl_normalizer.py [-h] [--etools] [--skip-some1] [--skip-some2]
[--no-expression-refactoring]
dir inputs [inputs ...]
- dir¶
Directory in which to save converted files
- inputs¶
One or more CWL documents.
- -h, --help¶
show this help message and exit
- --etools¶
Output ExpressionTools, don’t go all the way to CommandLineTools.
- --skip-some1¶
Don’t process CommandLineTool.inputs.inputBinding and CommandLineTool.arguments sections.
- --skip-some2¶
Don’t process CommandLineTool.outputEval or CommandLineTool.requirements.InitialWorkDirRequirement.
- --no-expression-refactoring¶
Don’t do any CWL expression refactoring.