PSMN migration

What to do with nextflow and the new PSMN configuration
PSMN
nextflow
Author

Laurent Modolo

Published

December 15, 2022

charliecloud

First of all makes sure that you have the following $PATH

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

and add this line to your ~/.bashrc or ~/.zshrc file to make the change permanent.

Here are some example of charliecloud usage to replace singularity:

  • build a container from the DockerHub (where nfcore/tools:2.6 is the container):
ch-image pull -s /Xnfs/abc/charliecloud/ nfcore/tools:2.6
  • build a container from quay.io (where biocontainers/fastp:0.23.2--h5f740d0_3 is the container):
ch-image pull -s /Xnfs/abc/charliecloud/ quay.io/biocontainers/fastp:0.23.2--h5f740d0_3

Run a container:

Before running a container make sure that there is a /scratch directory at the root of the container image

update_ch_image.sh

LBMC pipelines

If you want to test slurm and charliecloud with nextflow on the PSMN please do the following in your nextflow pipeline folder:

git remote add upstream git@gitbio.ens-lyon.fr:LBMC/nextflow.git
git pull upstream master

To update your pipeline (DSL2) with the last configuration files:

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

and add this line to your ~/.bashrc or ~/.zshrc file to make the change permanent.

Run your pipeline with the -profile psmn

Complain on element, if it’s not working

Voila

nf-core pipeline

edit: you can check this post for an up to date guide

Here is an example on how to run an nf-core pipeline on the PSMN:

Once you added PATH=/Xnfs/abc/charliecloud_bin/:$PATH to your path you can download a pipeline like so (for the rnaseq pipeline):

cd  <your scratch directory>
ch-run -b /scratch:/scratch \
  /Xnfs/abc/charliecloud/img/nfcore%tools+2.6 -- nf-core \
  download rnaseq -r 3.9 --outdir <your scratch directory>/nf-core-rnaseq -x none -c none

Move to your nf-core-rnaseq folder

cd nf-core-rnaseq

Download the right configuration files for the PSMN:

rm -R configs
git clone https://github.com/l-modolo/nf-core-configs.git configs

Launch the pipeline with the PSMN profile.

Warning

We are currently working on improving the nextflow support for charliecloud. A patched version of nextflow is available on the PSMN here : /Xnfs/abc/nextflow_bin/nextflow. Older version of nextflow are also available for the DSL1 pipelines.

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

and add this line to your ~/.bashrc or ~/.zshrc file to make the change permanent.

With this version you can enable the readOnlyInputs input in charliecloud.

You have to update your configs/conf/psmn.config to the following:

charliecloud {
  enabled = true
  cacheDir = "/Xnfs/abc/charliecloud"
  runOptions = "--bind /scratch:/scratch --bind /Xnfs:/Xnfs --bind /home:/home"
  readOnlyInputs = true
}
}
nextflow run workflow -profile test,psmn --outdir results/

For your own pipeline you can modify the PSMN profile as follow:

psmn {
    charliecloud.enabled = true
    charliecloud.cacheDir = "/Xnfs/abc/charliecloud"
    charliecloud.runOptions = "--bind /scratch:/scratch --bind /Xnfs:/Xnfs --bind /home:/home"
    charliecloud.readOnlyInputs = true