4 Saga Users
Specific instructions and good to know for SAGA users at NVI
4.1 Configure your bashrc if not done previously
We use aptainer on saga with containers. Nextflow manage the download of the containers that are employed by diplotopia pipeline for you. You will need to had at least the 4
If this has been done previously, please control the that the information is correct.
cd ~
nano .bashrc
You should have those lines in .bashrc
# NF environment variables
# This is required for nf-core pipelines (as well add it now)
export NXF_SINGULARITY_CACHEDIR=${USERWORK}/images
export NXF_SINGULARITY_LIBRARYDIR=${USERWORK}/images
# We want this to use apptainer with Nextflow
export NXF_APPTAINER_CACHEDIR=${USERWORK}/images
export NXF_APPTAINER_LIBRARYDIR=${USERWORK}/images
OPTIONAL : You can also add those lines if - you plan to do some debuging or test containers, outside of nextflow
export APPTAINER_CACHEDIR=${USERWORK}/images
export APPTAINER_LIBRARYDIR=${USERWORK}/images
export APPTAINER_BIND="$USERWORK,/cluster/projects/nn9305k/active/<username>,/cluster/projects/nn9305k/db_flatfiles"
4.2 Preparing command to run the pipeline in SAGA
Nextflow require JAVA to run. Before running a nextflow pipeline please do:
module purge
module load Java/17.0.4
I will recommend to use variables to define the paths of - nextflow : NF - the pipeline “launcher” : MAIN - the pipeline configuration file specifig to SAGA : CONFIG
# This is the git clone of diplotopia rep
REPO="/cluster/projects/nn9305k/active/evezeyl/projects/Saprolegnia/git/diplotopia"
# path files for running diplotopia
NF="/cluster/projects/nn9305k/bin/nextflow_23.04.4"
MAIN="${REPO}/main.nf"
CONFIG="${REPO}/conf/saga_sapro.config"
Then the basic synthax of a diplotopia will be:
$NF run $MAIN -c $CONFIG --out_dir <path_outputdirectory> -work-dir $USERWORK/diplotpia --track <track_choice> --input <input.csv> <changed_options> -profile apptainer -resume 2>&1 | tee nf.runlog
Notes: - You will need to fill what is in between <> with what you have chosen - change options needs 2 -
then the name of option, a space and the value of the option. Example : --remove_contaminants no
- you can look at all the options that you can change by looking at the options described in .nextflow.config
file, also online here - Using -resume
will allow the pipeline to start when it stoped (eg. if bugs osv, or when you are testing parameters) - 2>&1 | tee nf.runlog
is to redirecting the screen output and error to a log, this, to help us debug in case.
Now you have enough information, so you can transpose advises that are specified in How to run section