Skip to content
Open
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
118 changes: 103 additions & 15 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,69 @@ process {
maxRetries = 2
}

// === CPU TIERS ===
// Label-based, cpus only. Memory/time stay in the withName overrides
// below so per-process tuning isn't blocked by a shared label. No
// label for cpus=1: that's already the global default above.
withLabel: cpu_low {
cpus = { 2 * task.attempt }
}
withLabel: cpu_medium {
cpus = { 4 * task.attempt }
}
withLabel: cpu_high {
cpus = { 8 * task.attempt }
}

// === MEMORY TIERS ===
// Only one label: processes verified (via peak_rss trace data) to stay
// under 1 GB, where the 4 GB global default is wasteful at scale.
// Anything above 4 GB gets a dedicated withName override instead
// (see e.g. DNDS:PREPROCESSDEPTHS, MUTABILITY.*:RELATIVEMUTABILITY
// below) so tuning stays per-process rather than a shared label.
withLabel: mem_low {
memory = { 1.GB * task.attempt }
}

// === PANEL CREATION PROCESSES ===
// Large memory requirements for genomic position processing
withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:SITESFROMPOSITIONS' {
memory = { 8.GB * task.attempt }
}

// VEP annotation is CPU and memory intensive for large VCFs
// VEP annotation is CPU and memory intensive for large VCFs.
// Exception to the cpu-tier labels: verified via real trace data at
// ~1200-1400% cpu (12-14 cores used out of 24 requested) on panel chunks.
withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:VCFANNOTATEPANEL:ENSEMBLVEP_VEP*' {
cpus = { 24 * task.attempt }
memory = { 6.GB * task.attempt }
}

// Per-sample VEP annotation: no label (module is nf-core, unlabeled);
// kept as its own cpus override, same as the panel one above.
withName: 'BBGTOOLS:DEEPCSA:MUT_PREPROCESSING:VCFANNOTATE:ENSEMBLVEP_VEP*' {
cpus = { 24 * task.attempt }
}

withName: 'CUSTOMPROCESSING.*' {
memory = { 10.GB * task.attempt }
}

// Exception to the cpu-tier labels: TABIX_BGZIPTABIX_QUERY is a shared
// nf-core module reused under many other aliases (QUERYMUTATIONS,
// QUERYDEPTHS, QUERYPANEL...) that don't need extra cpus, so this can't
// be a module-level label without affecting those too.
withName: 'BBGTOOLS:DEEPCSA:DEPTHS.*CONS' {
cpus = { 2 * task.attempt }
memory = { 8.GB * task.attempt }
}

// Same shared module, different aliases: these query mutation tables
// (not depths), peak_rss well under 1 GB.
withName: 'QUERYMUTATIONS|QUERYMUTATIONSEXONS' {
memory = { 1.GB * task.attempt }
}

withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:CREATECAPTUREDPANELS*' {
memory = { 6.GB * task.attempt }
}
Expand All @@ -68,7 +110,6 @@ process {
}

withName: '(BBGTOOLS:DEEPCSA:CREATEPANELS:DOMAINANNOTATION*)' {
cpus = { 2 * task.attempt }
memory = { 10.GB * task.attempt }
}

Expand All @@ -84,36 +125,77 @@ process {
memory = { 12.GB * task.attempt }
}

withName: 'BBGTOOLS:DEEPCSA:MUT_PREPROCESSING:SOMATICMUTATIONS*' {
cpus = { 1 * task.attempt }
memory = { 1.GB * task.attempt }
}

withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:POSTPROCESSVEPPANEL*' {
cpus = { 2 * task.attempt }
memory = { 8.GB * task.attempt }
}

