From 24b0952cc5c0f372bd7d9ce5592a2f6c0ce6d0f0 Mon Sep 17 00:00:00 2001 From: Joon-Klaps Date: Wed, 17 Jan 2024 12:33:50 +0000 Subject: [PATCH 1/4] Add depthcutoff parameter of FREYJA_BOOT and FREYJA_DEMIX modules as freyja_depthcutoff --- conf/modules_illumina.config | 9 ++++++++- conf/modules_nanopore.config | 12 +++++++++--- nextflow.config | 1 + nextflow_schema.json | 8 +++++++- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/conf/modules_illumina.config b/conf/modules_illumina.config index 2cc48bea..b3ae58fc 100644 --- a/conf/modules_illumina.config +++ b/conf/modules_illumina.config @@ -194,6 +194,7 @@ if (!params.skip_variants) { if (!params.skip_freyja) { process { withName: 'FREYJA_VARIANTS' { + ext.args = {} publishDir = [ path: { "${params.outdir}/variants/freyja/variants" }, mode: params.publish_dir_mode, @@ -201,6 +202,9 @@ if (!params.skip_variants) { ] } withName: 'FREYJA_DEMIX' { + ext.args = [ + {params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : ''}, + ].join(' ').trim() publishDir = [ path: { "${params.outdir}/variants/freyja/demix" }, mode: params.publish_dir_mode, @@ -208,7 +212,10 @@ if (!params.skip_variants) { ] } withName: 'FREYJA_BOOT' { - ext.args = '--boxplot pdf' + ext.args = [ + {params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : ''}, + '--boxplot pdf', + ].join(' ').trim() publishDir = [ path: { "${params.outdir}/variants/freyja/bootstrap" }, mode: params.publish_dir_mode, diff --git a/conf/modules_nanopore.config b/conf/modules_nanopore.config index 31ca44fb..9a2f024b 100644 --- a/conf/modules_nanopore.config +++ b/conf/modules_nanopore.config @@ -240,17 +240,23 @@ if (!params.skip_freyja) { } withName: 'FREYJA_DEMIX' { + ext.args = [ + {params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : ''}, + ].join(' ').trim() publishDir = [ - path: { "${params.outdir}/${params.artic_minion_caller}/freyja/demix" }, + path: { "${params.outdir}/variants/freyja/demix" }, mode: params.publish_dir_mode, pattern: "*.{tsv,csv}" ] } withName: 'FREYJA_BOOT' { - ext.args = '--boxplot pdf' + ext.args = [ + {params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : ''}, + '--boxplot pdf', + ].join(' ').trim() publishDir = [ - path: { "${params.outdir}/${params.artic_minion_caller}/freyja/bootstrap" }, + path: { "${params.outdir}/variants/freyja/bootstrap" }, mode: params.publish_dir_mode, pattern: "*.{tsv,csv,pdf}" ] diff --git a/nextflow.config b/nextflow.config index 03e9c48b..60c7dec0 100644 --- a/nextflow.config +++ b/nextflow.config @@ -43,6 +43,7 @@ params { max_multiqc_email_size = '25.MB' skip_freyja = false freyja_repeats = 100 + freyja_depthcutoff = null freyja_db_name = 'freyja_db' freyja_barcodes = null freyja_lineages = null diff --git a/nextflow_schema.json b/nextflow_schema.json index 083172b5..62b78d6e 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -253,7 +253,7 @@ }, "skip_freyja": { "type": "boolean", - "fa_icon": "fas fast-forward", + "fa_icon": "fas fa-forward", "description": "Skip freyja deep SARS-CoV-2 variant analysis using a depth weighted approach." }, "freyja_db_name": { @@ -262,6 +262,12 @@ "fa_icon": "fas fa-folder-open", "description": "Specify the name where to store UShER database (default: 'freyja_db')." }, + "freyja_depthcutoff": { + "type": "number", + "description": "Specify a coverage depth minimum which excludes sites with coverage less than the specified value", + "fa_icon": "fas fa-hand-paper", + "help_text": "Using the `depthcutoff` option may result in some distinct lineages now having identical barcodes, which are grouped into the format `[lineage]-like(num)` (based on their shared phylogeny) in the output." + }, "freyja_repeats": { "type": "integer", "default": 100, From 788fe2e42307e8be6373c504f477e776288a0820 Mon Sep 17 00:00:00 2001 From: Joon-Klaps Date: Wed, 17 Jan 2024 12:42:23 +0000 Subject: [PATCH 2/4] bad closure --- conf/modules_illumina.config | 4 ++-- conf/modules_nanopore.config | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/modules_illumina.config b/conf/modules_illumina.config index b3ae58fc..a45e9a70 100644 --- a/conf/modules_illumina.config +++ b/conf/modules_illumina.config @@ -203,7 +203,7 @@ if (!params.skip_variants) { } withName: 'FREYJA_DEMIX' { ext.args = [ - {params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : ''}, + params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : '', ].join(' ').trim() publishDir = [ path: { "${params.outdir}/variants/freyja/demix" }, @@ -213,7 +213,7 @@ if (!params.skip_variants) { } withName: 'FREYJA_BOOT' { ext.args = [ - {params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : ''}, + params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : '', '--boxplot pdf', ].join(' ').trim() publishDir = [ diff --git a/conf/modules_nanopore.config b/conf/modules_nanopore.config index 9a2f024b..10817d53 100644 --- a/conf/modules_nanopore.config +++ b/conf/modules_nanopore.config @@ -241,7 +241,7 @@ if (!params.skip_freyja) { withName: 'FREYJA_DEMIX' { ext.args = [ - {params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : ''}, + params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : '', ].join(' ').trim() publishDir = [ path: { "${params.outdir}/variants/freyja/demix" }, @@ -252,7 +252,7 @@ if (!params.skip_freyja) { withName: 'FREYJA_BOOT' { ext.args = [ - {params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : ''}, + params.freyja_depthcutoff ? "--depthcutoff ${params.freyja_depthcutoff}" : '', '--boxplot pdf', ].join(' ').trim() publishDir = [ From b86f0e773f26126cf0200faad04412f5988cd813 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Wed, 17 Jan 2024 19:46:11 +0000 Subject: [PATCH 3/4] [automated] Fix linting with Prettier --- .devcontainer/devcontainer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4ecfbfe3..4a9bc5c7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,11 +18,11 @@ "python.linting.flake8Path": "/opt/conda/bin/flake8", "python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle", "python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle", - "python.linting.pylintPath": "/opt/conda/bin/pylint" + "python.linting.pylintPath": "/opt/conda/bin/pylint", }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"] - } - } + "extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"], + }, + }, } From 66d2cf136ec8b29d6dfbc52a6b9faf9ed44fff5e Mon Sep 17 00:00:00 2001 From: Joon-Klaps Date: Thu, 25 Jan 2024 10:54:33 +0000 Subject: [PATCH 4/4] Update parameters in CHANGELOG.md --- CHANGELOG.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f0676a3..91427a99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,16 +20,18 @@ Thank you to everyone else that has contributed by reporting bugs, enhancements - [[PR #387](https://github.com/nf-core/viralrecon/pull/387)] - Software closes gracefully when encountering an error - [[PR #395](https://github.com/nf-core/viralrecon/pull/395)] - Remove minia from default assemblers because it is unreliable - [[PR #393](https://github.com/nf-core/viralrecon/pull/393)] - Changed primer set to params +- [[PR [#405](https://github.com/nf-core/viralrecon/issues/405)]] - Including parameter `depthcutoff` to freyja demix and boot ### Parameters -| Old parameter | New parameter | -| ------------------- | ------------- | -| `--skip_freyja` | | -| `--freyja_repeats` | | -| `--freyja_db_name` | | -| `--freyja_barcodes` | | -| `--freyja_lineages` | | +| Old parameter | New parameter | +| ---------------------- | ------------- | +| `--skip_freyja` | | +| `--freyja_repeats` | | +| `--freyja_db_name` | | +| `--freyja_barcodes` | | +| `--freyja_lineages` | | +| `--freyja_depthcutoff` | | > **NB:** Parameter has been **updated** if both old and new parameter information is present. > **NB:** Parameter has been **added** if just the new parameter information is present.