Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
alefisico committed Nov 14, 2024
1 parent e2a990e commit ec10cc1
Showing 1 changed file with 39 additions and 4 deletions.
43 changes: 39 additions & 4 deletions episodes/REANA.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,51 @@ While REANA is primarily a tool for reproducible analysis, it effectively functi

## Understanding the Basics

REANA offers flexibility in workflow management by supporting multiple systems like [CWL](https://www.commonwl.org/), [Serial](https://docs.reana.io/running-workflows/supported-systems/serial/), (Yadage)[https://yadage.readthedocs.io/en/latest/], and Snakemake. While there's a growing adoption of Snakemake within the LHC community due to its large external user base and strong support, REANA remains agnostic to the chosen workflow system. However, due to its popularity and powerful features, we will primarily focus on Snakemake throughout this tutorial.
REANA offers flexibility in workflow management by supporting multiple systems like [CWL](https://www.commonwl.org/), [Serial](https://docs.reana.io/running-workflows/supported-systems/serial/), [Yadage](https://yadage.readthedocs.io/en/latest/), and Snakemake. While there's a growing adoption of Snakemake within the LHC community due to its large external user base and strong support, REANA remains agnostic to the chosen workflow system. However, due to its popularity and powerful features, we will primarily focus on Snakemake throughout this tutorial.


### A REANA workflow

While a Snakemake worflow is defined in a snakefile, in REANA one needs to create a REANA file to include all the parameters that the snakemake workflow will need.

Let's retake the previous SUSY example, and try to run it using REANA.


Let's retake the previous SUSY example, and try to run it using REANA. First we need to write a `reana.yaml` file:

```YAML
version: 0.9.3
inputs:
directories:
- SUSY/
parameters:
input: inputs.yaml
files:
- Snakefile
workflow:
type: snakemake
file: Snakefile
resources:
cvmfs:
- cms.cern.ch
workspace:
retention_days:
output/*: 30
outputs:
directories:
- output/
```
The `reana.yaml` file acts as a blueprint for your REANA workflow, defining essential information for execution.

- `version` (optional): Since REANA is under development, specifying the version used (e.g., `0.9.3` at the time of writing) can be helpful for troubleshooting.
- `inputs`: This section defines the files, folders, and parameters your workflow requires. Remember that we need to upload all necessary files before the workflow runs.
- `directories` and `files`: Specify the files and folders to be uploaded to the REANA platform.
- `parameters`: In this example, workflow parameters are defined in a separate
`inputs.yaml` file, so we reference the input file here. You can also define parameters directly within reana.yaml.
- `workflow`: This crucial section tells REANA about the type of workflow you're using.
- `type`: we are using `snakemake`, but REANA supports CWL, Serial or Yadage. ([More here](https://docs.reana.io/running-workflows/supported-systems/)).
- `file`: This defines the location of your workflow script.
- `resources`: Define any **global** resources required for your workflow execution (detailed information available at [here](https://docs.reana.io/advanced-usage/)). Remember that you can also define dedicated rule resources in the snakefile.

Check warning on line 68 in episodes/REANA.md

View workflow job for this annotation

GitHub Actions / Build Full Site

[uninformative link text]: [here](https://docs.reana.io/advanced-usage/)
- `workspace`: some useful options can be included here, like how many days a user wants a specific folder to be retain (`retention_days`)
- `outputs`: this is mandatory, and tells REANA which files or folders can be directly download once the workflow runs. It can be files or directories.


:::::: keypoints
Expand Down

0 comments on commit ec10cc1

Please sign in to comment.