Home

Awesome

nextflow-demos

NOTE: This is not an official Nextflow documentation repo, this is just my personal collection of code snippets to use in Nextflow workflows. Be sure to see the links to the official Nextflow resources listed at the bottom of this page and listed here.

NOTE: Some of the techniques demonstrated here may be deprecated by the new DSL2 syntax offered by Nextflow. Be sure to check that out as well. Many of these examples were written prior to the development of new Nextflow programming syntaxes and techniques and prior to the deprication of some old ones. At this point there are too many examples for me to go back and update everything so I will likely leave things as-is until I need to revisit an old method for myself.

This repository contains demonstrations of various programming techniques for use inside Nextflow pipelines. This repository is meant to be a supplement to the official Nextflow documentation (links below).

Install

Clone this repo:

git clone git@github.com:stevekm/nextflow-demos.git
cd nextflow-demos

These days, I usually use the included environment.yml file to create a conda environment to install Nextflow into for general use. If you would like to use this env, please read the description inside the file carefully since usage of some included bioconda packages requires specific commands to be run in a specific order for conda to easily resolve the package installs.

Once you have Nextflow installed (either via the official methods or via conda, etc.) then you can run most included pipeline demo's with a command like

nextflow run main.nf

Unless otherwise noted in the demos' included README files.

You can also view the contents of included Makefiles to see other run commands and args that might be used, though I no longer actually use the Makefiles myself for workflow execution. Newer demo's will likely not include a Makefile and will just utilize nextflow run or other commands listed in the README.

Contents

Each subdirectory contains files to run sample Nextflow pipelines.

Files

Sample Pipeline Directories

(listed in recommended order for new users)

Extras

Resources

Examples