Thanks to the ability of Nextflow to fetch the dependencies and the pipeline itself, you will need to install Nextflow and one of the supported dependency engines:
- Docker (recommended if already installed)
- Conda (recommended if you don't have Docker)
- Singularity (for use in offline clusters)
If you don't have Nextflow installed:
- Ensure you have Java 11 or higher installed:
java -version
- Create your binary package:
curl -s https://get.nextflow.io | bash
# will place ./nextflow in your current directory
- Move the package in a directory in your
$PATH
:
# An example if you are in the sudoers
sudo mv nextflow /usr/local/bin
# ...or if you are not
mkdir -p "$HOME"/bin
mv nextflow "$HOME"/bin
export PATH="$PATH":"$HOME"/bin
echo "export PATH=$PATH:$HOME/bin" >> "$HOME"/.bashrc
If you already have Docker
installed (check with docker --version
),
you can use the pipeline with the -profile docker
option,
which is the recommended way:
nextflow run telatin/getreads -profile docker -r main \
--list list.txt --outdir reads/
💡 Double dash parameters are for the pipeline itself, single dashed are for the Nextflow executor.
If you don't have Miniconda installed, you can install it as described here.
Once you have Miniconda installed, you can run the pipeline with the -profile conda
option:
nextflow run telatin/getreads -profile conda -r main\
--list list.txt --outdir reads/
If you have Singularity installed (check with singularity --version
), use -profile singularity
.
You will need online access to download the Singularity image from Docker Hub, but once you have it, you can run the pipeline in offline mode.
To manually fetch the image, run:
# Download the image to a convenient location specified with --name
singularity pull --name "getreads.img" docker://andreatelatin/getreads:2.0
To manually feed the image:
# Assuming the image path is $PATH_TO_SIF
nextflow run getreads/main.nf -with-singularity $PATH_TO_SIF \
--list list.txt --outdir reads/
You can clone the repository to have an easier way to modify the pipeline. In this example we will clone the repository and create a permanent conda environment using mamba (see here):
One time steps:
# Clone the repository in a convenient location
git clone https://github.com/telatin/getreads.git
# Generate an environment with the required dependencies
mamba create -n getreads getreads/deps/env.yaml
Pipeline execution
# Activate the environment
conda activate getreads
# Run the pipeline (no profile needed)
nextflow run path_to/getreads/main.nf \
--list list.txt --outdir reads/