Skip to content Skip to footer

Using Nextflow with CVMFS

If you are running a Nextflow workflow, you can direct processes to use containers already in CVMFS rather than downloading them. This saves both time and storage.

Nextflow runs each workflow process in its own environment. When using containers, it normally pulls the required image automatically. On BioShell, you can override this behaviour by creating a config file that points processes to the existing CVMFS images.

Note: Nextflow always prioritises a -config file passed on the command line over the workflow’s built-in nextflow.config.


Using containers directly from CVMFS

Create a config file (e.g. cvmfs_path.config) that points a process to the container stored in CVMFS:

process {
    withName: 'FASTQC' {
        container = 'file:///cvmfs/singularity.galaxyproject.org/all/fastqc:0.12.1--hdfd78af_0'
    }
}

Using an installed SHPC module

Alternatively, if you have already installed a tool via Bio-Shelley or SHPC, you can reference it by module name instead of a container path:

process {
    withName: 'FASTQC' {
        module = 'fastqc/0.11.9'
    }
}

Note: The module value must match exactly what appears in module avail.


Running with your config override

Pass your config file on the command line when running the workflow:

nextflow run main.nf -profile singularity -config cvmfs_path.config