// BBGTOOLS:DEEPCSA:OMEGA:ESTIMATOR and BBGTOOLS:DEEPCSA:OMEGA:PREPROCESSING
withName: 'PREPROCESSING|ESTIMATOR' {
// BBGTOOLS:DEEPCSA:OMEGA:PREPROCESSING(GLOBALLOC): peak_rss ~2.6 GB, well under
// the 4 GB default.
withName: 'PREPROCESSING' {
memory = { 4.GB * task.attempt }
}

// BBGTOOLS:DEEPCSA:{OMEGA,OMEGAMULTI}:{ESTIMATOR,ESTIMATORGLOBALLOC}: peak_rss up
// to ~24.3 GB on the largest gene sets. The old 4 GB tier maxed out at 16 GB after
// 3 retries, so the biggest tasks could never succeed. +20% headroom.
withName: 'ESTIMATOR|ESTIMATORGLOBALLOC' {
memory = { 30.GB * task.attempt }
}

// BBGTOOLS:DEEPCSA:SIGNATURESNONPROT:SIGPROFILERASSIGNMENT
withName: 'SIGPROFILERASSIGNMENT' {
memory = { 2.GB * task.attempt }
}

// peak_rss 33-33.4 GB (BDO_duplexome / all_samples) -> +20% headroom
withName: 'BBGTOOLS:DEEPCSA:DNDS:PREPROCESSDEPTHS' {
memory = { 40.GB * task.attempt }
}

// peak_rss 36.1-36.9 GB, same order of magnitude on both MUTABILITYALL
// and MUTABILITYNONPROT (BDO_duplexome / all_samples) -> +19% headroom
withName: 'BBGTOOLS:DEEPCSA:MUTABILITY.*:RELATIVEMUTABILITY' {
memory = { 44.GB * task.attempt }
}

// peak_rss up to 39.4 GB on the largest cohorts; no override existed before, so it
// defaulted to 4 GB and could never succeed (63% FAILED in resources_test run). +20% headroom.
withName: 'BBGTOOLS:DEEPCSA:ONCODRIVE3D:ONCODRIVE3D_RUN' {
memory = { 48.GB * task.attempt }
}

// peak_rss up to 12 GB; no override existed, so every sample needed ~2 retries
// against the 4 GB default before landing on enough memory. +25% headroom so it
// succeeds on the first attempt.
withName: 'BBGTOOLS:DEEPCSA:MUT_PREPROCESSING:FILTERNANOSEQNOISE' {
memory = { 15.GB * task.attempt }
}

// peak_rss up to 6.3 GB; the 4 GB default meant every one of the 128 samples
// failed on the first attempt and only succeeded on the 8 GB retry. Setting the
// base to 8 GB avoids that guaranteed-fail-then-retry pattern.
withName: 'BBGTOOLS:DEEPCSA:MUTDENSITYALL:MUTDENSITY' {
memory = { 8.GB * task.attempt }
}

// Same process handles per-sample and per-cohort ("all_samples", "Ismale0/1",
// "Samplelocation*") runs -- can't select by tag, only by process name. The
// cohort runs were getting OOM-killed by Slurm (71-113 oom_kill events per job)
// under the 4 GB default; individual samples fit comfortably under 3 GB. No clean
// peak_rss from the killed runs to calibrate against, so 24 GB is an estimate --
// revisit once a run confirms the real peak. cpus fixed (not cpu_high's
// 8*attempt) so retries actually gain memory headroom per core instead of just
// scaling both in lockstep.
withName: 'BBGTOOLS:DEEPCSA:ONCODRIVEFMLALL:ONCODRIVEFMLSNVS' {
cpus = { 8 }
memory = { 24.GB * task.attempt }
}

// === UTILITY PROCESSES ===
withName: 'BBGTOOLS:DEEPCSA:CUSTOM_DUMPSOFTWAREVERSIONS*' {
cache = false
}

withName: 'BBGTOOLS:DEEPCSA:DEPTHANALYSIS:COMPUTEDEPTHS' {
cpus = { 4 * task.attempt }
memory = { 4.GB * task.attempt }
}

withName: 'MUTATEDGENOMESFROMVAFAM' {
errorStrategy = 'ignore'
maxRetries = 1
Expand All @@ -124,12 +206,18 @@ process {
maxRetries = 1
}

withName: 'BBGTOOLS:DEEPCSA:PLOTTINGSUMMARY:PLOTSATURATION' {
errorStrategy = { task.attempt <= 3 ? 'retry' : 'ignore' }
maxRetries = 4
}

withName: 'BBGTOOLS:DEEPCSA:PLOTTINGQC:PLOTMUTATIONSPECIFIC' {
memory = { 24.GB * task.attempt }
}

withName: 'BBGTOOLS:DEEPCSA:ENRICHPANELS:DNA2PROTEINMAPPING' {
memory = { 30.GB * task.attempt }
errorStrategy = 'ignore'
}

withName: 'FILTERNANOSEQSNP' {
Expand Down
15 changes: 9 additions & 6 deletions conf/deepcsa_config_bbgregressions_test.config
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,17 @@ params {
}

process {
withLabel: process_high_memory {
withLabel: cpu_high {
cpus = { 2 * task.attempt }
memory = { 15.GB * task.attempt }
memory = { 16.GB * task.attempt }
}

withLabel: process_high {
cpus = { 2 * task.attempt }
memory = { 16.GB * task.attempt }
time = { 1.h * task.attempt }
// base.config sizes these for real cohorts (40/44 GB); cap them back
// down for the minimal test dataset.
withName: 'BBGTOOLS:DEEPCSA:DNDS:PREPROCESSDEPTHS' {
memory = { 15.GB * task.attempt }
}
withName: 'BBGTOOLS:DEEPCSA:MUTABILITY.*:RELATIVEMUTABILITY' {
memory = { 15.GB * task.attempt }
}
}
5 changes: 0 additions & 5 deletions conf/mice.config
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,3 @@ params {
}


process {
withLabel: process_high_memory {
memory = { 15.GB * task.attempt }
}
}
15 changes: 9 additions & 6 deletions conf/test_real.config
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,17 @@ params {
}

process {
withLabel: process_high_memory {
withLabel: cpu_high {
cpus = { 2 * task.attempt }
memory = { 15.GB * task.attempt }
memory = { 16.GB * task.attempt }
}

withLabel: process_high {
cpus = { 2 * task.attempt }
memory = { 16.GB * task.attempt }
time = { 1.h * task.attempt }
// base.config sizes these for real cohorts (40/44 GB); cap them back
// down for the minimal test dataset.
withName: 'BBGTOOLS:DEEPCSA:DNDS:PREPROCESSDEPTHS' {
memory = { 15.GB * task.attempt }
}
withName: 'BBGTOOLS:DEEPCSA:MUTABILITY.*:RELATIVEMUTABILITY' {
memory = { 15.GB * task.attempt }
}
}
2 changes: 1 addition & 1 deletion modules/local/analyzedepths/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process ANALYZE_DEPTHS_GROUPS {
tag "groups"
label 'process_low'
label 'cpu_low'

label 'deepcsa_core'

Expand Down
1 change: 0 additions & 1 deletion modules/local/bbgtools/bbgregressions/create_input/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
process CREATE_INPUT {

tag "regressions"
label 'process_single'

label "bbgregressions"

Expand Down
2 changes: 1 addition & 1 deletion modules/local/bbgtools/bbgregressions/editconfig/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process EDITCONFIG {

tag "regressions"
label 'process_low'
label 'cpu_low'

label "bbgregressions"

Expand Down
1 change: 0 additions & 1 deletion modules/local/bbgtools/bbgregressions/plot/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
process PLOT {

tag "regressions"
label 'process_single'

label "bbgregressions"

Expand Down
1 change: 0 additions & 1 deletion modules/local/bbgtools/bbgregressions/regressions/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
process REGRESSIONS {

tag "regressions"
label 'process_single'

label "bbgregressions"

Expand Down
2 changes: 0 additions & 2 deletions modules/local/bbgtools/omega/estimator/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
process OMEGA_ESTIMATOR {
tag "$meta.id"
label 'cpu_medium'
label 'time_low'
label 'process_high_memory'


container 'docker.io/bbglab/omega:0.2.1'
Expand Down
3 changes: 0 additions & 3 deletions modules/local/bbgtools/omega/mutabilities/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
process OMEGA_MUTABILITIES {
tag "$meta.id"
label 'cpu_single_fixed'
label 'time_low'
label 'process_high_memory'


container 'docker.io/bbglab/omega:0.2.1'
Expand Down
2 changes: 1 addition & 1 deletion modules/local/bbgtools/oncodrive3d/plot/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process ONCODRIVE3D_PLOT {
tag "$meta.id"
label 'process_medium'
label 'cpu_medium'

container 'docker.io/spellegrini87/oncodrive3d:1.0.9-light'

Expand Down
2 changes: 1 addition & 1 deletion modules/local/bbgtools/oncodrive3d/plot_chimerax/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process ONCODRIVE3D_PLOT_CHIMERAX {
tag "$meta.id"
label 'process_medium'
label 'cpu_medium'

container 'docker.io/spellegrini87/oncodrive3d:1.0.9-chimerax'

Expand Down
2 changes: 1 addition & 1 deletion modules/local/bbgtools/oncodrive3d/preprocessing/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process ONCODRIVE3D_PREPROCESSING {
tag "$meta.id"
label 'process_medium'
label 'cpu_medium'

label 'deepcsa_core'

Expand Down
2 changes: 1 addition & 1 deletion modules/local/bbgtools/oncodrive3d/run/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process ONCODRIVE3D_RUN {
tag "$meta.id"
label 'process_high'
label 'cpu_high'

container 'docker.io/spellegrini87/oncodrive3d:1.0.9-light'

Expand Down
2 changes: 1 addition & 1 deletion modules/local/bbgtools/oncodriveclustl/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process ONCODRIVECLUSTL {
tag "$meta.id"
label 'process_high'
label 'cpu_high'

// // conda "YOUR-TOOL-HERE"
// container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
Expand Down
2 changes: 1 addition & 1 deletion modules/local/bbgtools/oncodrivefml/main.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
process ONCODRIVEFML {
tag "$meta.id"
label 'process_high'
label 'cpu_high'

container 'docker.io/ferriolcalvet/oncodrivefml:latest'

Expand Down
3 changes: 0 additions & 3 deletions modules/local/bbgtools/sitecomparison/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
process SITE_COMPARISON {
tag "$meta.id"
label 'cpu_single_fixed'
label 'time_low'
label 'process_high_memory'

label 'deepcsa_core'

Expand Down
2 changes: 1 addition & 1 deletion modules/local/blacklistmuts/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process BLACKLIST_MUTATIONS {

tag "$meta.id"
label 'process_low'
label 'cpu_low'

label 'deepcsa_core'

Expand Down
3 changes: 1 addition & 2 deletions modules/local/compute_mutability/main.nf
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
process COMPUTE_RELATIVE_MUTABILITY {

tag "$meta.id"
label 'process_low_fixed_cpus'
label 'process_high_memory'
label 'cpu_low'

label 'deepcsa_core'

Expand Down
3 changes: 2 additions & 1 deletion modules/local/compute_profile/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
process COMPUTE_PROFILE {

tag "$meta.id"
label 'process_low'
label 'cpu_low'
label 'mem_low'


label 'deepcsa_core'
Expand Down
2 changes: 1 addition & 1 deletion modules/local/compute_trinucleotide/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
process COMPUTE_TRINUCLEOTIDE {

tag "$meta.id"
label 'process_low'
label 'cpu_low'

label 'deepcsa_core'

Expand Down
Loading