# CWL Tool

Common Workflow Language (CWL) provides an alternative workflow specification to WDL. This guide demonstrates running the `02_download_collection_files` workflow in CWL format using CWLtool and Docker.

### Prerequisites

* Python 3.6 or higher
* [Docker](https://docs.docker.com/desktop/)
* Optional: cURL and git

## Setup Instructions

You'll need to download:

* [cwltool](https://github.com/common-workflow-language/cwltool)
* [02\_download\_collection\_files.wdl](https://raw.githubusercontent.com/DNAstack/dnastack-client-library-worked-examples/master/examples/wdl/02_download_collection_files.wdl)

### Getting the Example Workflow

Download the worked examples repository using either method:

#### Clone with Git

```shell
git clone https://github.com/DNAstack/dnastack-client-library-worked-examples.git
```

Or [Download](https://github.com/DNAstack/dnastack-client-library-worked-examples/archive/refs/heads/master.zip) and Unzip

It is assumed that all commands will be run from the root directory of this repository on your local machine. From the directory where you’ve downloaded the examples repository.

```
cd dnastack-client-library-worked-examples/
```

### Installing CWL Tool

Install cwltool using either method:

Download and install [cwltool](https://github.com/common-workflow-language/cwltool) by one of the following methods.

#### Using `apt` for Debian, Ubuntu, and similar Linux distributions

```shell
sudo apt-get install cwltool
```

#### Or use `pip`

```shell
pip3 install cwlref-runner cwltool
```

## Running the workflow

To run the workflow:

```shell
cwltool ./examples/cwl/02_download_collection_files.cwl
```

Output files can be found in the current directory.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.omics.ai/products/analysis/integrations/cwl-tool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
