nf-core/configs: Cannon Configuration

All nf-core pipelines have been successfully configured for use on the Cannon CLUSTER at Harvard FAS.

To use, run the pipeline with -profile cannon. This will download and launch the cannon.config which has been pre-configured with a setup suitable for the Cannon cluster. Using this profile, a docker image containing all of the required software will be downloaded, and converted to a Singularity image before execution of the pipeline.

Below are non-mandatory information e.g. on modules to load etc

Before running the pipeline you will need to load Java and Python using the environment module system on Cannon. You can do this by issuing the commands below:

## Load Nextflow and Singularity environment modules
module purge
module load jdk
module load python
Note

You will need an account to use the HPC cluster on PROFILE CLUSTER in order to run the pipeline. If in doubt contact FASRC.

Note

Nextflow will need to submit the jobs via the job scheduler to the HPC cluster and as such the commands above will have to be executed on one of the login nodes or on an interactive node. For best practice, submit the nextflow head job as a sbatch script. Example below. If in doubt contact FASRC.

#!/bin/bash
#SBATCH -c 1                # Number of cores (-c)
#SBATCH -t 0-02:00          # Runtime in D-HH:MM, minimum of 10 minutes
#SBATCH -p shared   # Partition to submit to
#SBATCH --mem=8G           # Memory pool for all cores (see also --mem-per-cpu)
#SBATCH -o nf_job_%j.out    # File to which STDOUT will be written, including job ID
 
# need to load modules
module load jdk
module load python
 
# Run nextflow
nextflow run nf-core/rnaseq -profile cannon

Config file

See config file on GitHub

params{
    config_profile_description = 'Harvard FAS Cannon Profile for running nextflow pipelines.'
    config_profile_contact = 'Lei Ma (@microlei)'
    config_profile_url = 'https://www.rc.fas.harvard.edu/'
    max_memory = 2000.GB
    max_cpus = 112
    max_time = 14.d
}

// disable this if you want to use conda environments instead
// docker is not supported on the Cannon cluster
singularity {
    enabled = true
    autoMounts = true
}

executor {
    name = 'slurm'
    queueSize = 2000
    submitRateLimit = '10/sec'
}

process {
    executor = 'slurm'
    resourceLimits = [
        memory: 2000.GB,
        cpus: 112,
        time: 14.d
    ]
    // default time, cpu, and memory for processes that do not specify these resources
    // These will be overridden by any process that specifies its own
    // see Running Jobs https://docs.rc.fas.harvard.edu/kb/running-jobs/
    time = 10.m // time is required or job won't run
    cpus = 1
    memory = 100.MB

    scratch = true
    queue = {
        // GPU handling
        if (task.ext.gpu == true) {
            if (task.ext.gpu_type == 'h200') {
                return 'gpu_h200'
            } else {
                return 'gpu'
            }
        }

        def mem = task.memory
        def t   = task.time

        if (t > 3.d) {
            // Long jobs
            if (mem > 990.GB) {
                return 'bigmem_intermediate'  // limit 14d, 2000 GB
            } else {
                return 'intermediate'         // limit 14d, 990 GB
            }
        } else {
            // ≤ 3d jobs
            if (mem > 990.GB) {
                return 'bigmem'               // limit 3d, 1988 GB
            } else if (mem > 184.GB) {
                return 'sapphire'             // limit 3d, 990 GB
            } else {
                return 'shared'               // largest pool for small jobs, limit 3d, 184 GB
            }
        }
    }
}