From 4a6d9e3ead685aba698b477e4c366bbc5f43b92f Mon Sep 17 00:00:00 2001 From: Maxime Borry Date: Wed, 13 Mar 2024 15:20:55 +0000 Subject: [PATCH 1/3] feat: allow adna co-binning --- lib/WorkflowMag.groovy | 3 --- subworkflows/local/ancient_dna.nf | 9 ++++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/WorkflowMag.groovy b/lib/WorkflowMag.groovy index cd1a4456..2a7521bc 100755 --- a/lib/WorkflowMag.groovy +++ b/lib/WorkflowMag.groovy @@ -19,9 +19,6 @@ class WorkflowMag { if (params.coassemble_group && params.binning_map_mode == 'own') { Nextflow.error("Invalid combination of parameter '--binning_map_mode own' and parameter '--coassemble_group'. Select either 'all' or 'group' mapping mode when performing group-wise co-assembly.") } - if (params.ancient_dna && params.binning_map_mode != 'own') { - Nextflow.error("Invalid combination of parameter '--binning_map_mode' and parameter '--ancient_dna'. Ancient DNA mode can only be executed with --binning_map_mode own. You supplied: --binning_map_mode ${params.binning_map_mode}") - } // Check if specified cpus for SPAdes are available if ( params.spades_fix_cpus > params.max_cpus ) { diff --git a/subworkflows/local/ancient_dna.nf b/subworkflows/local/ancient_dna.nf index 3aa7814e..868b16ee 100644 --- a/subworkflows/local/ancient_dna.nf +++ b/subworkflows/local/ancient_dna.nf @@ -12,7 +12,14 @@ workflow ANCIENT_DNA_ASSEMBLY_VALIDATION { main: ch_versions = Channel.empty() - PYDAMAGE_ANALYZE(input.map {item -> [item[0], item[2], item[3]]}) + PYDAMAGE_ANALYZE( + input.map { + meta, contigs, bam, bai -> [ + meta, bam[0], bai[0] + ] + } + ) + PYDAMAGE_FILTER(PYDAMAGE_ANALYZE.out.csv) ch_versions = ch_versions.mix(PYDAMAGE_ANALYZE.out.versions.first()) From 8344d182e614b5a13b1d43ab9ab9441ebd946945 Mon Sep 17 00:00:00 2001 From: Maxime Borry Date: Wed, 13 Mar 2024 15:24:50 +0000 Subject: [PATCH 2/3] chore: update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64fd254c..5c6816a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Changed` - [#581](https://github.com/nf-core/mag/pull/581) - Added explicit licence text to headers of all custom scripts (reported by @FriederikeHanssen and @maxibor, fix by @jfy133) +- [#602](https://github.com/nf-core/mag/pull/602) - Enables co-binning when using aDNA mode (added by @maxibor) ### `Fixed` From 2f62ecdf29baf7c119a99dc1d0ddc85559a3b6b6 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Thu, 18 Apr 2024 11:43:31 +0200 Subject: [PATCH 3/3] Apply suggestions from code review --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c6816a5..cc0f448a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Changed` - [#581](https://github.com/nf-core/mag/pull/581) - Added explicit licence text to headers of all custom scripts (reported by @FriederikeHanssen and @maxibor, fix by @jfy133) -- [#602](https://github.com/nf-core/mag/pull/602) - Enables co-binning when using aDNA mode (added by @maxibor) +- [#602](https://github.com/nf-core/mag/pull/602) - Co-binning when using aDNA mode now enabled (added by @maxibor) ### `Fixed`