Running CWL in Command Line

Prerequisite

If this is your first time running a cwl, we recommend that you follow the initial setup guide first.

Initial Setupchevron-right
  • A CWL

  • Access to Iris cluster

    • We use islogin01.mskcc.org

  • Load Singularity version 3.7.1

    • module load migration-testing/singularity/3.7.1

  • Load python 3.10.13

    • module load migration-testing-spack/python/3.10.13

  • A python virtualenv with the latest version of toil installed

  • Node.js installed

    • Check if you have node installed with node -v ; if not, see Install Node.js

Get/git ARGOS CWL

Get the CWL and git clone it to your desired working directory from github:

This will put argos-cwl into a subdirectory in your work directory named argos-cwl.

Setup the singularity cache

Follow this link to setup the singularity cache

Setup Singularity cachechevron-right

Running CWL commands with toil-cwl-runner

Toil-cwl-runner is an executor for cwl that can run the workflow in single-machine (single node), on the LSF or SLURM scheduler

Prerequisite

  • A python virtual envionment/venv; assuming it's set to VENV_PATH -activate with toil installed:

    • source $VENV_PATH/bin/activate

  • A CWL in your working directory; we will use CMO-Filloutarrow-up-right as an example, retrieved from above

  • Input files for the CWL

If you are running argos-cwl, you can find an example input.yaml for alignment-pair.cwl or project-workflow-sv.cwl located below.

Option 1: Running with SBATCH command on SLURM

  1. Create a SLURM script such as, my_script.slurm . For alignment-pair.cwl the below script can be used:

  1. Run command sbatch my_script.slurm

  2. The standard output and standard error are directed to single.%j.out and single.%j.err where "%j" is replaced by the job number

Option 2: Running with input yaml generated through cwltool

chevron-rightYou can use cwltool to create a template yaml, as defined by the CWLhashtag

The my_input.yaml file should look like the following:

Configure my_input.yaml with the input data for our test - optional fields can and should be deleted or commented out if they will not be used:

circle-info

Note: bams is an array of File OR an array of string, or some combination of both. When specifying a list, make sure it adheres to standard YAML syntax: a list can be denoted by a leading hyphen (-) or the elements in the list can be specified by enclosing brackets.

Running on LSF:

Option 3: Running through command line arguments

Usage

To view usage arguments to pass to the CWL, do

circle-info

If you need to list an array of files, you can do so by specifying the arguments multiple times. See "bams" in this example below

circle-info

If you are running TOIL on LSF make sure to add the LSF arguments from the "Running on LSF" section above.

Getting outputs

When your run finishes you will get:

Last updated

Was this helpful?