Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@

process {

withName: 'ASM_STATS' {
// storeDir handles persistence; no publishDir needed.
}

withName: 'ANTISMASH_RUN' {
publishDir = [
path: { params.target },
Expand Down
90 changes: 40 additions & 50 deletions conf/profile_annotate.config
Original file line number Diff line number Diff line change
Expand Up @@ -118,130 +118,120 @@ params {
workDir = "${launchDir}/work/annotate"
cleanup = false

// queue names, clusterOptions, and GPU options are UCR HPCC SLURM-specific —
// they live in conf/provision_ucr_hpcc.config, not here. This block contains
// only hardware resource requirements (cpus, memory, time) that are site-agnostic.
process {

withName: 'SETUP_TAXONDB' {
queue = 'short'; cpus = 1; memory = '4 GB'; time = '1h'
cpus = 1; memory = '4 GB'; time = '1h'
}

withName: 'SETUP_FUNANNOTATE_DB' {
// Network-bound multi-GB download of BUSCO + all funannotate DBs; needs a
// long-running queue (short caps at 2h). Runs once, then storeDir-skipped.
queue = 'epyc'; cpus = 2; memory = '8 GB'; time = '12h'
// Network-bound multi-GB download of BUSCO + all funannotate DBs.
// Runs once per project, then storeDir-skipped.
cpus = 2; memory = '8 GB'; time = '12h'
}

withName: 'SETUP_AUGUSTUS_CONFIG' {
// Local filesystem copy of the installed augustus config; quick and runs once,
// then storeDir-skipped.
queue = 'short'; cpus = 1; memory = '4 GB'; time = '30m'
// Local filesystem copy of the installed augustus config; quick, runs once.
cpus = 1; memory = '4 GB'; time = '30m'
}

withName: '.*:GENOME_CLEAN' {
// Full FCS-GX purge needs highmem (stages ~470 GB gx db into /dev/shm);
// with --skip_fcs it's a light decompress + length-filter.
queue = params.skip_fcs ? 'short' : 'highmem'
cpus = params.skip_fcs ? 2 : 16
memory = params.skip_fcs ? '8 GB' : '500 GB'
time = params.skip_fcs ? '1h' : '6h'
cpus = params.skip_fcs ? 2 : 16
memory = params.skip_fcs ? '8 GB' : '500 GB'
time = params.skip_fcs ? '1h' : '6h'
}

withName: '.*:GENOME_CLEAN_BATCH' {
// Stages the ~470 GB FCS-GX db into /dev/shm once, then cleans up to
// clean_batch_size genomes sequentially — needs highmem and a long walltime.
queue = 'highmem'; cpus = 16; memory = '500 GB'; time = '7d'
// Stages the ~470 GB FCS-GX db into /dev/shm once, then cleans
// clean_batch_size genomes sequentially — needs highmem + long walltime.
cpus = 16; memory = '500 GB'; time = '7d'
}

withName: '.*:MASKREPEAT_TANTAN_RUN' {
queue = 'short'; cpus = 8; memory = '16 GB'; time = '2h'
cpus = 8; memory = '16 GB'; time = '2h'
}

// EarlGrey TE-discovery path (run_earlgrey=true).
// Resource tuning inherits from profile_earlgrey.config's withLabel blocks
// (earlgrey / repeatmask / deliver); these withName overrides only set queue.
withName: '.*:EARLGREY_BUILD_LIB' {
queue = 'epyc'; cpus = 32; memory = '64 GB'; time = '7d'
cpus = 32; memory = '64 GB'; time = '7d'
}
withName: '.*:REPEATMASK_STRAIN' {
queue = 'short'; cpus = 32; memory = '32 GB'; time = '8h'
cpus = 32; memory = '32 GB'; time = '8h'
}
withName: '.*:DELIVER_MASK' {
queue = 'short'; cpus = 1; memory = '2 GB'; time = '30m'
cpus = 1; memory = '2 GB'; time = '30m'
}

// SRA_QUERY (standalone, not in subworkflow) — matches bare name
// SRA_QUERY standalone (not in subworkflow) — matches bare name.
withName: 'SRA_QUERY' {
queue = 'short'; cpus = 2; memory = '4 GB'; time = '60m'
cpus = 2; memory = '4 GB'; time = '60m'
maxForks = 10; errorStrategy = 'retry'; maxRetries = 2
}
withName: '.*:SRA_QUERY_BATCH' {
queue = 'short'; cpus = 1; memory = '4 GB'; time = '2h'
cpus = 1; memory = '4 GB'; time = '2h'
maxForks = 10; errorStrategy = 'retry'; maxRetries = 2
}
withName: '.*:COLLECT_SRA_QUERY' {
queue = 'short'; cpus = 1; memory = '2 GB'; time = '20m'
cpus = 1; memory = '2 GB'; time = '20m'
}
withName: '.*:WRITE_EMPTY_READS' {
queue = 'short'; cpus = 1; memory = '1 GB'; time = '5m'
cpus = 1; memory = '1 GB'; time = '5m'
}

withName: '.*:SRA_FETCH' {
errorStrategy = 'retry'; maxRetries = 3
queue = { task.attempt == 1 ? 'short' : 'epyc' }
memory = { task.attempt == 1 ? '48 GB' : '192 GB' }
memory = { task.attempt == 1 ? '48 GB' : '192 GB' }
time = { task.attempt == 1 ? '2h' : task.attempt == 2 ? '8h' : task.attempt == 3 ? '24h' : '48h' }
cpus = { task.attempt == 1 ? 24 : 32 }
}
withName: '.*:SRA_FETCH_SE' {
errorStrategy = 'retry'; maxRetries = 3
queue = { task.attempt == 1 ? 'short' : 'epyc' }
memory = { task.attempt == 1 ? '48 GB' : '192 GB' }
memory = { task.attempt == 1 ? '48 GB' : '192 GB' }
time = { task.attempt == 1 ? '2h' : task.attempt == 2 ? '8h' : '24h' }
cpus = { task.attempt == 1 ? 24 : 32 }
}

withName: '.*:RNASEQ_PREPARE' {
queue = 'epyc'; cpus = 16
cpus = 16
memory = { task.attempt == 1 ? '52 GB' : (48 + (task.attempt - 1) * 48) + ' GB' }
time = '120h'; maxRetries = 3
time = '120h'; maxRetries = 3
}

withName: '.*:FUNANNOTATE_TRAIN' {
maxRetries = 3
queue = { task.attempt <= 2 ? 'epyc' : 'highmem' }
memory = { task.attempt == 1 ? '48 GB' : task.attempt == 2 ? '192 GB' : '256 GB' }
time = { task.attempt == 1 ? '72h' : '120h' }
cpus = { task.attempt == 1 ? 8 : 24 }
clusterOptions = '-N 1 -n 1 --job-name=nf-TRAIN'
maxRetries = 3
memory = { task.attempt == 1 ? '48 GB' : task.attempt == 2 ? '192 GB' : '256 GB' }
time = { task.attempt == 1 ? '72h' : '120h' }
cpus = { task.attempt == 1 ? 8 : 24 }
}

withName: '.*:FUNANNOTATE_PREDICT' {
queue = 'epyc'
memory = { task.attempt == 1 ? '32 GB' : '64 GB' }
time = '72h'
cpus = { task.attempt == 1 ? 8 : 16 }
clusterOptions = '-N 1 -n 1 --job-name=nf-PREDICT'
memory = { task.attempt == 1 ? '32 GB' : '64 GB' }
time = '72h'
cpus = { task.attempt == 1 ? 8 : 16 }
}

withName: '.*:ANTISMASH_RUN' {
queue = 'epyc'; cpus = 8; memory = '24 GB'; time = '8h'
cpus = 8; memory = '24 GB'; time = '8h'
}

withName: '.*:INTERPROSCAN_RUN' {
queue = 'epyc'; cpus = 8; memory = '32 GB'; time = '60h'
cpus = 8; memory = '32 GB'; time = '60h'
}

withName: '.*:SIGNALP_RUN' {
// signalp6-gpu: GPU partition (gpu allows >2h; short_gpu if always ≤2h).
queue = 'gpu'
cpus = 16; memory = '64 GB'; time = '8h'
clusterOptions = '-N 1 -n 1 --gres=gpu:1'
cpus = 16; memory = '64 GB'; time = '8h'
}

withName: '.*:FUNANNOTATE_ANNOTATE' {
queue = 'epyc'; cpus = 16; memory = '64 GB'; time = '24h'
cpus = 16; memory = '64 GB'; time = '24h'
}
withName: '.*:FUNANNOTATE_UPDATE' {
queue = 'epyc'; cpus = 16; memory = '64 GB'; time = '48h'
cpus = 16; memory = '64 GB'; time = '48h'
}
}

Expand Down
37 changes: 9 additions & 28 deletions conf/profile_earlgrey.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,27 @@ workDir = "${launchDir}/work/earlgrey"

process {

// De-novo TE discovery + curation on the representative genome — very heavy.
// Only long-queue partitions (epyc/stajichlab) can host a multi-day EarlGrey run.
withLabel: 'earlgrey' {
cpus = 32
memory = '64 GB'
time = '7.day'
clusterOptions = '-N 1 -n 1'
beforeScript = """
source /etc/profile.d/modules.sh 2>/dev/null || true
module load earlgrey
"""
// Resources only — tool provisioning (beforeScript) and SLURM queue/clusterOptions
// are UCR-specific and live in conf/provision_ucr_hpcc.config.

// De-novo TE discovery + curation — very heavy, multi-day run.
withLabel: 'earlgrey' {
cpus = 32; memory = '64 GB'; time = '7.day'
}

// Apply the curated library to a conspecific strain — moderate.
// Apply curated TE library to a conspecific strain with RepeatMasker — moderate.
withLabel: 'repeatmask' {
cpus = 32
memory = '32 GB'
time = '8.h'
clusterOptions = '-N 1 -n 1'
cpus = 32; memory = '32 GB'; time = '8.h'
}

// Copy finished masks into input_clean_genomes — trivial I/O.
withLabel: 'deliver' {
cpus = 1
memory = '2 GB'
time = '30 min'
queue = 'short'
cpus = 1; memory = '2 GB'; time = '30 min'
}

// Representative selection — light, pure-Python (stdlib only).
withLabel: 'select' {
cpus = 1
memory = '4 GB'
time = '30 min'
queue = 'short'
beforeScript = """
source /etc/profile.d/modules.sh 2>/dev/null || true
module load biopython
"""
cpus = 1; memory = '4 GB'; time = '30 min'
}
}

Expand Down
107 changes: 84 additions & 23 deletions conf/provision_ucr_hpcc.config
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
/*
* Provisioning: UCR HPCC Lmod modules — INSTITUTIONAL profile (-profile ucr_hpcc).
* Provisioning: UCR HPCC — INSTITUTIONAL profile (-profile ucr_hpcc).
*
* This is a site-specific profile: the module names (funannotate/dev-1.8.18,
* AAFTF, taxonkit, ...) and the conda bootstrap below exist on the UCR HPCC and
* will NOT resolve elsewhere. For a portable run use a container/env provisioning
* profile instead (-profile <...>,singularity or ,pixi). New sites should copy
* this file to conf/provision_<site>.config and register a matching profile in
* nextflow.config — the nf-core/configs institutional-profile model.
* Encodes two UCR-specific concerns:
*
* Each process label gets a `beforeScript` that loads the tools it needs. The
* beforeScript and the process `script:` are concatenated into one job script,
* so the module environment persists into the script body. Process scripts
* therefore contain NO `module load` lines themselves.
* 1. Tool provisioning (withLabel beforeScript) — Lmod module loads.
* Module names and conda bootstrap exist on UCR HPCC; will not resolve
* elsewhere. Process scripts contain NO `module load` lines; all tool
* setup happens in beforeScript so the environment is set before the
* script body runs.
*
* Every beforeScript first sources modules.sh so `module` is defined inside the
* batch job (login-shell init does not always run on compute nodes).
* 2. SLURM partition routing (withName queue / clusterOptions) — UCR HPCC
* partition names (short, epyc, highmem, gpu). These are separated from
* profile_annotate.config so a non-UCR SLURM user can use
* `-profile annotate,slurm` without a queue= override and just get the
* default partition.
*
* To add a new site: copy this file to conf/provision_<site>.config, replace
* the module names with site equivalents, adjust queue names, and register a
* matching profile in nextflow.config. See docs/adding_a_site.md.
*/

process {

// ── Tool provisioning (Lmod module loads) ─────────────────────────────────

withLabel: 'funannotate' {
beforeScript = '''
source /etc/profile.d/modules.sh 2>/dev/null || true
Expand All @@ -37,9 +42,6 @@ process {
beforeScript = '''
source /etc/profile.d/modules.sh 2>/dev/null || true
module load miniconda3
# Clear stale CONDA_* inherited from the login shell (bash -l), then
# source conda.sh directly — `conda shell.bash hook` crashes when the
# inherited state is inconsistent (CONDA_SHLVL set but CONDA_PREFIX empty).
unset CONDA_SHLVL CONDA_PREFIX CONDA_PREFIX_1 CONDA_DEFAULT_ENV CONDA_PROMPT_MODIFIER
source "${CONDA_ROOT:-$(conda info --base)}/etc/profile.d/conda.sh"
module load taxonkit
Expand Down Expand Up @@ -71,9 +73,6 @@ process {
beforeScript = '''
source /etc/profile.d/modules.sh 2>/dev/null || true
module load miniconda3
# Clear stale CONDA_* inherited from the login shell (bash -l), then
# source conda.sh directly — `conda shell.bash hook` crashes when the
# inherited state is inconsistent (CONDA_SHLVL set but CONDA_PREFIX empty).
unset CONDA_SHLVL CONDA_PREFIX CONDA_PREFIX_1 CONDA_DEFAULT_ENV CONDA_PROMPT_MODIFIER
source "${CONDA_ROOT:-$(conda info --base)}/etc/profile.d/conda.sh"
module load antismash
Expand All @@ -94,9 +93,71 @@ process {
'''
}

// 'setup' label (SETUP_TAXONDB, COLLECT_SRA_QUERY, WRITE_EMPTY_READS) needs
// only base system tools (wget/tar/awk) — no module load required.
withLabel: 'setup' {
beforeScript = ':'
withLabel: 'earlgrey' {
beforeScript = '''
source /etc/profile.d/modules.sh 2>/dev/null || true
module load earlgrey
'''
}

withLabel: 'repeatmask' {
beforeScript = '''
source /etc/profile.d/modules.sh 2>/dev/null || true
module load RepeatMasker
'''
}

withLabel: 'select' {
beforeScript = '''
source /etc/profile.d/modules.sh 2>/dev/null || true
module load biopython
'''
}

// 'setup', 'deliver', 'process_single': base system tools only — no module load.
withLabel: 'setup' { beforeScript = ':' }
withLabel: 'deliver' { beforeScript = ':' }

// ── UCR HPCC SLURM partition routing ──────────────────────────────────────
// Queue names are UCR-specific (short/epyc/highmem/gpu). Non-UCR SLURM users
// omit this profile and rely on their scheduler's default partition.

withName: 'SETUP_TAXONDB' { queue = 'short' }
withName: 'SETUP_FUNANNOTATE_DB' { queue = 'epyc' }
withName: 'SETUP_AUGUSTUS_CONFIG' { queue = 'short' }

withName: '.*:GENOME_CLEAN' { queue = params.skip_fcs ? 'short' : 'highmem' }
withName: '.*:GENOME_CLEAN_BATCH' { queue = 'highmem' }

withName: '.*:MASKREPEAT_TANTAN_RUN' { queue = 'short' }
withName: '.*:EARLGREY_BUILD_LIB' { queue = 'epyc' }
withName: '.*:REPEATMASK_STRAIN' { queue = 'short' }
withName: '.*:DELIVER_MASK' { queue = 'short' }

withName: 'SRA_QUERY' { queue = 'short' }
withName: '.*:SRA_QUERY_BATCH' { queue = 'short' }
withName: '.*:COLLECT_SRA_QUERY' { queue = 'short' }
withName: '.*:WRITE_EMPTY_READS' { queue = 'short' }
withName: '.*:SRA_FETCH' { queue = { task.attempt == 1 ? 'short' : 'epyc' } }
withName: '.*:SRA_FETCH_SE' { queue = { task.attempt == 1 ? 'short' : 'epyc' } }

withName: '.*:RNASEQ_PREPARE' { queue = 'epyc' }

withName: '.*:FUNANNOTATE_TRAIN' {
queue = { task.attempt <= 2 ? 'epyc' : 'highmem' }
clusterOptions = '-N 1 -n 1 --job-name=nf-TRAIN'
}
withName: '.*:FUNANNOTATE_PREDICT' {
queue = 'epyc'
clusterOptions = '-N 1 -n 1 --job-name=nf-PREDICT'
}

withName: '.*:ANTISMASH_RUN' { queue = 'epyc' }
withName: '.*:INTERPROSCAN_RUN' { queue = 'epyc' }
withName: '.*:SIGNALP_RUN' {
queue = 'gpu'
clusterOptions = '-N 1 -n 1 --gres=gpu:1'
}
withName: '.*:FUNANNOTATE_ANNOTATE' { queue = 'epyc' }
withName: '.*:FUNANNOTATE_UPDATE' { queue = 'epyc' }
}
Loading
Loading