nf-core

How to run an nf-core pipeline on the PSMN
PSMN
nextflow
nf-core
Author

Laurent Modolo

Published

February 28, 2023

nf-core

nf-core is an international community effort to collect a curated set of analysis pipelines built using Nextflow.

Before starting to write your own NGS pipeline, head to the nf-core website and check if somebody else didn’t write it already. Moreover, if the solution provided by nf-core missing some things for your need you can build up from the available pipeline instead of writing everything from scratch.

PSMN

Setting up your environment

To use an nf-core pipeline on the PSMN you first need to set up a few things:

Add the following line in your ~/.bashrc or ~/.zshrc file:

2023/06/26 edit add the -b /home for the charliecloud update

PATH=/Xnfs/abc/charliecloud_bin/:/Xnfs/abc/nextflow_bin:$PATH

This will add the nextflow and charliecloud binaries to your PATH and create a shortcut to use the last nf-core tools image with charliecloud.

Downloading an nf-core pipeline

You can use the following command to download any nf-core pipeline for this list.

The following example uses the rnaseq pipeline. You need to replace the <user_name> with your PSMN login.

ch-run -b /scratch:/scratch -b /Xnfs -b /home -c $(pwd) /Xnfs/abc/charliecloud/img/nfcore%tools+2.6 -- \
  nf-core download rnaseq -r 3.8.1 --outdir /scratch/Bio/<user_name>/nf-core-rnaseq -x none -c none

With :

  • rnaseq the name of the pipeline
  • 3.8.1 the version of the pipeline
  • /scratch/Bio/<user_name>/nf-core-rnaseq the absolute path of the folder where to save the pipeline

If this is the first time that this pipeline is launched at the PSMN you then need to download the charliecloud containers corresponding to this pipeline.

cd /scratch/Bio/<user_name>/nf-core-rnaseq/
pull_ch_images.sh
Warning

You may encounter Permission denied errors when running the pull_ch_images.sh scripts. You can bypass this problem by downloading charliecloud containers inside your home directory (folder ~/charliecloud_storage/) and move them in the shared location (/Xnfs/abc/charliecloud/). To do that run:

cd /scratch/Bio/<user_name>/nf-core-rnaseq/
pull_ch_images_locally.sh

Running an nf-core pipeline on the PSMN

You can use a combination of the test and psmn profile to test your pipeline on the PSMN:

cd /scratch/Bio/<user_name>/nf-core-rnaseq/
nextflow run workflow -profile test,psmn --outdir results_test

If everything works, you can head to your pipeline documentation and only keep the -profile psmn to run your pipeline on the PSMN.