From e20999186ca2a715af6fcc725aa256e10850a9b1 Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Fri, 3 Jun 2022 14:41:48 +0200 Subject: [PATCH 1/9] Add --outdir to usage describtion in test configs --- conf/test_adapterremoval.config | 2 +- conf/test_ancient_dna.config | 2 +- conf/test_busco_auto.config | 2 +- conf/test_host_rm.config | 2 +- conf/test_hybrid.config | 2 +- conf/test_hybrid_host_rm.config | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/test_adapterremoval.config b/conf/test_adapterremoval.config index 0725cbc2..45836fbc 100644 --- a/conf/test_adapterremoval.config +++ b/conf/test_adapterremoval.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/mag -profile test, + nextflow run nf-core/mag -profile test, --outdir ---------------------------------------------------------------------------------------- */ diff --git a/conf/test_ancient_dna.config b/conf/test_ancient_dna.config index 84e18830..33b6f4f8 100644 --- a/conf/test_ancient_dna.config +++ b/conf/test_ancient_dna.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/mag -profile test_ancient_dna, + nextflow run nf-core/mag -profile test_ancient_dna, --outdir ---------------------------------------------------------------------------------------- */ diff --git a/conf/test_busco_auto.config b/conf/test_busco_auto.config index 8e3d3f86..adf3d277 100644 --- a/conf/test_busco_auto.config +++ b/conf/test_busco_auto.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/mag -profile test_busco_auto, + nextflow run nf-core/mag -profile test_busco_auto, --outdir ---------------------------------------------------------------------------------------- */ diff --git a/conf/test_host_rm.config b/conf/test_host_rm.config index 4e912bd3..c93317db 100644 --- a/conf/test_host_rm.config +++ b/conf/test_host_rm.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/mag -profile test_host_rm, + nextflow run nf-core/mag -profile test_host_rm, --outdir ---------------------------------------------------------------------------------------- */ diff --git a/conf/test_hybrid.config b/conf/test_hybrid.config index edc879e7..873d2c5c 100644 --- a/conf/test_hybrid.config +++ b/conf/test_hybrid.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/mag -profile test_hybrid, + nextflow run nf-core/mag -profile test_hybrid, --outdir ---------------------------------------------------------------------------------------- */ diff --git a/conf/test_hybrid_host_rm.config b/conf/test_hybrid_host_rm.config index 08649bc5..29db0f7a 100644 --- a/conf/test_hybrid_host_rm.config +++ b/conf/test_hybrid_host_rm.config @@ -5,7 +5,7 @@ Defines input files and everything required to run a fast and simple pipeline test. Use as follows: - nextflow run nf-core/mag -profile test_hybrid_host_rm, + nextflow run nf-core/mag -profile test_hybrid_host_rm, --outdir ---------------------------------------------------------------------------------------- */ From 023873eaf853fd0765cf31a9bea1712b59d51bd4 Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Wed, 8 Jun 2022 15:45:33 +0200 Subject: [PATCH 2/9] Change remaining ext.suffix to ext.prefix --- conf/modules.config | 8 ++++---- modules/local/bowtie2_removal_align.nf | 4 ++-- modules/local/nanoplot.nf | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index f3cb1c42..846c518c 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -75,7 +75,7 @@ process { } withName: BOWTIE2_PHIX_REMOVAL_ALIGN { - ext.suffix = "phix_removed" + ext.prefix = { "${meta.id}.phix_removed" } publishDir = [ path: { "${params.outdir}/QC_shortreads/remove_phix" }, mode: params.publish_dir_mode, @@ -84,7 +84,7 @@ process { } withName: BOWTIE2_HOST_REMOVAL_ALIGN { - ext.suffix = "host_removed" + ext.prefix = { "${meta.id}.host_removed" } publishDir = [ path: { "${params.outdir}/QC_shortreads/remove_host" }, mode: params.publish_dir_mode, @@ -111,7 +111,7 @@ process { } withName: NANOPLOT_RAW { - ext.suffix = 'raw' + ext.prefix = 'raw' publishDir = [ path: { "${params.outdir}/QC_longreads/NanoPlot/${meta.id}" }, mode: params.publish_dir_mode, @@ -120,7 +120,7 @@ process { } withName: NANOPLOT_FILTERED { - ext.suffix = 'filtered' + ext.prefix = 'filtered' publishDir = [ path: { "${params.outdir}/QC_longreads/NanoPlot/${meta.id}" }, mode: params.publish_dir_mode, diff --git a/modules/local/bowtie2_removal_align.nf b/modules/local/bowtie2_removal_align.nf index 5d11e916..880d932f 100644 --- a/modules/local/bowtie2_removal_align.nf +++ b/modules/local/bowtie2_removal_align.nf @@ -2,7 +2,7 @@ * Bowtie2 for read removal */ process BOWTIE2_REMOVAL_ALIGN { - tag "${meta.id}-${task.ext.suffix}" + tag "$meta.id" conda (params.enable_conda ? "bioconda::bowtie2=2.4.2" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? @@ -21,7 +21,7 @@ process BOWTIE2_REMOVAL_ALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.suffix ? "${meta.id}.${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ?: "${meta.id}" def sensitivity = params.host_removal_verysensitive ? "--very-sensitive" : "--sensitive" def save_ids = params.host_removal_save_ids ? "Y" : "N" if (!meta.single_end){ diff --git a/modules/local/nanoplot.nf b/modules/local/nanoplot.nf index f280aef5..f746e8c5 100644 --- a/modules/local/nanoplot.nf +++ b/modules/local/nanoplot.nf @@ -16,8 +16,8 @@ process NANOPLOT { path "versions.yml" , emit: versions script: - def prefix = task.ext.suffix ? "-p ${task.ext.suffix}_" : '' - def title = task.ext.suffix ? "${meta.id}_${task.ext.suffix}" : "${meta.id}" + def prefix = task.ext.prefix ? "-p ${task.ext.prefix}_" : '' + def title = task.ext.prefix ? "${meta.id}_${task.ext.prefix}" : "${meta.id}" """ NanoPlot -t ${task.cpus} \ ${prefix} \ From a36fe42cfc3289b5fbbde0108a206ed7b2135c63 Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Wed, 8 Jun 2022 17:41:43 +0200 Subject: [PATCH 3/9] Fix parameter processing in BOWTIE2_REMOVAL_ALIGN --- conf/modules.config | 2 ++ modules/local/bowtie2_removal_align.nf | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index 846c518c..4051ec08 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -84,6 +84,8 @@ process { } withName: BOWTIE2_HOST_REMOVAL_ALIGN { + ext.args = params.host_removal_verysensitive ? "--very-sensitive" : "--sensitive" + ext.args2 = params.host_removal_save_ids ? "--host_removal_save_ids" : '' ext.prefix = { "${meta.id}.host_removed" } publishDir = [ path: { "${params.outdir}/QC_shortreads/remove_host" }, diff --git a/modules/local/bowtie2_removal_align.nf b/modules/local/bowtie2_removal_align.nf index 880d932f..919111c0 100644 --- a/modules/local/bowtie2_removal_align.nf +++ b/modules/local/bowtie2_removal_align.nf @@ -21,15 +21,15 @@ process BOWTIE2_REMOVAL_ALIGN { script: def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def sensitivity = params.host_removal_verysensitive ? "--very-sensitive" : "--sensitive" - def save_ids = params.host_removal_save_ids ? "Y" : "N" + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def save_ids = (args2.contains('--host_removal_save_ids')) ? "Y" : "N" if (!meta.single_end){ """ bowtie2 -p ${task.cpus} \ -x ${index[0].getSimpleName()} \ -1 "${reads[0]}" -2 "${reads[1]}" \ - $sensitivity \ + $args \ --un-conc-gz ${prefix}.unmapped_%.fastq.gz \ --al-conc-gz ${prefix}.mapped_%.fastq.gz \ 1> /dev/null \ @@ -50,7 +50,7 @@ process BOWTIE2_REMOVAL_ALIGN { bowtie2 -p ${task.cpus} \ -x ${index[0].getSimpleName()} \ -U ${reads} \ - $sensitivity \ + $args \ --un-gz ${prefix}.unmapped.fastq.gz \ --al-gz ${prefix}.mapped.fastq.gz \ 1> /dev/null \ From 77ec9c4921d8282bb9d27397ac2cc7bcdd8fe0f4 Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Wed, 8 Jun 2022 17:44:18 +0200 Subject: [PATCH 4/9] Fix docs for host removal --- docs/output.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/output.md b/docs/output.md index 7d00380b..52752511 100644 --- a/docs/output.md +++ b/docs/output.md @@ -89,7 +89,8 @@ The pipeline uses bowtie2 to map short reads against the host reference genome s Output files - `QC_shortreads/remove_host/` - - `[sample].host_removed.bowtie2.log`: Contains the bowtie2 log file indicating how many reads have been mapped as well as a file listing the read ids of discarded reads. + - `[sample].host_removed.bowtie2.log`: Contains the bowtie2 log file indicating how many reads have been mapped. + - `[sample].host_removed.mapped*.read_ids.txt`: Contains a file listing the read ids of discarded reads. From 945f3ef4982d3d3508b47afdba976e31b28babbc Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Wed, 8 Jun 2022 17:47:32 +0200 Subject: [PATCH 5/9] Adjust TOC in output.md --- docs/output.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/output.md b/docs/output.md index 52752511..1c366afe 100644 --- a/docs/output.md +++ b/docs/output.md @@ -18,6 +18,7 @@ The pipeline is built using [Nextflow](https://www.nextflow.io/) and processes d - [Taxonomic classification of binned genomes](#taxonomic-classification-of-binned-genomes) - [Genome annotation of binned genomes](#genome-annotation-of-binned-genomes) - [Additional summary for binned genomes](#additional-summary-for-binned-genomes) +- [Ancient DNA](#ancient-dna) - [MultiQC](#multiqc) - aggregate report, describing results of the whole pipeline - [Pipeline information](#pipeline-information) - Report metrics generated during the workflow execution @@ -512,7 +513,8 @@ Whole genome annotation is the process of identifying features of interest in a -## Ancient DNA (optional, only with `-profile ancient_dna`) +## Ancient DNA +Optional, only running when parameter `-profile ancient_dna` is specified. ### `PyDamage` From 1930a219219201bc798b9683c82ceb4cebbfbbf7 Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Wed, 8 Jun 2022 22:45:49 +0200 Subject: [PATCH 6/9] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7136e61..fed0e457 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#305](https://github.com/nf-core/mag/pull/305) - Add missing Bowtie2 version for process `BOWTIE2_PHIX_REMOVAL_ALIGN` to `software_versions.yml` - [#307](https://github.com/nf-core/mag/pull/307) - Fix retrieval of GTDB-Tk version (note about newer version caused error in `CUSTOM_DUMPSOFTWAREVERSIONS`) - [#309](https://github.com/nf-core/mag/pull/309) - Fix publishing of BUSCO `busco_downloads/` folder, i.e. publish only when `--save_busco_reference` is specified +- [#321](https://github.com/nf-core/mag/pull/321) - Fix parameter processing in `BOWTIE2_REMOVAL_ALIGN` (which was erroneously for `BOWTIE2_PHIX_REMOVAL_ALIGN`) ### `Dependencies` From 5d909952b04d51fe054e5949f22afde6526c51de Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Wed, 8 Jun 2022 23:14:07 +0200 Subject: [PATCH 7/9] Add tool version changes to CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fed0e457..c250fc70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Dependencies` +| Tool | Previous version | New version | +| -------- | ---------------- | ----------- | +| fastp | 0.20.1 | 0.23.2 | +| MULTIQC | 1.11 | 1.12 | + ## v2.1.1 - 2021/11/25 ### `Added` From 93a778c34aea9f116b06d539cbc1f088ea5840b9 Mon Sep 17 00:00:00 2001 From: James Fellows Yates Date: Thu, 9 Jun 2022 08:31:47 +0200 Subject: [PATCH 8/9] Prettier --- CHANGELOG.md | 8 ++++---- docs/output.md | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c250fc70..84c25086 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,10 +31,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### `Dependencies` -| Tool | Previous version | New version | -| -------- | ---------------- | ----------- | -| fastp | 0.20.1 | 0.23.2 | -| MULTIQC | 1.11 | 1.12 | +| Tool | Previous version | New version | +| ------- | ---------------- | ----------- | +| fastp | 0.20.1 | 0.23.2 | +| MULTIQC | 1.11 | 1.12 | ## v2.1.1 - 2021/11/25 diff --git a/docs/output.md b/docs/output.md index 1c366afe..c969b9bf 100644 --- a/docs/output.md +++ b/docs/output.md @@ -514,6 +514,7 @@ Whole genome annotation is the process of identifying features of interest in a ## Ancient DNA + Optional, only running when parameter `-profile ancient_dna` is specified. ### `PyDamage` From c7d9edd407f5df09e0bab6c5981230d630ac5978 Mon Sep 17 00:00:00 2001 From: Sabrina Krakau Date: Mon, 13 Jun 2022 11:45:56 +0200 Subject: [PATCH 9/9] Fix CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84c25086..03f80ba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | Tool | Previous version | New version | | ------- | ---------------- | ----------- | | fastp | 0.20.1 | 0.23.2 | -| MULTIQC | 1.11 | 1.12 | +| MultiQC | 1.11 | 1.12 | ## v2.1.1 - 2021/11/25