Nextflow

Nextflow is a relatively new vertical execution stack for bioinformatics and takes a unique approach by providing a groovy based DSL that is reactive streams based. Nextflow supports multiple backends including Docker and supports any POSIX compatible system. Windows systems are only supported through WSL. Below outlines how to run Nextflow locally using Docker.

Prerequisites

  1. Java 8+
  2. Docker
  3. (Optional) cURL
  4. (Optional) git
  5. (Optional) Conda
  6. (For Windows only) WSL

Getting Started

The following software and workflow are required and will be downloaded, installed, and used as part of this tutorial:

  1. Nextflow
  2. 02_download_collection_files.nf
  3. nextflow.config

Download the worked examples repository by one of the following methods.

  1. Clone with Git
    1
    
    git clone https://github.com/DNAstack/dnastack-client-library-worked-examples.git
    
  2. Or download 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.

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

Download and install Nextflow by one of the following methods.

  1. Using cURL or direct from this link, and allow execution permission
    1
    2
    3
    
    curl -o nextflow -L https://get.nextflow.io # Or directly from web link
    
    chmod +x nextflow
    
  2. Or using Conda
    1
    
    conda install -c bioconda nextflow
    

Running the workflow

To run the workflow:

1
./nextflow run --config examples/nextflow/nextflow.config examples/nextflow/02_download_collection_files.nf

Output files can be found in the current directory.

Nextflow Tower

Optionally, Nextflow Tower allows remote monitoring, logging, and observability to Nextflow workflows through a centralized command-post.

To use Netflow Tower with the workflow, add the following to the configuration file nextflow.config. Replace <YOUR TOKEN> with your specific access token.

1
2
3
4
5
docker.enabled = true
tower {
    enabled = true
    accessToken = '<YOUR TOKEN>'
}

Your access token can be found by navigating to the user menu, and to Your tokens.

Details about the workflow job can be found by navigating to runs.