|
| 1 | +# nf-core/configs: MSSM Configuration |
| 2 | + |
| 3 | +This nextflow profiles has been configured to be run with nf-core maintained pipelines for use on the **Minerva HPC** cluster at the **Icahn School of Medicine at Mount Sinai**. All testing has been done within pipelines that follow the DLS2 framework. |
| 4 | + |
| 5 | +Run the pipeline with `-profile mssm`. This will download and launch the [`mssm.config`](../conf/mssm.config) which has been pre-configured with a setup suitable for the Minerva HPC cluster. Using this profile, a container image containing all of the required software will be downloaded, and converted to a Singularity image before execution of the pipeline. While this is typically governed by the configuration and execution framework, some manual adjustments will be needed at times. See custom configurations to address this. |
| 6 | + |
| 7 | +## Contact Information |
| 8 | + |
| 9 | +**HPC Support:** hpchelp@hpc.mssm.edu |
| 10 | +**Author:** Christopher Tastad - Judy Cho Lab |
| 11 | +**Email:** christopher.tastad@mssm.edu |
| 12 | + |
| 13 | +## Required Environment Setup |
| 14 | + |
| 15 | +Before running any nf-core pipeline on Minerva, you **must set the MINERVA_ALLOCATION environment variable** in your submission script: |
| 16 | + |
| 17 | +```bash |
| 18 | +export MINERVA_ALLOCATION="acc_YOUR-PROJECT-NAME" |
| 19 | +``` |
| 20 | + |
| 21 | +## Module Requirements |
| 22 | + |
| 23 | +To run nf-core pipelines on Minerva, you need Nextflow and Singularity. Through experience, it has been found that the local nextflow module can produce some difficulties with execution, and the conda environment installation given by nf-core is preferred. |
| 24 | + |
| 25 | +```bash |
| 26 | +ml java |
| 27 | +ml anaconda3 |
| 28 | +ml singularity-ce |
| 29 | + |
| 30 | +# Activate Nextflow from conda environment |
| 31 | +source /hpc/packages/minerva-centos7/anaconda3/2018.12/etc/profile.d/conda.sh |
| 32 | +conda init bash |
| 33 | +conda activate nextflow |
| 34 | +``` |
| 35 | + |
| 36 | +## Proxy Configuration |
| 37 | + |
| 38 | +Minerva requires proxy settings to download containers from remote sources: |
| 39 | + |
| 40 | +```bash |
| 41 | +export http_proxy=http://172.28.7.1:3128 |
| 42 | +export https_proxy=http://172.28.7.1:3128 |
| 43 | +export all_proxy=http://172.28.7.1:3128 |
| 44 | +export no_proxy=localhost,*.chimera.hpc.mssm.edu,172.28.0.0/16 |
| 45 | +``` |
| 46 | + |
| 47 | +## Configuration Details |
| 48 | + |
| 49 | +This profile includes: |
| 50 | + |
| 51 | +- **LSF executor** configuration optimized for Minerva |
| 52 | +- **Dynamic queue selection** based on job requirements: |
| 53 | + - `express` queue for short jobs (≤12h, ≤8 CPUs) |
| 54 | + - `premium` queue for standard jobs |
| 55 | + - `long` queue for jobs >144h |
| 56 | + - `gpu` and `gpuexpress` queues for GPU workloads |
| 57 | +- **Singularity container** support with proper cache directories |
| 58 | +- **Error handling** strategies with automatic retries |
| 59 | + |
| 60 | +## Example Submission Script |
| 61 | + |
| 62 | +```bash |
| 63 | +#!/bin/bash |
| 64 | +#BSUB -J nfcore-pipeline-job |
| 65 | +#BSUB -P acc_YOUR-PROJECT-NAME |
| 66 | +#BSUB -W 48:00 |
| 67 | +#BSUB -q premium |
| 68 | +#BSUB -n 2 |
| 69 | +#BSUB -R rusage[mem=8GB] |
| 70 | +#BSUB -R span[hosts=1] |
| 71 | +#BSUB -o output_%J.stdout |
| 72 | +#BSUB -eo error_%J.stderr |
| 73 | +#BSUB -L /bin/bash |
| 74 | + |
| 75 | +PROJ_DIR=/path/to/project/ |
| 76 | +NFC_PIPE=nf-core/rnaseq |
| 77 | +NFC_VER=3.18.0 |
| 78 | +NFC_PROFILE=mssm,singularity |
| 79 | +SAMPLESHEET=$PROJ_DIR/samplesheet.csv |
| 80 | +OUTDIR=$PROJ_DIR |
| 81 | +GENOME=GRCh38 |
| 82 | + |
| 83 | +# Required environment variable |
| 84 | +export MINERVA_ALLOCATION='acc_YOUR-PROJECT-NAME' |
| 85 | + |
| 86 | +# Proxy settings |
| 87 | +export http_proxy=http://172.28.7.1:3128 |
| 88 | +export https_proxy=http://172.28.7.1:3128 |
| 89 | +export all_proxy=http://172.28.7.1:3128 |
| 90 | +export no_proxy=localhost,*.chimera.hpc.mssm.edu,172.28.0.0/16 |
| 91 | + |
| 92 | +# Load modules |
| 93 | +ml java |
| 94 | +ml anaconda3 |
| 95 | +ml singularity-ce |
| 96 | + |
| 97 | +# Set up Nextflow environment |
| 98 | +source /hpc/packages/minerva-centos7/anaconda3/2018.12/etc/profile.d/conda.sh |
| 99 | +conda init bash |
| 100 | +conda activate nextflow |
| 101 | + |
| 102 | +cd $PROJ_DIR |
| 103 | + |
| 104 | +# Run pipeline |
| 105 | +nextflow run $NFC_PIPE \ |
| 106 | + -r $NFC_VER \ |
| 107 | + -profile $NFC_PROFILE \ |
| 108 | + -w /sc/arion/scratch/${USER}/work \ |
| 109 | + -c $PROJ_DIR/custom.config \ |
| 110 | + --input $SAMPLESHEET \ |
| 111 | + --outdir $OUTDIR \ |
| 112 | + --genome $GENOME |
| 113 | +``` |
| 114 | + |
| 115 | +## Custom Configuration |
| 116 | + |
| 117 | +Users can supplement the base configuration by creating a `custom.config` file. Many processes require minor modifications address specific parameters of a dataset or condition. Given the generalized nature of the main config profile and diversity of process requirements, needing this flexibility is common. |
| 118 | + |
| 119 | +```nextflow |
| 120 | +process { |
| 121 | + withName: 'PICARD_MARKDUPLICATES' { |
| 122 | + ext.suffix = 'bam' // Explicitly set the suffix to avoid using getExtension() |
| 123 | + } |
| 124 | +
|
| 125 | + withName: 'STRINGTIE_STRINGTIE' { |
| 126 | + memory = '24.GB' // Increase to at least 2-3x the default |
| 127 | + } |
| 128 | +} |
| 129 | +``` |
| 130 | + |
| 131 | +## Troubleshooting |
| 132 | + |
| 133 | +### Common Issues |
| 134 | + |
| 135 | +- **Singularity cache errors**: If you encounter errors related to Singularity caching, check your scratch or work space allocation, and clean up the cache directory if needed. A common issue is related to the singularity `pullTimeout` argument. Large, remote images may exceed this and would benefit from being pulled into the cache manually. |
| 136 | +- **Memory issues**: Some processes may require more memory than the default allocation. Use a custom config to increase memory for specific processes. |
| 137 | +- **LSF job submission failures**: Ensure your MINERVA_ALLOCATION variable is set correctly and that you have sufficient allocation hours remaining. |
| 138 | + |
| 139 | +## Tested Versions |
| 140 | + |
| 141 | +This configuration has been tested with: |
| 142 | + |
| 143 | +- Nextflow: 24.10.3 |
| 144 | +- Singularity-ce: 4.1.1 |
| 145 | +- nf-core pipelines: DSL2 compatible (2022-2025) |
| 146 | + |
| 147 | +:::note |
| 148 | +You will need an account and allocation on the Minerva HPC cluster to run nf-core pipelines. For accounts and allocation requests, contact your lab administrator or hpchelp@hpc.mssm.edu. |
| 149 | +::: |
| 150 | + |
| 151 | +:::note |
| 152 | +All jobs will be submitted to the cluster via LSF scheduler. For technical assistance with the HPC environment, contact hpchelp@hpc.mssm.edu. |
| 153 | +::: |
0 commit comments