Common Workflow Language User Guide


This guide will introduce you to writing tool wrappers and workflows using the Common Workflow Language (CWL). This guide describes the stable specification, version 1.0. Updates to the guide for more recent versions are ongoing.

Contributions and Feedback are Welcome!

This document is a work in progress. Not all features are covered, yet. If you find that something is missing from this guide, or if you’d like to provide other feedback, we would be delighted if you would file an Issue on the project repository for this guide. You can also suggest changes directly by clicking the “Edit on GitHub” button at the top-right of the relevant page.



Setup Download files required for the lesson
00:00 1. Introduction What is Common Workflow Language?
Why might I want to learn to use CWL?
00:00 2. First Example How do I write a CWL description of a simple command line tool?
00:05 3. Essential Input Parameters How can I pass arguments to a command?
How is the order of parameters defined for a command?
00:15 4. Returning Output Files Where does the output of a command go?
How can I save the output of a command?
00:25 5. Capturing Standard Output How do I capture the standard output stream of a command?
00:35 6. Parameter References How can I re-use parameter values in another location?
00:45 7. Running Tools Inside Docker How do I run tools inside a Docker container?
00:55 8. Additional Arguments and Parameters How do I specify arguments that don’t require input values?
How do I refer to runtime parameters?
01:05 9. Array Inputs How do I provide multiple values for a single argument?
01:15 10. Array Outputs What do I do when a tool produces output in more than one file?
How do I specify which output files should be kept?
01:25 11. Advanced Inputs How do I describe which parameters must and must not be used in combination?
01:35 12. Environment Variables How do I set the value of environment variables for a tool’s execution?
01:45 13. JavaScript Expressions What do I do when I want to create values dynamically and CWL doesn’t provide a built-in way of doing so?
01:55 14. Creating Files at Runtime How do I create required input files from input parameters at runtime?
How do I invoke a script rather than just a simple command line?
Besides inputBinding, how else can I pass arguments to the tool?
02:05 15. Staging Input Files What can I do if a tool needs to be able to write output to the location where its input files are stored?
02:15 16. File Formats How can I mark the required file format for input files?
How can I mark the produced file format of output files?
02:25 17. Metadata and Authorship How do I make it easier for people to cite my tool descriptions?
02:35 18. Custom Types How do I create and import my own custom types into a CWL description?
02:45 19. Specifying Software Requirements How do I specify requirements/dependencies for a job?
What level of detail should I provide for a software requirement?
02:55 20. Writing Workflows How do I connect tools together into a workflow?
03:05 21. Nested Workflows How do I connect multiple workflows together?
03:15 22. Scattering Workflows How do I run tools or workflows in parallel?
03:25 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.