From 1e5288c406a364843564f3ca15a8900d4e707126 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Thu, 4 Jun 2026 16:49:58 +0200 Subject: [PATCH 01/17] chore: remove dead SUBSETPILEUP and READSPOSBED --- conf/modules.config | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 9d3dbe0b..7134f89a 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -132,18 +132,6 @@ process { ] } - withName: SUBSETPILEUP { - ext.prefix = { ".subset_pileup" } - ext.args = '' - ext.args2 = '-s 1 -b 2 -e 2' - ext.args3 = '-h' - ext.extension = 'tsv' - ext.header = 'pile' - publishDir = [ - enabled: false - ] - } - withName: 'BBGTOOLS:DEEPCSA:.*ALL:.*' { ext.prefix = { ".all" } } @@ -569,13 +557,6 @@ process { ] } - withName: READSPOSBED { - ext.tool = "readsxposition" - publishDir = [ - enabled: false - ] - } - withName: ONCODRIVECLUSTL { ext.args = "-sim region_restricted \ -kmer 3 \ From a4a01318c911418fa0d5871a580f689f6d6e8c3c Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Thu, 4 Jun 2026 17:48:24 +0200 Subject: [PATCH 02/17] chore: remove dead withName selectors - MUTRATE.*:MUTRATE* - OMEGA.*:ESTIMATOR_-* - OMEGA.*:(PREPROCESSING|ESTIMATOR).* --- conf/base.config | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/conf/base.config b/conf/base.config index 6dd25142..22fa16e8 100644 --- a/conf/base.config +++ b/conf/base.config @@ -89,30 +89,15 @@ process { memory = { 1.GB * task.attempt } } - withName: 'BBGTOOLS:DEEPCSA:OMEGANONPROT.*:SUBSETPANEL*' { - cpus = { 2 * task.attempt } - memory = { 4.GB * task.attempt } - } - withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:POSTPROCESSVEPPANEL*' { cpus = { 2 * task.attempt } memory = { 8.GB * task.attempt } } - withName: 'BBGTOOLS:DEEPCSA:MUTRATE.*:MUTRATE*' { - memory = { 8.GB * task.attempt } - } - withName: 'BBGTOOLS:DEEPCSA:OMEGA.*:(PREPROCESSING|ESTIMATOR).*' { memory = { 4.GB * task.attempt } } - // Catch-all for other OMEGA estimators not explicitly configured - // Keep conservative settings until we have usage data - withName: 'BBGTOOLS:DEEPCSA:OMEGA.*:ESTIMATOR_.*' { - memory = { 4.GB * task.attempt } - } - withName: 'BBGTOOLS:DEEPCSA:SIGNATURESNONPROT:SIGPROFILERASSIGNMENT*' { memory = { 2.GB * task.attempt } } From f53ff698b1cfad49f5734a0d62f271ae3ec0f6c0 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Fri, 5 Jun 2026 10:41:39 +0200 Subject: [PATCH 03/17] chore: remove dead SUBSETPANEL and MUTRATE from exome.config --- conf/exome.config | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/conf/exome.config b/conf/exome.config index ce7dbac5..335dd991 100644 --- a/conf/exome.config +++ b/conf/exome.config @@ -93,16 +93,12 @@ process { - withName: '(BBGTOOLS:DEEPCSA:MUT_PREPROCESSING:SOMATICMUTATIONS*|BBGTOOLS:DEEPCSA:OMEGANONPROT.*:SUBSETPANEL*)' { + withName: 'BBGTOOLS:DEEPCSA:MUT_PREPROCESSING:SOMATICMUTATIONS*' { cpus = { 2 * task.attempt } memory = { 4.GB * task.attempt } time = { 360.min * task.attempt } } - withName: 'BBGTOOLS:DEEPCSA:MUTRATE.*:MUTRATE*' { - memory = { 8.GB * task.attempt } - } - withName: '(BBGTOOLS:DEEPCSA:OMEGA.*:(PREPROCESSING|ESTIMATOR).*|BBGTOOLS:DEEPCSA:MULTIQC)' { memory = { 4.GB * task.attempt } } From bee9b6e37ae03a4e7a1b964ba816d00c18fa4fe5 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Fri, 5 Jun 2026 10:44:36 +0200 Subject: [PATCH 04/17] chore: remove dead CREATESAMPLEPANELS --- conf/tools/panels.config | 60 ---------------------------------------- 1 file changed, 60 deletions(-) diff --git a/conf/tools/panels.config b/conf/tools/panels.config index 19098a6e..78af271d 100644 --- a/conf/tools/panels.config +++ b/conf/tools/panels.config @@ -57,66 +57,6 @@ process { ] } - withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:CREATESAMPLEPANELSALL' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/samplepanels/createsamplepanelsall" }, - pattern: "*{tsv,bed}", - ] - ] - } - - withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:CREATESAMPLEPANELSPROTAFFECT' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/samplepanels/createsamplepanelsprotaffect" }, - pattern: "*{tsv,bed}", - ] - ] - } - - withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:CREATESAMPLEPANELSNONPROTAFFECT' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/samplepanels/createsamplepanelsnonprotaffect" }, - pattern: "*{tsv,bed}", - ] - ] - } - - withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:CREATESAMPLEPANELSEXONS' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/samplepanels/createsamplepanelsexons" }, - pattern: "*{tsv,bed}", - ] - ] - } - - withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:CREATESAMPLEPANELSINTRONS' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/samplepanels/createsamplepanelsintrons" }, - pattern: "*{tsv,bed}", - ] - ] - } - - withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:CREATESAMPLEPANELSSYNONYMOUS' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/samplepanels/createsamplepanelssynonymous" }, - pattern: "*{tsv,bed}", - ] - ] - } - withName: 'BBGTOOLS:DEEPCSA:ENRICHPANELS:EXPANDREGIONSALL' { publishDir = [ [ From 66902a153bc22ea21cccd21d275edc6c36b0df26 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Fri, 5 Jun 2026 10:46:21 +0200 Subject: [PATCH 05/17] chore: remove orphan CREATESAMPLEPANELS module --- modules/local/createpanels/sample/main.nf | 59 ----------------------- 1 file changed, 59 deletions(-) delete mode 100644 modules/local/createpanels/sample/main.nf diff --git a/modules/local/createpanels/sample/main.nf b/modules/local/createpanels/sample/main.nf deleted file mode 100644 index 02db32ef..00000000 --- a/modules/local/createpanels/sample/main.nf +++ /dev/null @@ -1,59 +0,0 @@ -process CREATESAMPLEPANELS { - tag "$meta.id" - label 'process_single' - label 'time_low' - - conda "bioconda::pybedtools=0.9.1--py38he0f268d_0" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/pybedtools:0.9.1--py38he0f268d_0' : - 'biocontainers/pybedtools:0.9.1--py38he0f268d_0' }" - - - input: - tuple val(meta) , path(compact_captured_panel_annotation) - tuple val(meta2), path(depths) - val(min_depth) - - output: - path("*.tsv") , emit: sample_specific_panel - path("*.bed") , emit: sample_specific_panel_bed - path "versions.yml" , topic: versions - - - script: - def prefix = task.ext.prefix ?: "" - prefix = "${meta.id}${prefix}" - // TODO min_depth should be provided from modules.config - """ - create_panel4sample.py \\ - --compact-annot-panel-path ${compact_captured_panel_annotation} \\ - --depths-path all_samples.depths.tsv.gz \\ - --panel-name ${prefix} \\ - --min-depth ${min_depth} - - for sample_panel in \$(ls *${prefix}.tsv ); do - bedtools merge \\ - -i <( - tail -n +2 \$sample_panel | \\ - awk -F'\\t' '{print \$1, \$2-1, \$2}' OFS='\\t' | uniq - ) > \${sample_panel%.tsv}.bed; - done - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - python: \$(python --version | sed 's/Python //g') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "TargetRegions" - """ - touch ${prefix}.tsv - touch ${prefix}.bed - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - python: \$(python --version | sed 's/Python //g') - END_VERSIONS - """ -} From 173d2cc4b116ea93558ab50776e6a689fae41613 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Fri, 5 Jun 2026 11:12:14 +0200 Subject: [PATCH 06/17] chore: strip names prefix on elegible selectors --- conf/base.config | 6 +++--- conf/tmp_quick_fixes.config | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/base.config b/conf/base.config index 22fa16e8..53c95f64 100644 --- a/conf/base.config +++ b/conf/base.config @@ -44,7 +44,7 @@ process { memory = { 6.GB * task.attempt } } - withName: 'BBGTOOLS:DEEPCSA:CREATEPANELS:CUSTOMPROCESSING.*' { + withName: 'CUSTOMPROCESSING.*' { memory = { 10.GB * task.attempt } } @@ -112,7 +112,7 @@ process { memory = { 4.GB * task.attempt } } - withName: 'BBGTOOLS:DEEPCSA:MUTATEDCELLSVAF:MUTATEDGENOMESFROMVAFAM' { + withName: 'MUTATEDGENOMESFROMVAFAM' { errorStrategy = 'ignore' maxRetries = 1 } @@ -130,7 +130,7 @@ process { memory = { 30.GB * task.attempt } } - withName: 'BBGTOOLS:DEEPCSA:MUT_PREPROCESSING:FILTERNANOSEQSNP' { + withName: 'FILTERNANOSEQSNP' { memory = { 8.GB * task.attempt } } diff --git a/conf/tmp_quick_fixes.config b/conf/tmp_quick_fixes.config index 4a473f0b..c1da0318 100644 --- a/conf/tmp_quick_fixes.config +++ b/conf/tmp_quick_fixes.config @@ -15,7 +15,7 @@ process { errorStrategy = 'ignore' } - withName: 'BBGTOOLS:DEEPCSA:MUTATEDCELLSVAF:MUTATEDGENOMESFROMVAFAM' { + withName: 'MUTATEDGENOMESFROMVAFAM' { errorStrategy = 'ignore' maxRetries = 1 } From 495e29cb41675c752fdc47f5a7bd5023d637ec5d Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Fri, 5 Jun 2026 11:17:59 +0200 Subject: [PATCH 07/17] docs: add comment for selectors raising warnings --- conf/base.config | 1 + conf/modules.config | 3 +++ conf/tmp_quick_fixes.config | 1 + conf/tools/omega.config | 2 ++ 4 files changed, 7 insertions(+) diff --git a/conf/base.config b/conf/base.config index 53c95f64..19f79562 100644 --- a/conf/base.config +++ b/conf/base.config @@ -98,6 +98,7 @@ process { memory = { 4.GB * task.attempt } } + // Gated by params.signatures && params.profilenonprot; "no matching selector" warning is expected when the feature is off withName: 'BBGTOOLS:DEEPCSA:SIGNATURESNONPROT:SIGPROFILERASSIGNMENT*' { memory = { 2.GB * task.attempt } } diff --git a/conf/modules.config b/conf/modules.config index 7134f89a..177a2eac 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -136,6 +136,7 @@ process { ext.prefix = { ".all" } } + // Gated by params.profileintrons; "no matching selector" warning is expected when the feature is off withName: 'BBGTOOLS:DEEPCSA:.*INTRONS:.*' { ext.prefix = { ".introns" } } @@ -403,6 +404,7 @@ process { ] } + // Gated by params.profilenonprot; "no matching selector" warning is expected when the feature is off withName: '.*NONPROT:SUBSETMUTPROFILE' { ext.filters = { [ @@ -631,6 +633,7 @@ process { } // BBGRegressions output configuration + // Gated by params.regressions; "no matching selector" warning is expected when the feature is off withName: '.*:REGRESSIONS.*:EDITCONFIG' { publishDir = [ [ diff --git a/conf/tmp_quick_fixes.config b/conf/tmp_quick_fixes.config index c1da0318..a47f7d25 100644 --- a/conf/tmp_quick_fixes.config +++ b/conf/tmp_quick_fixes.config @@ -20,6 +20,7 @@ process { maxRetries = 1 } + // Gated by params.expected_mutated_cells; "no matching selector" warning is expected when the feature is off withName: "BBGTOOLS:DEEPCSA:EXPECTEDMUTATEDCELLS:.*" { errorStrategy = 'ignore' maxRetries = 1 diff --git a/conf/tools/omega.config b/conf/tools/omega.config index c5bc60b5..8ad4cf37 100644 --- a/conf/tools/omega.config +++ b/conf/tools/omega.config @@ -73,6 +73,7 @@ process { ext.prefix = { ".multi" } } + // Gated by params.profilenonprot && params.positive_selection_non_protein_affecting && params.omega_multi; "no matching selector" warning is expected when the feature is off withName: 'BBGTOOLS:DEEPCSA:OMEGANONPROTMULTI:.*' { ext.prefix = { ".non_prot_aff.multi" } } @@ -86,6 +87,7 @@ process { ext.prefix = { ".multi.global_loc" } } + // Gated by params.omega_globalloc (+ params.profilenonprot && params.positive_selection_non_protein_affecting); "no matching selector" warning is expected when the feature is off withName: 'BBGTOOLS:DEEPCSA:OMEGANONPROT:.*GLOBALLOC' { ext.prefix = { ".non_prot_aff.global_loc" } } From 721185f7b8df2e1f3bd96db0a1f9e57fe55d0f8e Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Fri, 5 Jun 2026 11:50:30 +0200 Subject: [PATCH 08/17] chore: remove redundant .first() on already-pinned channels --- workflows/deepcsa.nf | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/workflows/deepcsa.nf b/workflows/deepcsa.nf index 500954cb..2c288edb 100644 --- a/workflows/deepcsa.nf +++ b/workflows/deepcsa.nf @@ -358,10 +358,10 @@ workflow DEEPCSA { if (run_mutdensity){ // Mutation Density - MUTDENSITYALL(somatic_mutations, DEPTHSALLCONS.out.subset, CREATEPANELS.out.all_consensus_bed, ENRICHPANELS.out.all_consensus_expanded_panel.first()) - MUTDENSITYPROT(somatic_mutations, DEPTHSPROTCONS.out.subset, CREATEPANELS.out.prot_consensus_bed, ENRICHPANELS.out.prot_consensus_expanded_panel.first()) - MUTDENSITYNONPROT(somatic_mutations, DEPTHSNONPROTCONS.out.subset, CREATEPANELS.out.nonprot_consensus_bed, ENRICHPANELS.out.nonprot_consensus_expanded_panel.first()) - MUTDENSITYSYNONYMOUS(somatic_mutations, DEPTHSSYNONYMOUSCONS.out.subset, CREATEPANELS.out.synonymous_consensus_bed, ENRICHPANELS.out.synonymous_consensus_expanded_panel.first()) + MUTDENSITYALL(somatic_mutations, DEPTHSALLCONS.out.subset, CREATEPANELS.out.all_consensus_bed, ENRICHPANELS.out.all_consensus_expanded_panel) + MUTDENSITYPROT(somatic_mutations, DEPTHSPROTCONS.out.subset, CREATEPANELS.out.prot_consensus_bed, ENRICHPANELS.out.prot_consensus_expanded_panel) + MUTDENSITYNONPROT(somatic_mutations, DEPTHSNONPROTCONS.out.subset, CREATEPANELS.out.nonprot_consensus_bed, ENRICHPANELS.out.nonprot_consensus_expanded_panel) + MUTDENSITYSYNONYMOUS(somatic_mutations, DEPTHSSYNONYMOUSCONS.out.subset, CREATEPANELS.out.synonymous_consensus_bed, ENRICHPANELS.out.synonymous_consensus_expanded_panel) // Concatenate all outputs into a single file channel.empty() @@ -461,8 +461,8 @@ workflow DEEPCSA { OMEGA(mutations_in_exons, DEPTHSEXONSCONS.out.subset, MUTPROFILEALL.out.profile, - CREATEPANELS.out.exons_consensus_bed.first(), - ENRICHPANELS.out.exons_consensus_expanded_panel.first(), + CREATEPANELS.out.exons_consensus_bed, + ENRICHPANELS.out.exons_consensus_expanded_panel, custom_groups_table, SYNMUTDENSITY.out.mutdensity.first(), CREATEPANELS.out.panel_annotated_rich, @@ -491,8 +491,8 @@ workflow DEEPCSA { OMEGAMULTI(mutations_in_exons, DEPTHSEXONSCONS.out.subset, MUTPROFILEALL.out.profile, - CREATEPANELS.out.exons_consensus_bed.first(), - ENRICHPANELS.out.exons_consensus_expanded_panel.first(), + CREATEPANELS.out.exons_consensus_bed, + ENRICHPANELS.out.exons_consensus_expanded_panel, custom_groups_table, SYNMUTREADSDENSITY.out.mutdensity.first(), CREATEPANELS.out.panel_annotated_rich, @@ -513,8 +513,8 @@ workflow DEEPCSA { OMEGANONPROT(mutations_in_exons, DEPTHSEXONSCONS.out.subset, MUTPROFILENONPROT.out.profile, - CREATEPANELS.out.exons_consensus_bed.first(), - ENRICHPANELS.out.exons_consensus_expanded_panel.first(), + CREATEPANELS.out.exons_consensus_bed, + ENRICHPANELS.out.exons_consensus_expanded_panel, custom_groups_table, SYNMUTDENSITY.out.mutdensity.first(), CREATEPANELS.out.panel_annotated_rich, @@ -527,8 +527,8 @@ workflow DEEPCSA { OMEGANONPROTMULTI(mutations_in_exons, DEPTHSEXONSCONS.out.subset, MUTPROFILENONPROT.out.profile, - CREATEPANELS.out.exons_consensus_bed.first(), - ENRICHPANELS.out.exons_consensus_expanded_panel.first(), + CREATEPANELS.out.exons_consensus_bed, + ENRICHPANELS.out.exons_consensus_expanded_panel, custom_groups_table, SYNMUTREADSDENSITY.out.mutdensity.first(), CREATEPANELS.out.panel_annotated_rich, @@ -637,13 +637,13 @@ workflow DEEPCSA { TABLE2GROUP.out.json_samples.first(), TABLE2GROUP.out.json_allgroups.first(), - CREATEPANELS.out.exons_consensus_panel.first(), - ENRICHPANELS.out.exons_consensus_expanded_panel.first(), - CREATEPANELS.out.panel_annotated_rich.first(), + CREATEPANELS.out.exons_consensus_panel, + ENRICHPANELS.out.exons_consensus_expanded_panel, + CREATEPANELS.out.panel_annotated_rich, seqinfo_df, - CREATEPANELS.out.domains_in_panel.first(), - ENRICHPANELS.out.dna2protein_mapping_depth_exons.first(), + CREATEPANELS.out.domains_in_panel, + ENRICHPANELS.out.dna2protein_mapping_depth_exons, group_keys_ch ) } From a691c9d10beb67cb270bf2ebb25fdacda2593755 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Fri, 5 Jun 2026 16:53:27 +0200 Subject: [PATCH 09/17] chore: pin singleton channels at source and drop redundant .first() --- subworkflows/local/enrichpanels/main.nf | 24 ++++++++++++------------ subworkflows/local/omega/main.nf | 2 +- workflows/deepcsa.nf | 10 +++++----- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/subworkflows/local/enrichpanels/main.nf b/subworkflows/local/enrichpanels/main.nf index 5cc6ecc6..de56bcf1 100644 --- a/subworkflows/local/enrichpanels/main.nf +++ b/subworkflows/local/enrichpanels/main.nf @@ -38,25 +38,25 @@ workflow ENRICHPANELS { if (params.create_subgenic_regions){ EXPANDREGIONSALL(all_consensus_panel, domains_ch, exons_ch, subgenic_ch) - all_expanded_panel = EXPANDREGIONSALL.out.panel_increased + all_expanded_panel = EXPANDREGIONSALL.out.panel_increased.first() EXPANDREGIONSNONPROT(nonprot_consensus_panel, domains_ch, exons_ch, subgenic_ch) - nonprot_expanded_panel = EXPANDREGIONSNONPROT.out.panel_increased + nonprot_expanded_panel = EXPANDREGIONSNONPROT.out.panel_increased.first() EXPANDREGIONSPROT(prot_consensus_panel, domains_ch, exons_ch, subgenic_ch) - prot_expanded_panel = EXPANDREGIONSPROT.out.panel_increased + prot_expanded_panel = EXPANDREGIONSPROT.out.panel_increased.first() EXPANDREGIONSSYNONYMOUS(synonymous_consensus_panel, domains_ch, exons_ch, subgenic_ch) - synonymous_expanded_panel = EXPANDREGIONSSYNONYMOUS.out.panel_increased + synonymous_expanded_panel = EXPANDREGIONSSYNONYMOUS.out.panel_increased.first() EXPANDREGIONSEXONS(exons_consensus_panel, domains_ch, exons_ch, subgenic_ch) - exons_expanded_panel = EXPANDREGIONSEXONS.out.panel_increased + exons_expanded_panel = EXPANDREGIONSEXONS.out.panel_increased.first() // all_json_subgenic = EXPANDREGIONSALL.out.new_regions_json // nonprot_json_subgenic = EXPANDREGIONSNONPROT.out.new_regions_json // prot_json_subgenic = EXPANDREGIONSPROT.out.new_regions_json // synonymous_json_subgenic = EXPANDREGIONSSYNONYMOUS.out.new_regions_json - exons_json_subgenic = EXPANDREGIONSEXONS.out.new_regions_json + exons_json_subgenic = EXPANDREGIONSEXONS.out.new_regions_json.first() } else { all_expanded_panel = all_consensus_panel @@ -70,13 +70,13 @@ workflow ENRICHPANELS { emit: - all_consensus_expanded_panel = all_expanded_panel.first() - nonprot_consensus_expanded_panel = nonprot_expanded_panel.first() - prot_consensus_expanded_panel = prot_expanded_panel.first() - synonymous_consensus_expanded_panel = synonymous_expanded_panel.first() - exons_consensus_expanded_panel = exons_expanded_panel.first() + all_consensus_expanded_panel = all_expanded_panel + nonprot_consensus_expanded_panel = nonprot_expanded_panel + prot_consensus_expanded_panel = prot_expanded_panel + synonymous_consensus_expanded_panel = synonymous_expanded_panel + exons_consensus_expanded_panel = exons_expanded_panel - exons_json_subgenic = exons_json_subgenic.first() + exons_json_subgenic = exons_json_subgenic dna2protein_mapping_depth_exons = DNA2PROTEINMAPPING.out.depths_exons_positions.first() dna2protein_mapping_panel_exons = DNA2PROTEINMAPPING.out.panel_exons_bed.first() diff --git a/subworkflows/local/omega/main.nf b/subworkflows/local/omega/main.nf index d772f826..3bcf8947 100644 --- a/subworkflows/local/omega/main.nf +++ b/subworkflows/local/omega/main.nf @@ -109,7 +109,7 @@ workflow OMEGA_ANALYSIS{ PREPROCESSINGGLOBALLOC(muts_n_depths_n_profile, expanded_panel, - mutationdensities.first(), + mutationdensities, all_samples_mut_profile) PREPROCESSINGGLOBALLOC.out.mutabs_n_mutations_tsv diff --git a/workflows/deepcsa.nf b/workflows/deepcsa.nf index 2c288edb..5b9261d2 100644 --- a/workflows/deepcsa.nf +++ b/workflows/deepcsa.nf @@ -323,7 +323,7 @@ workflow DEEPCSA { // Concatenate all outputs into a single file MUTDENSITYADJUSTED.out.mutdensities.map{ it -> it[1]}.flatten() .set{ all_adjusted_mutdensities } - all_adjusted_mutdensities.collectFile(name: "all_adjusted_mutdensities.tsv", storeDir:"${params.outdir}/mutdensity_adjusted", skip: 1, keepHeader: true).set{ all_adjusted_mutdensities_file } + all_adjusted_mutdensities.collectFile(name: "all_adjusted_mutdensities.tsv", storeDir:"${params.outdir}/mutdensity_adjusted", skip: 1, keepHeader: true).first().set{ all_adjusted_mutdensities_file } MUTDENSITYADJUSTED.out.mutdensities_flat.map{ it -> it[1]}.flatten() .set{ all_adjusted_mutdensities_flat } @@ -477,7 +477,7 @@ workflow DEEPCSA { } if (params.omega_globalloc){ positive_selection_results = positive_selection_results.join(OMEGA.out.results_global, remainder: true) - all_compiled_omegasgloballoc = OMEGA.out.all_globalloc_compiled + all_compiled_omegasgloballoc = OMEGA.out.all_globalloc_compiled.first() } if (params.regressions){ @@ -604,8 +604,8 @@ workflow DEEPCSA { PLOTTINGQC( somatic_mutations, all_mutdensities_file.first(), - all_adjusted_mutdensities_file.first(), - all_compiled_omegasgloballoc.first(), + all_adjusted_mutdensities_file, + all_compiled_omegasgloballoc, PLOTDEPTHSEXONSCONS.out.average_depth_gene_sample.first(), all_compiled_omegas, // site_comparison_results, @@ -631,7 +631,7 @@ workflow DEEPCSA { PLOTTINGSUMMARY(positive_selection_results_ready, somatic_mutations, all_mutdensities_file.first(), - all_adjusted_mutdensities_file.first(), + all_adjusted_mutdensities_file, site_comparison_results, ANNOTATEDEPTHS.out.all_samples_depths.first(), TABLE2GROUP.out.json_samples.first(), From 0ca40e334b91f515923a129a459cd7c1f501688b Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Mon, 8 Jun 2026 11:10:52 +0200 Subject: [PATCH 10/17] fix: omega preprocessing and estimator selector warning --- conf/base.config | 2 +- conf/tools/omega.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/base.config b/conf/base.config index 19f79562..8ffc8fe1 100644 --- a/conf/base.config +++ b/conf/base.config @@ -94,7 +94,7 @@ process { memory = { 8.GB * task.attempt } } - withName: 'BBGTOOLS:DEEPCSA:OMEGA.*:(PREPROCESSING|ESTIMATOR).*' { + withName: 'PREPROCESSING|ESTIMATOR' { memory = { 4.GB * task.attempt } } diff --git a/conf/tools/omega.config b/conf/tools/omega.config index 8ad4cf37..16c607b0 100644 --- a/conf/tools/omega.config +++ b/conf/tools/omega.config @@ -188,7 +188,7 @@ process { } - withName: 'PREPROCESSING.*|ESTIMATOR.*' { + withName: 'PREPROCESSING|ESTIMATOR' { ext.assembly = params.vep_genome == 'GRCh38' ? 'hg38' : params.vep_genome == 'GRCm39' From ddfae4cc5f86b4d471010f03094449dae5bb91ad Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Mon, 8 Jun 2026 11:13:47 +0200 Subject: [PATCH 11/17] docs: add total path for omega selectors --- conf/base.config | 1 + conf/exome.config | 5 +++-- conf/tools/omega.config | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conf/base.config b/conf/base.config index 8ffc8fe1..a423f5aa 100644 --- a/conf/base.config +++ b/conf/base.config @@ -94,6 +94,7 @@ process { memory = { 8.GB * task.attempt } } + // BBGTOOLS:DEEPCSA:OMEGA:ESTIMATOR and BBGTOOLS:DEEPCSA:OMEGA:PREPROCESSING withName: 'PREPROCESSING|ESTIMATOR' { memory = { 4.GB * task.attempt } } diff --git a/conf/exome.config b/conf/exome.config index 335dd991..ea61c3b5 100644 --- a/conf/exome.config +++ b/conf/exome.config @@ -98,8 +98,9 @@ process { memory = { 4.GB * task.attempt } time = { 360.min * task.attempt } } - - withName: '(BBGTOOLS:DEEPCSA:OMEGA.*:(PREPROCESSING|ESTIMATOR).*|BBGTOOLS:DEEPCSA:MULTIQC)' { + + // BBGTOOLS:DEEPCSA:OMEGA:ESTIMATOR and BBGTOOLS:DEEPCSA:OMEGA:PREPROCESSING + withName: 'PREPROCESSING|ESTIMATOR|BBGTOOLS:DEEPCSA:MULTIQC)' { memory = { 4.GB * task.attempt } } diff --git a/conf/tools/omega.config b/conf/tools/omega.config index 16c607b0..9f8cee7b 100644 --- a/conf/tools/omega.config +++ b/conf/tools/omega.config @@ -108,6 +108,7 @@ process { ] } + // BBGTOOLS:DEEPCSA:OMEGA:ESTIMATOR withName: ESTIMATOR { ext.option = 'mle' ext.args = "" @@ -187,7 +188,7 @@ process { ] } - + // BBGTOOLS:DEEPCSA:OMEGA:ESTIMATOR and BBGTOOLS:DEEPCSA:OMEGA:PREPROCESSING withName: 'PREPROCESSING|ESTIMATOR' { ext.assembly = params.vep_genome == 'GRCh38' ? 'hg38' From 094e2aca8a7036103fa18687b66578ac890673f9 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Mon, 8 Jun 2026 11:17:47 +0200 Subject: [PATCH 12/17] fix: remove selector warning sigprofilerassignment --- conf/base.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/base.config b/conf/base.config index a423f5aa..fbacfc64 100644 --- a/conf/base.config +++ b/conf/base.config @@ -99,8 +99,8 @@ process { memory = { 4.GB * task.attempt } } - // Gated by params.signatures && params.profilenonprot; "no matching selector" warning is expected when the feature is off - withName: 'BBGTOOLS:DEEPCSA:SIGNATURESNONPROT:SIGPROFILERASSIGNMENT*' { + // BBGTOOLS:DEEPCSA:SIGNATURESNONPROT:SIGPROFILERASSIGNMENT + withName: 'SIGPROFILERASSIGNMENT' { memory = { 2.GB * task.attempt } } From 95e3cf3febb1b5c8a2cc1dce8f7794ba10bec191 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Mon, 8 Jun 2026 15:47:19 +0200 Subject: [PATCH 13/17] refactor: simplify and remove selector warning for expand panels --- conf/tools/panels.config | 41 +--------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/conf/tools/panels.config b/conf/tools/panels.config index 78af271d..16681a58 100644 --- a/conf/tools/panels.config +++ b/conf/tools/panels.config @@ -57,7 +57,7 @@ process { ] } - withName: 'BBGTOOLS:DEEPCSA:ENRICHPANELS:EXPANDREGIONSALL' { + withName: 'EXPANDREGIONSALL|EXPANDREGIONSNONPROT|EXPANDREGIONSPROT|EXPANDREGIONSSYNONYMOUS|EXPANDREGIONSEXONS' { publishDir = [ [ mode: params.publish_dir_mode, @@ -67,43 +67,4 @@ process { ] } - withName: 'BBGTOOLS:DEEPCSA:ENRICHPANELS:EXPANDREGIONSNONPROT' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/expandedregions/" }, - pattern: "*{tsv,json}", - ] - ] - } - - withName: 'BBGTOOLS:DEEPCSA:ENRICHPANELS:EXPANDREGIONSPROT' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/expandedregions/" }, - pattern: "*{tsv,json}", - ] - ] - } - - withName: 'BBGTOOLS:DEEPCSA:ENRICHPANELS:EXPANDREGIONSSYNONYMOUS' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/expandedregions/" }, - pattern: "*{tsv,json}", - ] - ] - } - - withName: 'BBGTOOLS:DEEPCSA:ENRICHPANELS:EXPANDREGIONSEXONS' { - publishDir = [ - [ - mode: params.publish_dir_mode, - path: { "${params.outdir}/regions/expandedregions/" }, - pattern: "*{tsv,json}", - ] - ] - } } From 44d0381b15592a0a15e827dac5771c58ecca60ef Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Mon, 8 Jun 2026 16:15:03 +0200 Subject: [PATCH 14/17] refactor: remove selector warnings for regressions --- conf/modules.config | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 177a2eac..438c64e0 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -634,7 +634,7 @@ process { // BBGRegressions output configuration // Gated by params.regressions; "no matching selector" warning is expected when the feature is off - withName: '.*:REGRESSIONS.*:EDITCONFIG' { + withName: 'EDITCONFIG' { publishDir = [ [ mode: params.publish_dir_mode, @@ -645,7 +645,8 @@ process { ] } - withName: '.*:REGRESSIONS.*:CREATE_INPUT' { + // REGRESSIONS:CREATE_INPUT + withName: 'CREATE_INPUT' { publishDir = [ [ mode: params.publish_dir_mode, @@ -656,7 +657,8 @@ process { ] } - withName: '.*:REGRESSIONS.*:MODELS' { + // REGRESSIONS:MODELS + withName: 'MODELS' { publishDir = [ [ mode: params.publish_dir_mode, @@ -666,7 +668,8 @@ process { ] } - withName: '.*:REGRESSIONS.*:PLOT' { + // REGRESSIONS:PLOT + withName: 'PLOT' { publishDir = [ [ mode: params.publish_dir_mode, From 5a266fe8164d51414b89320aa209a304b5608fda Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Mon, 8 Jun 2026 16:59:08 +0200 Subject: [PATCH 15/17] chore: remove ".first()" warning in mutatiopreprocessing --- subworkflows/local/mutationpreprocessing/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subworkflows/local/mutationpreprocessing/main.nf b/subworkflows/local/mutationpreprocessing/main.nf index d5265230..789903e2 100644 --- a/subworkflows/local/mutationpreprocessing/main.nf +++ b/subworkflows/local/mutationpreprocessing/main.nf @@ -62,7 +62,7 @@ workflow MUTATION_PREPROCESSING { CUSTOMANNOTATION(SUMANNOTATION.out.tab, custom_annotation_tsv) summary_of_mutations = CUSTOMANNOTATION.out.mutations.first() } else { - summary_of_mutations = SUMANNOTATION.out.tab.first() + summary_of_mutations = SUMANNOTATION.out.tab } VCF2MAF(vcfs, summary_of_mutations) From 0a04146c2f103450e482c31667ef305119b42165 Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Mon, 8 Jun 2026 17:08:28 +0200 Subject: [PATCH 16/17] fix: remove stray closing paren in exome.config withName selector --- conf/exome.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/exome.config b/conf/exome.config index ea61c3b5..a74e952a 100644 --- a/conf/exome.config +++ b/conf/exome.config @@ -100,7 +100,7 @@ process { } // BBGTOOLS:DEEPCSA:OMEGA:ESTIMATOR and BBGTOOLS:DEEPCSA:OMEGA:PREPROCESSING - withName: 'PREPROCESSING|ESTIMATOR|BBGTOOLS:DEEPCSA:MULTIQC)' { + withName: 'PREPROCESSING|ESTIMATOR|BBGTOOLS:DEEPCSA:MULTIQC' { memory = { 4.GB * task.attempt } } From 04e98a8ed17fa8d133ddd5172468a7153907594e Mon Sep 17 00:00:00 2001 From: "Marta H." Date: Mon, 8 Jun 2026 17:23:47 +0200 Subject: [PATCH 17/17] docs: remove non used comment --- conf/modules.config | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/modules.config b/conf/modules.config index 438c64e0..76adb318 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -633,7 +633,6 @@ process { } // BBGRegressions output configuration - // Gated by params.regressions; "no matching selector" warning is expected when the feature is off withName: 'EDITCONFIG' { publishDir = [ [