From 5f6a8e8d69abc2d969d5a3faa504baaf384cf9d0 Mon Sep 17 00:00:00 2001 From: Felipe Marques de Almeida Date: Wed, 4 Sep 2024 14:53:01 +0000 Subject: [PATCH 1/4] modify code to parse -pacbio-hifi --- modules/local/LongReads/canu.nf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/local/LongReads/canu.nf b/modules/local/LongReads/canu.nf index bffa1d17..b8cbf3f6 100644 --- a/modules/local/LongReads/canu.nf +++ b/modules/local/LongReads/canu.nf @@ -16,7 +16,11 @@ process canu { script: lr = (lr_type == 'nanopore') ? '-nanopore' : '-pacbio' - corrected = (corrected_longreads.toBoolean() || high_quality_longreads.toBoolean()) ? '-corrected' : '' // canu does not have a specific config for high-quality, however, --corrected means, skipping canu read correction phase, which is what we want. + corrected = (corrected_longreads.toBoolean()) ? '-corrected' : '' // user wants the -corrected parameter + if (high_quality_longreads.toBoolean()) { + if (lr_type == 'nanopore') { corrected = '-corrected' } // for nanopore there is no special hifi option, so activate normal -corrected + if (lr_type == 'pacbio') { lr = lr + '-hifi' } // constructs special -pacbio-hifi parameter + } fixed_id = id - ":strategy_2" additional_params = (params.canu_additional_parameters) ? params.canu_additional_parameters : "" """ From 85f97707cf965d3a974fa6b4953f8922b5372274 Mon Sep 17 00:00:00 2001 From: Felipe Marques de Almeida Date: Wed, 4 Sep 2024 14:57:42 +0000 Subject: [PATCH 2/4] update version and changelog --- markdown/CHANGELOG.md | 5 +++++ nextflow.config | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/markdown/CHANGELOG.md b/markdown/CHANGELOG.md index 365051dd..f5e9b518 100644 --- a/markdown/CHANGELOG.md +++ b/markdown/CHANGELOG.md @@ -2,6 +2,11 @@ The tracking for changes started in v2. +## v3.2.2 -- TBD + +* [#82](https://github.com/fmalmeida/MpGAP/issues/82) + * Small fix to allow canu to use `-pacbio-hifi` parameter when using `--high_quality_longreads` pipeline parameter. For nanopore it stays using `-corrected` since canu does not have a special option for high-quality nanopore data. + ## v3.2.1 -- [2024-Jul-24] * [#77](https://github.com/fmalmeida/MpGAP/issues/77) diff --git a/nextflow.config b/nextflow.config index 57ceb2d0..c57d2322 100644 --- a/nextflow.config +++ b/nextflow.config @@ -109,5 +109,5 @@ manifest { homePage = "https://github.com/fmalmeida/mpgap" mainScript = "main.nf" nextflowVersion = "!>=21.10.3" - version = "3.2.1" + version = "3.2.2" } \ No newline at end of file From 918c5219c36a19e34d1e77e693a28c6711e473ae Mon Sep 17 00:00:00 2001 From: Felipe Marques de Almeida Date: Wed, 4 Sep 2024 14:59:15 +0000 Subject: [PATCH 3/4] update docs --- docs/manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manual.md b/docs/manual.md index 19234943..58e75f91 100644 --- a/docs/manual.md +++ b/docs/manual.md @@ -135,7 +135,7 @@ However, they can also be set in a sample-specific manner. If a sample has a val | `--wtdbg2_technology` | :material-close: | ont/sq | It tells the pipeline which technology the long reads are, which is required for wtdbg2. Options are: `ont` for Nanopore reads, `rs` for PacBio RSII, `sq` for PacBio Sequel, `ccs` for PacBio CCS reads. With not wanted, consider using `--skip_wtdbg2` | | `--shasta_config` | :material-close: | Nanopore-Oct2021 | It tells the pipeline which shasta pre-set configuration to use when assembling nanopore reads. Please read the [shasta configuration manual page](https://chanzuckerberg.github.io/shasta/Configurations.html) to know the available models | | `--corrected_longreads` | :material-check: | False | It tells the pipeline to interpret the input long reads as "corrected". This will activate (if available) the options for corrected reads in the assemblers. For example: `-corrected` (in canu), `--pacbio-corr|--nano-corr` (in flye), etc. Be cautious when using this parameter. If your reads are not corrected, and you use this parameter, you will probably do not generate any contig | -| `--high_quality_longreads` | :material-check: | False | It tells the pipeline to interpret the input long reads as "(high quality - hifi)". This will activate (if available) the options for high quality (hifi) reads in the assemblers. For example: `-corrected` (in canu), `--pacbio-hifi|--nano-hq` (in flye), etc. Be cautious when using this parameter. If your reads are not corrected, and you use this parameter, you will probably do not generate any contig | +| `--high_quality_longreads` | :material-check: | False | It tells the pipeline to interpret the input long reads as "(high quality - hifi)". This will activate (if available) the options for high quality (hifi) reads in the assemblers. For example: `-pacbio-hifi|-nanopore -corrected` (in canu), `--pacbio-hifi|--nano-hq` (in flye), etc. Be cautious when using this parameter. If your reads are not corrected, and you use this parameter, you will probably do not generate any contig | ### Long reads polishers From b82aa33719962366ac214675d61a60a13d6d342f Mon Sep 17 00:00:00 2001 From: Felipe Marques de Almeida Date: Thu, 5 Sep 2024 11:49:16 +0000 Subject: [PATCH 4/4] update date --- markdown/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/CHANGELOG.md b/markdown/CHANGELOG.md index f5e9b518..bda74001 100644 --- a/markdown/CHANGELOG.md +++ b/markdown/CHANGELOG.md @@ -2,7 +2,7 @@ The tracking for changes started in v2. -## v3.2.2 -- TBD +## v3.2.2 -- [2024-Sep-06] * [#82](https://github.com/fmalmeida/MpGAP/issues/82) * Small fix to allow canu to use `-pacbio-hifi` parameter when using `--high_quality_longreads` pipeline parameter. For nanopore it stays using `-corrected` since canu does not have a special option for high-quality nanopore data.