From c1f83cc16c09a7f14b34b1b145a3b1437e8775d8 Mon Sep 17 00:00:00 2001 From: Usman Rashid Date: Fri, 25 Oct 2024 16:27:13 +1300 Subject: [PATCH] Added parameter hic_samtools_ext_args --- CHANGELOG.md | 1 + conf/modules.config | 5 ++++- docs/parameters.md | 13 +++++++------ nextflow.config | 1 + nextflow_schema.json | 6 ++++++ tests/README.md | 6 +++++- 6 files changed, 24 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b53c1203..78f86c63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 4. Now using nf-test for pipeline level testing [#153](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/153) 5. Added `text/html` as content mime type for the report file [#146](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/146) 6. Added a sequence labels table below the HiC contact map [#147](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/147) +7. Added parameter `hic_samtools_ext_args` and set its default value to `-F 3852` [#159](https://github.com/Plant-Food-Research-Open/assemblyqc/issues/159) ### `Fixed` diff --git a/conf/modules.config b/conf/modules.config index 817e6f0c..0f05443c 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -328,7 +328,10 @@ process { withName: '.*:FQ2HIC:FASTQ_BWA_MEM_SAMBLASTER:SAMBLASTER' { ext.prefix = { "${meta.id}.on.${meta.ref_id}.samblaster" } - ext.args3 = '-h -F 2316' + ext.args3 = [ + '-h', + params.hic_samtools_ext_args ? params.hic_samtools_ext_args.split("\\s(?=-+)") : '' + ].flatten().unique(false).join(' ').trim() } withName: '.*:FQ2HIC:AGP2ASSEMBLY' { diff --git a/docs/parameters.md b/docs/parameters.md index a6b2e912..90a39759 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -67,12 +67,13 @@ A Nextflow pipeline which evaluates assembly quality with multiple QC tools and ## HiC options -| Parameter | Description | Type | Default | Required | Hidden | -| -------------------- | ---------------------------------------------------------------------------------------- | --------- | ------------------------------------------------- | -------- | ------ | -| `hic` | HiC reads path provided as a SRA ID or as paired reads such as 'hic_reads{1,2}.fastq.gz' | `string` | | | | -| `hic_skip_fastp` | Skip HiC read trimming | `boolean` | | | | -| `hic_skip_fastqc` | Skip HiC read QC | `boolean` | | | | -| `hic_fastp_ext_args` | Additional parameters for fastp trimming | `string` | --qualified_quality_phred 20 --length_required 50 | | | +| Parameter | Description | Type | Default | Required | Hidden | +| ----------------------- | ---------------------------------------------------------------------------------------- | --------- | ------------------------------------------------- | -------- | ------ | +| `hic` | HiC reads path provided as a SRA ID or as paired reads such as 'hic_reads{1,2}.fastq.gz' | `string` | | | | +| `hic_skip_fastp` | Skip HiC read trimming | `boolean` | | | | +| `hic_skip_fastqc` | Skip HiC read QC | `boolean` | | | | +| `hic_fastp_ext_args` | Additional parameters for fastp trimming | `string` | --qualified_quality_phred 20 --length_required 50 | | | +| `hic_samtools_ext_args` | Additional parameters for samtools view command run after samblaster | `string` | -F 3852 | | | ## Synteny options diff --git a/nextflow.config b/nextflow.config index 88134d24..91e2ddf2 100644 --- a/nextflow.config +++ b/nextflow.config @@ -53,6 +53,7 @@ params { hic_skip_fastp = false hic_skip_fastqc = false hic_fastp_ext_args = '--qualified_quality_phred 20 --length_required 50' + hic_samtools_ext_args = '-F 3852' // Synteny options synteny_skip = true diff --git a/nextflow_schema.json b/nextflow_schema.json index eda14c7a..6b5b9d63 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -237,6 +237,12 @@ "default": "--qualified_quality_phred 20 --length_required 50", "description": "Additional parameters for fastp trimming", "fa_icon": "fas fa-terminal" + }, + "hic_samtools_ext_args": { + "type": "string", + "default": "-F 3852", + "fa_icon": "fas fa-terminal", + "description": "Additional parameters for samtools view command run after samblaster" } } }, diff --git a/tests/README.md b/tests/README.md index 6e935db0..6f09f846 100644 --- a/tests/README.md +++ b/tests/README.md @@ -16,7 +16,11 @@ nextflow run plant-food-research-open/assemblyqc -r main -profile singularity,te ## nf-test and Continuous Integration (CI) -The GitHub [CI action](../.github/workflows/ci.yml) included with the pipeline continuously tests the pipeline using [nf-test](https://www.nf-test.com). +The GitHub [CI action](../.github/workflows/ci.yml) included with the pipeline continuously tests the pipeline using [nf-test](https://www.nf-test.com). Many components included with the pipeline such as [minimap2/align](../modules/nf-core/minimap2/align) include their own [tests](../modules/nf-core/minimap2/align/tests/main.nf.test) with test data from nf-core. + +## Testing with a Large Dataset at Plant&Food + +Before each release, the functionality of the entire pipeline is tested with a large dataset on the on-prem SLURM-based HPC at The New Zealand Institute of Plant and Food Research. ## Testing Merqury Datasets