Skip to content
Snippets Groups Projects
Commit 4f04827f authored by Vasileios Georgopoulos's avatar Vasileios Georgopoulos
Browse files

Rename README.txt to README.md

parent 2678f5e3
Branches python-package
No related tags found
No related merge requests found
# CASE 1: Containerized CWL Workflow
## Description
If a CWL workflow is already designed to run inside a container (the `.cwl` file contains the `DockerRequirement`), there is no need to convert the CWL into a different format for it to work in **StreamFlow**. Instead, **StreamFlow** can execute the CWL workflow as it is, by simply running the container that the CWL specifies.
## Files
- **`workflow.cwl`**: A simple tool (not a full workflow) that runs the `echo` command inside a **Docker container** (`DockerRequirement`) using the `ubuntu:latest` image. It takes an input string (`message`) that is passed to the `echo` command.
- **`job.yml`**: It contains the input message.
- **`streamflow.yml`**: The **StreamFlow** configuration file. It defines the **CWL workflow** (`workflow.cwl`) that will be executed, uses a settings file (`job.yml`) to define input parameters, and specifies the execution environment where the workflow runs.
## Requirements
- **`StreamFlow`** python package
- **`Docker`**
## Execution
```sh
streamflow run streamflow.yml
\ No newline at end of file
# CASE 2: CWL Workflow With One Step
## Description
This example showcases a **CWL workflow** that executes a step inside a **Docker container** using **StreamFlow**. Unlike a single CWL tool execution, this setup involves a **workflow (`workflow.cwl`)** that orchestrates the execution of a **CWL step (`echo_tool.cwl`)**.
The workflow:
- Takes an **input string**.
- Passes it to a **command-line tool (`echo_tool.cwl`)** that writes the message to a file.
- Captures the generated output.
The execution environment is **fully containerized** via **Docker (`ubuntu:latest`)**.
## Files
- **`workflow.cwl`**: A **CWL workflow** that defines a step (`echo_step`) running **`echo_tool.cwl`** inside a **Docker container (`ubuntu:latest`)**. It passes an **input string (`message`)** to the tool and retrieves an **output file**.
- **`echo_tool.cwl`**: A **CWL CommandLineTool** that executes the **`echo`** command, writing the received message to `output.txt`. This step runs inside a **Docker container (`ubuntu:latest`)**.
- **`job.yml`**: It contains the **input message**.
- **`streamflow.yml`**: The **StreamFlow configuration file**. It defines the **CWL workflow (`workflow.cwl`)** that will be executed, uses a **settings file (`job.yml`)** to define input parameters, and specifies the **execution environment** where the workflow runs.
## Requirements
- **`StreamFlow`** python package
- **`Docker`**
## Execution
```sh
streamflow run streamflow.yml
\ No newline at end of file
# CASE 2: CWL Workflow With One Step
## Description
This example showcases a **CWL workflow** that executes a step inside a **Docker container** using **StreamFlow**. Unlike a single CWL tool execution, this setup involves a **workflow (`workflow.cwl`)** that orchestrates the execution of a **CWL step (`echo_tool.cwl`)**.
The workflow:
- Takes an **input string**.
- Passes it to a **command-line tool (`echo_tool.cwl`)** that writes the message to a file.
- Passes the message to a second tool (length_tool.cwl), which prints the length of the message
- Captures the generated output.
The execution environment is **fully containerized** via **Docker (`ubuntu:latest`)**.
## Files
- **`workflow.cwl`**: A **CWL workflow** that defines two steps, (`echo_step`) running **`echo_tool.cwl`** and (`length_step`) running **`length_tool.cwl`** inside a **Docker container (`ubuntu:latest`)**.
- **`echo_tool.cwl`**: A **CWL CommandLineTool** that executes the **`echo`** command, writing the received message to `output.txt`. This step runs inside a **Docker container (`ubuntu:latest`)**.
- **`length_tool.cwl`**: A CWL CommandLineTool that calculates and prints the length of the message printed by **`echo_tool.cwl`**. This step also runs inside a Docker container (ubuntu:latest).
- **`job.yml`**: It contains the **input message**.
- **`streamflow.yml`**: The **StreamFlow configuration file**. It defines the **CWL workflow (`workflow.cwl`)** that will be executed, uses a **settings file (`job.yml`)** to define input parameters, and specifies the **execution environment** where the workflow runs.
## Requirements
- **`StreamFlow`** python package
- **`Docker`**
## Execution
```sh
streamflow run streamflow.yml
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment