Skip to content

Commit

Permalink
Update links to references
Browse files Browse the repository at this point in the history
Renamed workflow to 'workflow definition' when referring to the cwl file but also referencing running the workflow and the workflow inputs.
  • Loading branch information
alexiswl committed May 7, 2024
1 parent 5147b79 commit a008e71
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
7 changes: 5 additions & 2 deletions episodes/01-introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ The rise in popularity of workflows has been matched by a rise in the
number of disparate workflow managers that are available, each with their own
syntax or methods for describing the tools and workflows, reducing portability
and interoperability of these workflows. For a comprehensive lists of all known
computational workflow systems, see [Computational Data Analysis Workflow Systems](https://github.com/common-workflow-language/common-workflow-language/wiki/Existing-Workflow-systems)
maintained by the CWL community. The Common Workflow Language [CWL](https://www.commonwl.org)
computational workflow systems, see [Computational Data Analysis Workflow Systems][computational_data_analysis_workflow_systems]
maintained by the CWL community. The Common Workflow Language [CWL][cwl_home]
standard has been developed to address these problems, and to serve as a
open standard for describing how to run commandline tools and connect them
to create workflows.
Expand Down Expand Up @@ -198,5 +198,8 @@ workflow will be set up to connect these tools and generate the desired output f
[^3]: M. Wilkinson, M. Dumontier, I. Aalbersberg, et al. (2016): The FAIR Guiding Principles for scientific data management and stewardship. Scientific Data. [https://doi.org/10.1038/sdata.2016.18](https://doi.org/10.1038/sdata.2016.18)
[^4]: M. R. Crusoe, S. Abeln, A. Iosup, P. Amstutz, J. Chilton, N. Tijanić, H. Ménager, S. Soiland-Reyes, B. Gavrilović, C. Goble, The CWL Community (2021): Methods Included: Standardizing Computational Reuse and Portability with the Common Workflow Language. Communication of the ACM. [https://doi.org/10.1145/3486897](https://doi.org/10.1145/3486897)

[cwl_home]: https://www.commonwl.org
[computational_data_analysis_workflow_systems]: https://github.com/common-workflow-language/common-workflow-language/wiki/Existing-Workflow-systems
[docker]: https://www.docker.com/
[yaml_guide]: https://www.commonwl.org/user_guide/topics/yaml-guide.html

29 changes: 18 additions & 11 deletions episodes/03-dependency_graphs.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ exercises: 0
## Multi-Step Workflow

In the previous episode we worked through a single step workflow, carrying out quality control check
on RNA read of the fruitfly genome. In this episode the workflow is extended with an equivalent reverse
RNA read and the next two steps of the RNA-sequencing analysis, trimming the reads and
on RNA reads of the fruitfly genome. In this episode the workflow is extended with an equivalent reverse
RNA reads and the next two steps of the RNA-sequencing analysis, trimming the reads and
aligning the trimmed reads, are added.
We will be using the [`cutadapt`](https://bio.tools/cutadapt) and [`STAR`](https://bio.tools/star) tools for these tasks.
We will be using the [`cutadapt`][cutadapt] and [`STAR`][star] tools for these tasks.

To make a multi-step workflow that can carry all this analysis out, we add more entries
to the `steps` field.
Expand Down Expand Up @@ -95,7 +95,7 @@ This `ref_fruitfly_genome` is added in the `inputs` field of the workflow and in

## Running the new workflow

The workflow is complete and we only need to complete the YAML input file.
The workflow definition is complete and we now only need to write the YAML input file.

::::::::::::::::::::::: spoiler

Expand All @@ -107,7 +107,7 @@ The workflow is complete and we only need to complete the YAML input file.

:::::::::::::::::::::::

You have finished the workflow and the input file and now you can run the whole workflow.
We have finished the workflow definition and the input file and now can run the workflow.

```bash
cwltool --cachedir cache rna_seq_workflow_2.cwl workflow_input_2.yml
Expand All @@ -127,8 +127,9 @@ of the different steps. You can use for example Paint or print out the graph.
:::::::::::::::::::::::::::: solution

### Solution
To find out how the inputs and the steps are connected to each other, you look at the `in` field
of the different steps.

To find out how the inputs and the steps are connected to each other, look at the `in` field
of the different steps.

![](fig/Ep3_graph_answer.png){alt="Ep3 empty graph answer" style='height: "300px"'}

Expand All @@ -137,6 +138,7 @@ of the different steps. You can use for example Paint or print out the graph.
:::::::::::::::::::::::::::: callout

## Iterative working

Working on a workflow is often not something that happens all at once.
Sometimes you already have a shell script ready that can be converted to a CWL workflow.
Other times it is similar to this tutorial, you start with a single-step workflow and extend it to
Expand Down Expand Up @@ -174,8 +176,8 @@ workflow-level input or the presence of a particular output from another step.
### From CWL script to graph

In this example the workflow is already made, so the graph can be generated using
[cwlviewer](https://view.commonwl.org/) online or using `cwltool`. First, let's have a look at
[cwlviewer](https://view.commonwl.org/). To use this tool, the workflow has to be put in a GitHub,
[cwlviewer][cwl_viewer] online or using `cwltool`. First, let's have a look at
[cwlviewer][cwl_viewer]. To use this tool, the workflow has to be put in a GitHub,
GitLab or Git repository. To view the graph of the workflow enter the URL and click `Parse Workflow`.

The cwlviewer displays the workflow as a graph, starting with the input. Then the different steps
Expand All @@ -195,7 +197,7 @@ cwltool --print-dot rna_seq_workflow_2.cwl | dot -Tsvg > workflow_graph_2.svg
```

The resulting SVG file displays the same graph as the one in the cwlviewer. The SVG file can be
opened in any web browser and in [Inkscape](https://inkscape.org/), for example.
opened in any web browser and in [Inkscape][inkscape], for example.

:::::::::::::::::::::::::::::::: callout

Expand All @@ -207,7 +209,7 @@ Windows users can run `wslview workflow_graph_2.svg` in their terminal to view t

### Visualisation in VSCode

[__Benten__](https://marketplace.visualstudio.com/items?itemName=sbg-rabix.benten-cwl) is an extension
[__Benten__][benten] is an extension
in Visual Studio Code (VSCode) that among other things visualises a workflow in a graph. When Benten
is installed in VSCode, the tool can be used to visualise the workflow. In the top-right corner of
the VSCode window the CWL viewer can be opened, see the screenshot below.
Expand All @@ -230,3 +232,8 @@ The graph by VSCode/Benten doesn't show the output-input names between the diffe

::::::::::::::::::::::::

[cwl_viewer]: https://view.commonwl.org/
[inkscape]: https://inkscape.org/
[benten]: https://marketplace.visualstudio.com/items?itemName=sbg-rabix.benten-cwl
[cutadapt]: https://bio.tools/cutadapt
[star]: https://bio.tools/star
5 changes: 3 additions & 2 deletions episodes/04-reusing_tools.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The CWL documents of the previous steps were already provided for you, however,
In this episode you will use the bio-cwl-tools library to add the last step to the workflow.

## Adding new step in workflow
The last step of our workflow is counting the RNA-seq reads for which we will use the [`featureCounts`](https://bio.tools/featurecounts) tool.
The last step of our workflow is counting the RNA-seq reads for which we will use the [`featureCounts`][featurecounts] tool.

:::::::::::::::::::::::::::::: challenge

Expand Down Expand Up @@ -135,10 +135,11 @@ cwltool --cachedir cache rna_seq_workflow_3.cwl workflow_input_3.yml

::::::::::::::::::::::::::::: keypoints

- [bio-cwl-tools](https://github.com/common-workflow-library/bio-cwl-tools) is a library of CWL documents for biology/life-sciences related tools
- [bio-cwl-tools][bio-cwl-tools] is a library of CWL documents for biology/life-sciences related tools

:::::::::::::::::::::::::::


[bio-cwl-tools]: https://github.com/common-workflow-library/bio-cwl-tools
[featurecounts]: https://bio.tools/featurecounts
[featurecounts-cwl]: https://github.com/common-workflow-library/bio-cwl-tools/blob/release/subread/featureCounts.cwl

0 comments on commit a008e71

Please sign in to comment.