Skip to content

How to use Singularity

Alessia Visconti edited this page Mar 23, 2021 · 7 revisions

This tutorial explains how to use YAMP with Singularity.

YAMP and Singularity

YAMP takes advantage of a multi-image scenario. This means that each process will specify which container should be used, along with its version (as explained in the Multi image scenario tutorial).

YAMP also provides a singularity profile that can be used to tell Nextflow to enable the use of Docker, as in the following example:

nextflow run YAMP.nf --reads1 myfile_R1.fq.gz --reads2 myfile_R2.fq.gz --prefix my_sample  
   --outdir output_folder --mode complete --profile base,singularity

The singularity profile is defined (along with all the other Nextflow YAMP profiles) in the nexflow.config file as follow:

singularity.enabled = true

More information on YAMP preset profiles and how to create and combine them are available here.

A word of caution

Nextflow should be installed independently as explained here.

Nextflow orchestrates, in a transparent fashion, the flow of the pipeline by wrapping and executing each step using the singularity run command. Thus, Nextflow lies outside the container, which is responsible for instantiating.

You can find more information about Singularity containers and Nextflow here.

Retro compatibility

YAMP multi-image scenario and docker profile were introduced in version 0.9.5. The yampdocker file provided with previous versions is no longer compatible but mostly outdated and should not be used. If this is a problem for you, please open an issue and we will try to help.