From 8260193cab28f7767215130f420be7ce385d65f7 Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Mon, 20 Jul 2026 13:50:01 +1200 Subject: [PATCH 01/12] haphic container fix --- modules/gallvp/haphic/refsort/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gallvp/haphic/refsort/main.nf b/modules/gallvp/haphic/refsort/main.nf index 7f29046..20f612a 100644 --- a/modules/gallvp/haphic/refsort/main.nf +++ b/modules/gallvp/haphic/refsort/main.nf @@ -4,8 +4,8 @@ process HAPHIC_REFSORT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/haphic:1.0.7--hdfd78af_0': - 'biocontainers/haphic:1.0.7--hdfd78af_0' }" + 'docker://gallvp/haphic:1.0.7--hdfd78af_0': + 'docker.io/gallvp/haphic:1.0.7--hdfd78af_0' }" input: tuple val(meta), path(agp) From bed8037debf9d003fa963d65fe3c19ee9d5ece0c Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Mon, 20 Jul 2026 14:01:48 +1200 Subject: [PATCH 02/12] install minibwa --- modules.json | 10 ++ modules/nf-core/minibwa/index/environment.yml | 8 + modules/nf-core/minibwa/index/main.nf | 41 +++++ modules/nf-core/minibwa/index/meta.yml | 67 ++++++++ .../nf-core/minibwa/index/tests/main.nf.test | 58 +++++++ .../minibwa/index/tests/main.nf.test.snap | 60 ++++++++ modules/nf-core/minibwa/map/environment.yml | 12 ++ modules/nf-core/minibwa/map/main.nf | 71 +++++++++ modules/nf-core/minibwa/map/meta.yml | 137 +++++++++++++++++ .../nf-core/minibwa/map/tests/main.nf.test | 143 ++++++++++++++++++ .../minibwa/map/tests/main.nf.test.snap | 126 +++++++++++++++ 11 files changed, 733 insertions(+) create mode 100644 modules/nf-core/minibwa/index/environment.yml create mode 100644 modules/nf-core/minibwa/index/main.nf create mode 100644 modules/nf-core/minibwa/index/meta.yml create mode 100644 modules/nf-core/minibwa/index/tests/main.nf.test create mode 100644 modules/nf-core/minibwa/index/tests/main.nf.test.snap create mode 100644 modules/nf-core/minibwa/map/environment.yml create mode 100644 modules/nf-core/minibwa/map/main.nf create mode 100644 modules/nf-core/minibwa/map/meta.yml create mode 100644 modules/nf-core/minibwa/map/tests/main.nf.test create mode 100644 modules/nf-core/minibwa/map/tests/main.nf.test.snap diff --git a/modules.json b/modules.json index 51262d9..996701a 100644 --- a/modules.json +++ b/modules.json @@ -313,6 +313,16 @@ "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", "installed_by": ["modules"] }, + "minibwa/index": { + "branch": "master", + "git_sha": "838d07c09dfac095defc7b39c6b56ca9741ee517", + "installed_by": ["modules"] + }, + "minibwa/map": { + "branch": "master", + "git_sha": "838d07c09dfac095defc7b39c6b56ca9741ee517", + "installed_by": ["modules"] + }, "minimap2/align": { "branch": "master", "git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46", diff --git a/modules/nf-core/minibwa/index/environment.yml b/modules/nf-core/minibwa/index/environment.yml new file mode 100644 index 0000000..f6d4afd --- /dev/null +++ b/modules/nf-core/minibwa/index/environment.yml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + # renovate: datasource=conda depName=bioconda/minibwa + - "bioconda::minibwa=0.2" diff --git a/modules/nf-core/minibwa/index/main.nf b/modules/nf-core/minibwa/index/main.nf new file mode 100644 index 0000000..b5e0ef8 --- /dev/null +++ b/modules/nf-core/minibwa/index/main.nf @@ -0,0 +1,41 @@ +process MINIBWA_INDEX { + tag "$fasta" + // NOTE minibwa builds an FM-index with libsais; peak memory scales with the reference size. + memory { 280.MB * Math.ceil(fasta.size() / 10000000) * task.attempt } + + conda "${moduleDir}/environment.yml" + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/65/65579835ae1cda4cac4bec86b6210473b95f88d2ce8e4d7b6257a81bee1e8a27/data' + : 'community.wave.seqera.io/library/minibwa:0.2--38d72f7ba96c74d9'}" + + input: + tuple val(meta), path(fasta) + + output: + tuple val(meta), path("minibwa"), emit: index + tuple val("${task.process}"), val('minibwa'), eval('minibwa version | grep -o -E "[0-9]+(\\.[0-9]+)+"'), emit: versions_minibwa, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def prefix = task.ext.prefix ?: "${fasta}" + def args = task.ext.args ?: '' + """ + mkdir minibwa + minibwa \\ + index \\ + $args \\ + -t ${task.cpus} \\ + $fasta \\ + minibwa/${prefix} + """ + + stub: + def prefix = task.ext.prefix ?: "${fasta}" + """ + mkdir minibwa + touch minibwa/${prefix}.l2b + touch minibwa/${prefix}.mbw + """ +} diff --git a/modules/nf-core/minibwa/index/meta.yml b/modules/nf-core/minibwa/index/meta.yml new file mode 100644 index 0000000..5e07d11 --- /dev/null +++ b/modules/nf-core/minibwa/index/meta.yml @@ -0,0 +1,67 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "minibwa_index" +description: Create a minibwa index for a reference genome +keywords: + - index + - fasta + - genome + - reference +tools: + - "minibwa": + description: "Aligning short and accurate long reads to a reference genome, a + reimplementation of bwa-mem." + homepage: "https://github.com/lh3/minibwa" + documentation: "https://github.com/lh3/minibwa" + tool_dev_url: "https://github.com/lh3/minibwa" + licence: ["GPL-2.0-or-later"] + identifier: "" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - fasta: + type: file + description: Input genome fasta file + ontologies: + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1929" +output: + index: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - minibwa: + type: directory + description: minibwa genome index files + pattern: "*.{l2b,mbw}" + ontologies: + - edam: "http://edamontology.org/data_3210" + versions_minibwa: + - - ${task.process}: + type: string + description: The name of the process + - minibwa: + type: string + description: The name of the tool + - minibwa version | grep -o -E "[0-9]+(\.[0-9]+)+": + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - minibwa: + type: string + description: The name of the tool + - minibwa version | grep -o -E "[0-9]+(\.[0-9]+)+": + type: eval + description: The expression to obtain the version of the tool +authors: + - "@nh13" +maintainers: + - "@nh13" diff --git a/modules/nf-core/minibwa/index/tests/main.nf.test b/modules/nf-core/minibwa/index/tests/main.nf.test new file mode 100644 index 0000000..ca214a9 --- /dev/null +++ b/modules/nf-core/minibwa/index/tests/main.nf.test @@ -0,0 +1,58 @@ +nextflow_process { + + name "Test Process MINIBWA_INDEX" + script "../main.nf" + process "MINIBWA_INDEX" + + tag "modules" + tag "modules_nfcore" + tag "minibwa" + tag "minibwa/index" + + test("sarscov2 - fasta") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + + test("sarscov2 - fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ] + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + + } + +} diff --git a/modules/nf-core/minibwa/index/tests/main.nf.test.snap b/modules/nf-core/minibwa/index/tests/main.nf.test.snap new file mode 100644 index 0000000..c47e9f3 --- /dev/null +++ b/modules/nf-core/minibwa/index/tests/main.nf.test.snap @@ -0,0 +1,60 @@ +{ + "sarscov2 - fasta - stub": { + "content": [ + { + "index": [ + [ + { + "id": "test" + }, + [ + "genome.fasta.l2b:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.mbw:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions_minibwa": [ + [ + "MINIBWA_INDEX", + "minibwa", + "0.2" + ] + ] + } + ], + "timestamp": "2026-07-01T16:48:44.253299", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sarscov2 - fasta": { + "content": [ + { + "index": [ + [ + { + "id": "test" + }, + [ + "genome.fasta.l2b:md5,ce853b9123f9af32450d99760f63f434", + "genome.fasta.mbw:md5,b7c37be4b0070d844f99ed1120bdab50" + ] + ] + ], + "versions_minibwa": [ + [ + "MINIBWA_INDEX", + "minibwa", + "0.2" + ] + ] + } + ], + "timestamp": "2026-07-01T16:48:40.594179", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file diff --git a/modules/nf-core/minibwa/map/environment.yml b/modules/nf-core/minibwa/map/environment.yml new file mode 100644 index 0000000..8fce89e --- /dev/null +++ b/modules/nf-core/minibwa/map/environment.yml @@ -0,0 +1,12 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + # renovate: datasource=conda depName=bioconda/htslib + - "bioconda::htslib=1.23.1" + # renovate: datasource=conda depName=bioconda/minibwa + - "bioconda::minibwa=0.2" + # renovate: datasource=conda depName=bioconda/samtools + - "bioconda::samtools=1.23.1" diff --git a/modules/nf-core/minibwa/map/main.nf b/modules/nf-core/minibwa/map/main.nf new file mode 100644 index 0000000..2d34b5f --- /dev/null +++ b/modules/nf-core/minibwa/map/main.nf @@ -0,0 +1,71 @@ +process MINIBWA_MAP { + tag "${meta.id}" + label 'process_high' + + conda "${moduleDir}/environment.yml" + container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container + ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/ec/ecd6faa7d0bc3c9a6f49bb0ace74108375850ae8ba4ae6c5fbcc1679f756b374/data' + : 'community.wave.seqera.io/library/minibwa_samtools_htslib:6f37dc94f6ac9e37'}" + + input: + tuple val(meta), path(reads) + tuple val(meta2), path(index) + tuple val(meta3), path(fasta) + val sort_bam + + output: + tuple val(meta), path("*.{sam,bam,cram}"), emit: aligned + tuple val(meta), path("*.{bai,csi,crai}"), emit: index, optional: true + tuple val("${task.process}"), val('minibwa'), eval('minibwa version | grep -o -E "[0-9]+(\\.[0-9]+)+"'), emit: versions_minibwa, topic: versions + tuple val("${task.process}"), val('samtools'), eval("samtools version | sed '1!d;s/.* //'"), emit: versions_samtools, topic: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def samtools_command = sort_bam ? 'sort' : 'view' + + def extension_pattern = /(--output-fmt|-O)+\s+(\S+)/ + def extension_matcher = (args2 =~ extension_pattern) + def extension = extension_matcher.getCount() > 0 ? extension_matcher[0][2].toLowerCase() : "bam" + def reference = fasta && extension == "cram" ? "--reference ${fasta}" : "" + if (!fasta && extension == "cram") { + error("Fasta reference is required for CRAM output") + } + """ + INDEX=`find -L ./ -name "*.l2b" | sed 's/\\.l2b\$//'` + + minibwa \\ + map \\ + ${args} \\ + -t ${task.cpus} \\ + \$INDEX \\ + ${reads} \\ + | samtools ${samtools_command} ${args2} -@ ${task.cpus} ${reference} -o ${prefix}.${extension} - + """ + + stub: + def args2 = task.ext.args2 ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def extension_pattern = /(--output-fmt|-O)+\s+(\S+)/ + def extension_matcher = (args2 =~ extension_pattern) + def extension = extension_matcher.getCount() > 0 ? extension_matcher[0][2].toLowerCase() : "bam" + if (!fasta && extension == "cram") { + error("Fasta reference is required for CRAM output") + } + + def create_index = "" + if (extension == "cram") { + create_index = "touch ${prefix}.crai" + } + else if (extension == "bam") { + create_index = "touch ${prefix}.csi" + } + """ + touch ${prefix}.${extension} + ${create_index} + """ +} diff --git a/modules/nf-core/minibwa/map/meta.yml b/modules/nf-core/minibwa/map/meta.yml new file mode 100644 index 0000000..e7a20cd --- /dev/null +++ b/modules/nf-core/minibwa/map/meta.yml @@ -0,0 +1,137 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +name: "minibwa_map" +description: Align fastq reads to a fasta reference using minibwa +keywords: + - map + - mem + - alignment + - fastq + - bam + - sam +tools: + - "minibwa": + description: "Aligning short and accurate long reads to a reference genome, a + reimplementation of bwa-mem." + homepage: "https://github.com/lh3/minibwa" + documentation: "https://github.com/lh3/minibwa" + tool_dev_url: "https://github.com/lh3/minibwa" + licence: ["GPL-2.0-or-later"] + identifier: "" + - "samtools": + description: "Tools for dealing with SAM, BAM and CRAM files" + homepage: "http://www.htslib.org" + documentation: "http://www.htslib.org/doc/samtools.html" + doi: "10.1093/bioinformatics/btp352" + licence: ["MIT"] + identifier: "biotools:samtools" +input: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - reads: + type: file + description: | + List of input FastQ files of size 1 and 2 for single-end and paired-end data, + respectively. + ontologies: + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1930" + - - meta2: + type: map + description: | + Groovy Map containing reference/index information + e.g. [ id:'test' ] + - index: + type: file + description: minibwa genome index files + pattern: "Directory containing minibwa index *.{l2b,mbw}" + ontologies: + - edam: "http://edamontology.org/data_3210" + - - meta3: + type: map + description: | + Groovy Map containing reference information + e.g. [ id:'genome' ] + - fasta: + type: file + description: Reference genome in FASTA format + pattern: "*.{fa,fasta,fna}" + ontologies: + - edam: "http://edamontology.org/data_2044" + - edam: "http://edamontology.org/format_1929" + - sort_bam: + type: boolean + description: use samtools sort (true) or samtools view (false) + pattern: "true or false" +output: + aligned: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{sam,bam,cram}": + type: file + description: Output SAM/BAM/CRAM file containing read alignments + pattern: "*.{sam,bam,cram}" + ontologies: + - edam: "http://edamontology.org/format_2573" + - edam: "http://edamontology.org/format_2572" + - edam: "http://edamontology.org/format_3462" + index: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.{bai,csi,crai}": + type: file + description: Index file for the aligned BAM/CRAM file + pattern: "*.{bai,csi,crai}" + ontologies: [] + versions_minibwa: + - - ${task.process}: + type: string + description: The name of the process + - minibwa: + type: string + description: The name of the tool + - minibwa version | grep -o -E "[0-9]+(\.[0-9]+)+": + type: eval + description: The expression to obtain the version of the tool + versions_samtools: + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool +topics: + versions: + - - ${task.process}: + type: string + description: The name of the process + - minibwa: + type: string + description: The name of the tool + - minibwa version | grep -o -E "[0-9]+(\.[0-9]+)+": + type: eval + description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: The name of the process + - samtools: + type: string + description: The name of the tool + - samtools version | sed '1!d;s/.* //': + type: eval + description: The expression to obtain the version of the tool +authors: + - "@nh13" +maintainers: + - "@nh13" diff --git a/modules/nf-core/minibwa/map/tests/main.nf.test b/modules/nf-core/minibwa/map/tests/main.nf.test new file mode 100644 index 0000000..8abb8fc --- /dev/null +++ b/modules/nf-core/minibwa/map/tests/main.nf.test @@ -0,0 +1,143 @@ +nextflow_process { + + name "Test Process MINIBWA_MAP" + script "../main.nf" + process "MINIBWA_MAP" + + tag "modules" + tag "modules_nfcore" + tag "minibwa" + tag "minibwa/map" + tag "minibwa/index" + + setup { + run("MINIBWA_INDEX") { + script "../../index/main.nf" + process { + """ + input[0] = Channel.of([ + [:], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + ]) + """ + } + } + } + + test("sarscov2 - fastq, index, fasta, false") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + input[1] = MINIBWA_INDEX.out.index + input[2] = Channel.of([[:], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + input[3] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.aligned[0][1]).getHeaderMD5(), + bam(process.out.aligned[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions") } + ).match() } + ) + } + } + + test("sarscov2 - fastq, index, fasta, true") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:true ], // meta map + [file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true)] + ]) + input[1] = MINIBWA_INDEX.out.index + input[2] = Channel.of([[:], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + input[3] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.aligned[0][1]).getHeaderMD5(), + bam(process.out.aligned[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions") } + ).match() } + ) + } + } + + test("sarscov2 - [fastq1, fastq2], index, fasta, true") { + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = MINIBWA_INDEX.out.index + input[2] = Channel.of([[:], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + input[3] = true + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.aligned[0][1]).getHeaderMD5(), + bam(process.out.aligned[0][1]).getReadsMD5(), + process.out.findAll { key, val -> key.startsWith("versions") } + ).match() } + ) + } + } + + test("sarscov2 - [fastq1, fastq2], index, fasta, true - stub") { + + options "-stub" + + when { + process { + """ + input[0] = Channel.of([ + [ id:'test', single_end:false ], // meta map + [ + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) + ] + ]) + input[1] = MINIBWA_INDEX.out.index + input[2] = Channel.of([[:], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)]) + input[3] = true + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot(sanitizeOutput(process.out)).match() } + ) + } + } + +} diff --git a/modules/nf-core/minibwa/map/tests/main.nf.test.snap b/modules/nf-core/minibwa/map/tests/main.nf.test.snap new file mode 100644 index 0000000..4847c06 --- /dev/null +++ b/modules/nf-core/minibwa/map/tests/main.nf.test.snap @@ -0,0 +1,126 @@ +{ + "sarscov2 - [fastq1, fastq2], index, fasta, true - stub": { + "content": [ + { + "aligned": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "index": [ + [ + { + "id": "test", + "single_end": false + }, + "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions_minibwa": [ + [ + "MINIBWA_MAP", + "minibwa", + "0.2" + ] + ], + "versions_samtools": [ + [ + "MINIBWA_MAP", + "samtools", + "1.23.1" + ] + ] + } + ], + "timestamp": "2026-07-01T16:49:16.00544", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sarscov2 - [fastq1, fastq2], index, fasta, true": { + "content": [ + "16004c47bd99242197a941ba808f222d", + "f3a1593b170cf1e9b9008b3afb77cc53", + { + "versions_minibwa": [ + [ + "MINIBWA_MAP", + "minibwa", + "0.2" + ] + ], + "versions_samtools": [ + [ + "MINIBWA_MAP", + "samtools", + "1.23.1" + ] + ] + } + ], + "timestamp": "2026-06-26T10:34:10.030597", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sarscov2 - fastq, index, fasta, false": { + "content": [ + "6ca35eff022cd0901eb22edb02033b48", + "798439cbd7fd81cbcc5078022dc5479d", + { + "versions_minibwa": [ + [ + "MINIBWA_MAP", + "minibwa", + "0.2" + ] + ], + "versions_samtools": [ + [ + "MINIBWA_MAP", + "samtools", + "1.23.1" + ] + ] + } + ], + "timestamp": "2026-06-26T10:33:58.165445", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + }, + "sarscov2 - fastq, index, fasta, true": { + "content": [ + "abee21926b58cc6ca485138e445c5d52", + "94fcf617f5b994584c4e8d4044e16b4f", + { + "versions_minibwa": [ + [ + "MINIBWA_MAP", + "minibwa", + "0.2" + ] + ], + "versions_samtools": [ + [ + "MINIBWA_MAP", + "samtools", + "1.23.1" + ] + ] + } + ], + "timestamp": "2026-06-26T10:34:03.931595", + "meta": { + "nf-test": "0.9.5", + "nextflow": "25.10.4" + } + } +} \ No newline at end of file From 36713df4b0559a7c9963c2507a214dceda7bbfa9 Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Mon, 20 Jul 2026 14:24:39 +1200 Subject: [PATCH 03/12] config changes for minibwa --- conf/modules.config | 2 +- subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index e5eb9d6..a89229e 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -357,7 +357,7 @@ process { withName: '.*:FQ2HIC:FASTQ_BWA_MEM_SAMBLASTER:BWA_MEM' { ext.prefix = { "${meta.id}.on.${meta.ref_id}.bwa.mem" } - ext.args = '-5SP' + ext.args = '--hic' ext.args2 = '-n' } diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf index a3849ff..c216522 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf @@ -1,5 +1,5 @@ -include { BWA_INDEX } from '../../../modules/gallvp/bwa/index/main' -include { BWA_MEM } from '../../../modules/gallvp/bwa/mem/main' +include { BWA_INDEX } from '../../../modules/nf-core/minibwa/index/main' +include { BWA_MEM } from '../../../modules/nf-core/minibwa/map/main' include { SAMBLASTER } from '../../../modules/gallvp/samblaster/main' workflow FASTQ_BWA_MEM_SAMBLASTER { From 14c397b58cbead1867aa397f37d8e572cf073973 Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Mon, 20 Jul 2026 15:17:38 +1200 Subject: [PATCH 04/12] Update test params and fix version calls --- .../gallvp/fastq_bwa_mem_samblaster/main.nf | 23 ++++++++++--------- .../tests/nextflow.config | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf index c216522..85a290a 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf @@ -1,5 +1,5 @@ -include { BWA_INDEX } from '../../../modules/nf-core/minibwa/index/main' -include { BWA_MEM } from '../../../modules/nf-core/minibwa/map/main' +include { MINIBWA_INDEX } from '../../../modules/nf-core/minibwa/index/main' +include { MINIBWA_MAP } from '../../../modules/nf-core/minibwa/map/main' include { SAMBLASTER } from '../../../modules/gallvp/samblaster/main' workflow FASTQ_BWA_MEM_SAMBLASTER { @@ -18,10 +18,10 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { no: !index } - // MODULE: BWA_INDEX - BWA_INDEX ( ch_has_index.no.map { meta2, fasta, _index -> [ meta2, fasta ] } ) + // MODULE: MINIBWA_INDEX + MINIBWA_INDEX ( ch_has_index.no.map { meta2, fasta, _index -> [ meta2, fasta ] } ) - ch_bwa_index = BWA_INDEX.out.index + ch_bwa_index = MINIBWA_INDEX.out.index | mix( ch_has_index.yes | map { meta2, _fasta, index -> @@ -29,9 +29,9 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { } ) - ch_versions = ch_versions.mix(BWA_INDEX.out.versions.first()) + ch_versions = ch_versions.mix(MINIBWA_INDEX.out.versions_minibwa.first()) - // MODULE: BWA_MEM + // MODULE: MINIBWA_MAP ch_mem_inputs = ch_fastq | combine( ch_bwa_index @@ -40,16 +40,17 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { [ meta + [ ref_id: meta2.id ], fq, index ] } - BWA_MEM( + MINIBWA_MAP( ch_mem_inputs.map { meta, fq, _index -> [ meta, fq ] }, ch_mem_inputs.map { _meta, _fq, index -> [ [], index ] }, [ [], [] ], val_sort_bam ) - ch_mem_bam = BWA_MEM.out.bam - ch_versions = ch_versions.mix(BWA_MEM.out.versions.first()) - + ch_mem_bam = MINIBWA_MAP.out.aligned + ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_minibwa.first()) + ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_samtools.first()) + // MODULE: SAMBLASTER SAMBLASTER ( ch_mem_bam ) diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config b/subworkflows/gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config index 7583034..c311790 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config @@ -1,7 +1,7 @@ process { withName: BWA_MEM { ext.prefix = { "${meta.id}.on.${meta.ref_id}.bwa.mem" } - ext.args = '-5SP' + ext.args = '--hic' ext.args2 = '-n' } From 3d9820a2e61dc44f8e1f266966d85177fa2b3a23 Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Mon, 20 Jul 2026 15:45:45 +1200 Subject: [PATCH 05/12] removed bwa-mem modules --- .nf-core.yml | 2 +- modules.json | 14 +- modules/gallvp/bwa/index/environment.yml | 11 - modules/gallvp/bwa/index/main.nf | 55 ---- modules/gallvp/bwa/index/meta.yml | 58 ---- modules/gallvp/bwa/index/tests/main.nf.test | 33 --- .../gallvp/bwa/index/tests/main.nf.test.snap | 47 --- modules/gallvp/bwa/index/tests/tags.yml | 2 - modules/gallvp/bwa/mem/environment.yml | 11 - modules/gallvp/bwa/mem/main.nf | 74 ----- modules/gallvp/bwa/mem/meta.yml | 116 -------- modules/gallvp/bwa/mem/tests/main.nf.test | 260 ----------------- .../gallvp/bwa/mem/tests/main.nf.test.snap | 271 ------------------ modules/gallvp/bwa/mem/tests/tags.yml | 3 - ro-crate-metadata.json | 2 +- 15 files changed, 4 insertions(+), 955 deletions(-) delete mode 100644 modules/gallvp/bwa/index/environment.yml delete mode 100644 modules/gallvp/bwa/index/main.nf delete mode 100644 modules/gallvp/bwa/index/meta.yml delete mode 100644 modules/gallvp/bwa/index/tests/main.nf.test delete mode 100644 modules/gallvp/bwa/index/tests/main.nf.test.snap delete mode 100644 modules/gallvp/bwa/index/tests/tags.yml delete mode 100644 modules/gallvp/bwa/mem/environment.yml delete mode 100644 modules/gallvp/bwa/mem/main.nf delete mode 100644 modules/gallvp/bwa/mem/meta.yml delete mode 100644 modules/gallvp/bwa/mem/tests/main.nf.test delete mode 100644 modules/gallvp/bwa/mem/tests/main.nf.test.snap delete mode 100644 modules/gallvp/bwa/mem/tests/tags.yml diff --git a/.nf-core.yml b/.nf-core.yml index dab1ae0..aab6ee3 100644 --- a/.nf-core.yml +++ b/.nf-core.yml @@ -2,7 +2,7 @@ lint: multiqc_config: false template_strings: false actions_nf_test: false - included_configs: false + # included_configs: false files_exist: - conf/igenomes.config - conf/igenomes_ignored.config diff --git a/modules.json b/modules.json index 996701a..8608865 100644 --- a/modules.json +++ b/modules.json @@ -15,16 +15,6 @@ "git_sha": "24e1e41036efe2bfec933c389021c7d9b3e9936a", "installed_by": ["fasta_bedtools_makewindows_nuc"] }, - "bwa/index": { - "branch": "main", - "git_sha": "f0a8febe769ae3e58740973a5cb984e6a6cd89d7", - "installed_by": ["fastq_bwa_mem_samblaster"] - }, - "bwa/mem": { - "branch": "main", - "git_sha": "f0a8febe769ae3e58740973a5cb984e6a6cd89d7", - "installed_by": ["fastq_bwa_mem_samblaster"] - }, "cat/cat": { "branch": "main", "git_sha": "5d2d4b9090a66560be9aff2e2bb8219045b62d6c", @@ -316,12 +306,12 @@ "minibwa/index": { "branch": "master", "git_sha": "838d07c09dfac095defc7b39c6b56ca9741ee517", - "installed_by": ["modules"] + "installed_by": ["fastq_bwa_mem_samblaster"] }, "minibwa/map": { "branch": "master", "git_sha": "838d07c09dfac095defc7b39c6b56ca9741ee517", - "installed_by": ["modules"] + "installed_by": ["fastq_bwa_mem_samblaster"] }, "minimap2/align": { "branch": "master", diff --git a/modules/gallvp/bwa/index/environment.yml b/modules/gallvp/bwa/index/environment.yml deleted file mode 100644 index f4c4109..0000000 --- a/modules/gallvp/bwa/index/environment.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - conda-forge - - bioconda - -dependencies: - # renovate: datasource=conda depName=bioconda/bwa - - bioconda::bwa=0.7.18 - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 diff --git a/modules/gallvp/bwa/index/main.nf b/modules/gallvp/bwa/index/main.nf deleted file mode 100644 index 72e078a..0000000 --- a/modules/gallvp/bwa/index/main.nf +++ /dev/null @@ -1,55 +0,0 @@ -process BWA_INDEX { - tag "$fasta" - // NOTE requires 5.37N memory where N is the size of the database - // source: https://bio-bwa.sourceforge.net/bwa.shtml#8 - memory { 6.B * fasta.size() } - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/bf/bf7890f8d4e38a7586581cb7fa13401b7af1582f21d94eef969df4cea852b6da/data' : - 'community.wave.seqera.io/library/bwa_htslib_samtools:56c9f8d5201889a4' }" - - input: - tuple val(meta), path(fasta) - - output: - tuple val(meta), path("bwa") , emit: index - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def prefix = task.ext.prefix ?: "${fasta.baseName}" - def args = task.ext.args ?: '' - """ - mkdir bwa - bwa \\ - index \\ - $args \\ - -p bwa/${prefix} \\ - $fasta - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${fasta.baseName}" - """ - mkdir bwa - - touch bwa/${prefix}.amb - touch bwa/${prefix}.ann - touch bwa/${prefix}.bwt - touch bwa/${prefix}.pac - touch bwa/${prefix}.sa - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - END_VERSIONS - """ -} diff --git a/modules/gallvp/bwa/index/meta.yml b/modules/gallvp/bwa/index/meta.yml deleted file mode 100644 index 1781586..0000000 --- a/modules/gallvp/bwa/index/meta.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: bwa_index -description: Create BWA index for reference genome -keywords: - - index - - fasta - - genome - - reference -tools: - - bwa: - description: | - BWA is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bio-bwa.sourceforge.net/ - documentation: https://bio-bwa.sourceforge.net/bwa.shtml - arxiv: arXiv:1303.3997 - licence: ["GPL-3.0-or-later"] - identifier: "biotools:bwa" -input: - - - meta: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Input genome fasta file - ontologies: - - edam: "http://edamontology.org/data_2044" # Sequence - - edam: "http://edamontology.org/format_1929" # FASTA -output: - index: - - - meta: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - bwa: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - pattern: "*.{amb,ann,bwt,pac,sa}" - ontologies: - - edam: "http://edamontology.org/data_3210" # Genome index - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML -authors: - - "@drpatelh" - - "@maxulysse" -maintainers: - - "@drpatelh" - - "@maxulysse" - - "@gallvp" diff --git a/modules/gallvp/bwa/index/tests/main.nf.test b/modules/gallvp/bwa/index/tests/main.nf.test deleted file mode 100644 index ec24499..0000000 --- a/modules/gallvp/bwa/index/tests/main.nf.test +++ /dev/null @@ -1,33 +0,0 @@ -nextflow_process { - - name "Test Process BWA_INDEX" - tag "modules_gallvp" - tag "modules" - tag "bwa" - tag "bwa/index" - script "../main.nf" - process "BWA_INDEX" - - test("BWA index") { - - when { - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - - } - -} \ No newline at end of file diff --git a/modules/gallvp/bwa/index/tests/main.nf.test.snap b/modules/gallvp/bwa/index/tests/main.nf.test.snap deleted file mode 100644 index 7c8f046..0000000 --- a/modules/gallvp/bwa/index/tests/main.nf.test.snap +++ /dev/null @@ -1,47 +0,0 @@ -{ - "BWA index": { - "content": [ - { - "0": [ - [ - { - "id": "test" - }, - [ - "genome.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e", - "genome.ann:md5,c32e11f6c859f166c7525a9c1d583567", - "genome.bwt:md5,0469c30a1e239dd08f68afe66fde99da", - "genome.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66", - "genome.sa:md5,ab3952cabf026b48cd3eb5bccbb636d1" - ] - ] - ], - "1": [ - "versions.yml:md5,a64462ac7dfb21f4ade9b02e7f65c5bb" - ], - "index": [ - [ - { - "id": "test" - }, - [ - "genome.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e", - "genome.ann:md5,c32e11f6c859f166c7525a9c1d583567", - "genome.bwt:md5,0469c30a1e239dd08f68afe66fde99da", - "genome.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66", - "genome.sa:md5,ab3952cabf026b48cd3eb5bccbb636d1" - ] - ] - ], - "versions": [ - "versions.yml:md5,a64462ac7dfb21f4ade9b02e7f65c5bb" - ] - } - ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "23.10.1" - }, - "timestamp": "2024-05-16T11:40:09.925307" - } -} \ No newline at end of file diff --git a/modules/gallvp/bwa/index/tests/tags.yml b/modules/gallvp/bwa/index/tests/tags.yml deleted file mode 100644 index 28bb483..0000000 --- a/modules/gallvp/bwa/index/tests/tags.yml +++ /dev/null @@ -1,2 +0,0 @@ -bwa/index: - - modules/nf-core/bwa/index/** diff --git a/modules/gallvp/bwa/mem/environment.yml b/modules/gallvp/bwa/mem/environment.yml deleted file mode 100644 index f4c4109..0000000 --- a/modules/gallvp/bwa/mem/environment.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json -channels: - - conda-forge - - bioconda - -dependencies: - # renovate: datasource=conda depName=bioconda/bwa - - bioconda::bwa=0.7.18 - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 diff --git a/modules/gallvp/bwa/mem/main.nf b/modules/gallvp/bwa/mem/main.nf deleted file mode 100644 index 3c54417..0000000 --- a/modules/gallvp/bwa/mem/main.nf +++ /dev/null @@ -1,74 +0,0 @@ -process BWA_MEM { - tag "$meta.id" - label 'process_high' - - conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/bf/bf7890f8d4e38a7586581cb7fa13401b7af1582f21d94eef969df4cea852b6da/data' : - 'community.wave.seqera.io/library/bwa_htslib_samtools:56c9f8d5201889a4' }" - - input: - tuple val(meta) , path(reads) - tuple val(meta2), path(index) - tuple val(meta3), path(fasta) - val sort_bam - - output: - tuple val(meta), path("*.bam") , emit: bam, optional: true - tuple val(meta), path("*.cram") , emit: cram, optional: true - tuple val(meta), path("*.csi") , emit: csi, optional: true - tuple val(meta), path("*.crai") , emit: crai, optional: true - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def samtools_command = sort_bam ? 'sort' : 'view' - def extension = args2.contains("--output-fmt sam") ? "sam" : - args2.contains("--output-fmt cram") ? "cram": - sort_bam && args2.contains("-O cram")? "cram": - !sort_bam && args2.contains("-C") ? "cram": - "bam" - def reference = fasta && extension=="cram" ? "--reference ${fasta}" : "" - if (!fasta && extension=="cram") error "Fasta reference is required for CRAM output" - """ - INDEX=`find -L ./ -name "*.amb" | sed 's/\\.amb\$//'` - - bwa mem \\ - $args \\ - -t $task.cpus \\ - \$INDEX \\ - $reads \\ - | samtools $samtools_command $args2 ${reference} --threads $task.cpus -o ${prefix}.${extension} - - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ - - stub: - def args2 = task.ext.args2 ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args2.contains("--output-fmt sam") ? "sam" : - args2.contains("--output-fmt cram") ? "cram": - sort_bam && args2.contains("-O cram")? "cram": - !sort_bam && args2.contains("-C") ? "cram": - "bam" - """ - touch ${prefix}.${extension} - touch ${prefix}.csi - touch ${prefix}.crai - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - bwa: \$(echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//') - samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//') - END_VERSIONS - """ -} diff --git a/modules/gallvp/bwa/mem/meta.yml b/modules/gallvp/bwa/mem/meta.yml deleted file mode 100644 index e1265ab..0000000 --- a/modules/gallvp/bwa/mem/meta.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: bwa_mem -description: Performs fastq alignment to a fasta reference using BWA -keywords: - - mem - - bwa - - alignment - - map - - fastq - - bam - - sam -tools: - - bwa: - description: | - BWA is a software package for mapping DNA sequences against - a large reference genome, such as the human genome. - homepage: http://bio-bwa.sourceforge.net/ - documentation: https://bio-bwa.sourceforge.net/bwa.shtml - arxiv: arXiv:1303.3997 - licence: ["GPL-3.0-or-later"] - identifier: "biotools:bwa" -input: - - - meta: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - reads: - type: file - description: | - List of input FastQ files of size 1 and 2 for single-end and paired-end data, - respectively. - ontologies: - - edam: "http://edamontology.org/data_2044" # Sequence - - edam: "http://edamontology.org/format_1930" # FASTQ - - - meta2: - type: map - description: | - Groovy Map containing reference information. - e.g. [ id:'test', single_end:false ] - - index: - type: file - description: BWA genome index files - pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" - ontologies: - - edam: "http://edamontology.org/data_3210" # Genome index - - - meta3: - type: map - description: | - Groovy Map containing sample information - e.g. [ id:'test', single_end:false ] - - fasta: - type: file - description: Reference genome in FASTA format - pattern: "*.{fasta,fa}" - ontologies: - - edam: "http://edamontology.org/data_2044" # Sequence - - edam: "http://edamontology.org/format_1929" # FASTA - - sort_bam: - type: boolean - description: use samtools sort (true) or samtools view (false) - pattern: "true or false" -output: - bam: - - - meta: - type: map - description: Groovy Map containing sample information - - "*.bam": - type: file - description: Output BAM file containing read alignments - pattern: "*.{bam}" - ontologies: - - edam: "http://edamontology.org/format_2572" # BAM - cram: - - - meta: - type: file - description: Output BAM file containing read alignments - ontologies: [] - - "*.cram": - type: file - description: Output CRAM file containing read alignments - pattern: "*.{cram}" - ontologies: - - edam: "http://edamontology.org/format_3462" # CRAM - csi: - - - meta: - type: map - description: Groovy Map containing sample information - - "*.csi": - type: file - description: Optional index file for BAM file - pattern: "*.{csi}" - ontologies: [] - crai: - - - meta: - type: map - description: Groovy Map containing sample information - - "*.crai": - type: file - description: Optional index file for CRAM file - pattern: "*.{crai}" - ontologies: [] - versions: - - versions.yml: - type: file - description: File containing software versions - pattern: "versions.yml" - ontologies: - - edam: http://edamontology.org/format_3750 # YAML -authors: - - "@drpatelh" - - "@jeremy1805" - - "@matthdsm" -maintainers: - - "@drpatelh" - - "@jeremy1805" - - "@matthdsm" diff --git a/modules/gallvp/bwa/mem/tests/main.nf.test b/modules/gallvp/bwa/mem/tests/main.nf.test deleted file mode 100644 index b6e3c8b..0000000 --- a/modules/gallvp/bwa/mem/tests/main.nf.test +++ /dev/null @@ -1,260 +0,0 @@ -nextflow_process { - - name "Test Process BWA_MEM" - tag "modules_gallvp" - tag "modules" - tag "bwa" - tag "bwa/mem" - tag "bwa/index" - script "../main.nf" - process "BWA_MEM" - - setup { - run("BWA_INDEX") { - script "../../index/main.nf" - process { - """ - input[0] = [ - [id: 'test'], - file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) - ] - """ - } - } - } - - test("Single-End") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:true ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) - ] - ] - input[1] = BWA_INDEX.out.index - input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - input[3] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - process.out.cram, - process.out.csi, - process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), - bam(process.out.bam[0][1]).getReadsMD5() - ).match() - } - ) - } - - } - - test("Single-End Sort") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:true ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) - ] - ] - input[1] = BWA_INDEX.out.index - input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - input[3] = true - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - process.out.cram, - process.out.csi, - process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), - bam(process.out.bam[0][1]).getReadsMD5() - ).match() - } - ) - } - - } - - test("Paired-End") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) - ] - ] - input[1] = BWA_INDEX.out.index - input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - input[3] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - process.out.cram, - process.out.csi, - process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), - bam(process.out.bam[0][1]).getReadsMD5() - ).match() - } - ) - } - - } - - test("Paired-End Sort") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) - ] - ] - input[1] = BWA_INDEX.out.index - input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - input[3] = true - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - process.out.cram, - process.out.csi, - process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), - bam(process.out.bam[0][1]).getReadsMD5() - ).match() - } - ) - } - - } - - test("Paired-End - no fasta") { - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) - ] - ] - input[1] = BWA_INDEX.out.index - input[2] = [[:],[]] - input[3] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot( - process.out.cram, - process.out.csi, - process.out.crai, - process.out.versions, - bam(process.out.bam[0][1]).getHeaderMD5(), - bam(process.out.bam[0][1]).getReadsMD5() - ).match() - } - ) - } - - } - - test("Single-end - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:true ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) - ] - ] - input[1] = BWA_INDEX.out.index - input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - input[3] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } - - test("Paired-end - stub") { - - options "-stub" - - when { - process { - """ - input[0] = [ - [ id:'test', single_end:false ], // meta map - [ - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) - ] - ] - input[1] = BWA_INDEX.out.index - input[2] = [[id: 'test'],file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)] - input[3] = false - """ - } - } - - then { - assertAll( - { assert process.success }, - { assert snapshot(process.out).match() } - ) - } - } -} \ No newline at end of file diff --git a/modules/gallvp/bwa/mem/tests/main.nf.test.snap b/modules/gallvp/bwa/mem/tests/main.nf.test.snap deleted file mode 100644 index 3aaefdd..0000000 --- a/modules/gallvp/bwa/mem/tests/main.nf.test.snap +++ /dev/null @@ -1,271 +0,0 @@ -{ - "Single-End": { - "content": [ - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ], - "53df0e7b72f1f85fb28af5fec435246", - "798439cbd7fd81cbcc5078022dc5479d" - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-27T08:36:00.831642964" - }, - "Single-End Sort": { - "content": [ - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ], - "5eca502b75fefc26e8000908bf0bb3a3", - "94fcf617f5b994584c4e8d4044e16b4f" - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-27T08:36:16.025706238" - }, - "Paired-End": { - "content": [ - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ], - "fec2aafbba4637767bc4e202c71aee58", - "57aeef88ed701a8ebc8e2f0a381b2a6" - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-27T08:36:27.309924644" - }, - "Paired-End Sort": { - "content": [ - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ], - "d5ad8844218280969c1f9349bd62d057", - "af8628d9df18b2d3d4f6fd47ef2bb872" - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-27T08:36:45.448624985" - }, - "Single-end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - - ], - "2": [ - [ - { - "id": "test", - "single_end": true - }, - "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": true - }, - "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ], - "bam": [ - [ - { - "id": "test", - "single_end": true - }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "crai": [ - [ - { - "id": "test", - "single_end": true - }, - "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "cram": [ - - ], - "csi": [ - [ - { - "id": "test", - "single_end": true - }, - "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-27T08:37:16.211123969" - }, - "Paired-End - no fasta": { - "content": [ - [ - - ], - [ - - ], - [ - - ], - [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ], - "fec2aafbba4637767bc4e202c71aee58", - "57aeef88ed701a8ebc8e2f0a381b2a6" - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-27T08:36:56.592159657" - }, - "Paired-end - stub": { - "content": [ - { - "0": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "1": [ - - ], - "2": [ - [ - { - "id": "test", - "single_end": false - }, - "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "3": [ - [ - { - "id": "test", - "single_end": false - }, - "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "4": [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ], - "bam": [ - [ - { - "id": "test", - "single_end": false - }, - "test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "crai": [ - [ - { - "id": "test", - "single_end": false - }, - "test.crai:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "cram": [ - - ], - "csi": [ - [ - { - "id": "test", - "single_end": false - }, - "test.csi:md5,d41d8cd98f00b204e9800998ecf8427e" - ] - ], - "versions": [ - "versions.yml:md5,c60680eba0f00e791c0d5a0a6e9d665f" - ] - } - ], - "meta": { - "nf-test": "0.9.2", - "nextflow": "24.10.5" - }, - "timestamp": "2025-03-27T08:37:32.177177506" - } -} \ No newline at end of file diff --git a/modules/gallvp/bwa/mem/tests/tags.yml b/modules/gallvp/bwa/mem/tests/tags.yml deleted file mode 100644 index 82992d1..0000000 --- a/modules/gallvp/bwa/mem/tests/tags.yml +++ /dev/null @@ -1,3 +0,0 @@ -bwa/mem: - - modules/nf-core/bwa/index/** - - modules/nf-core/bwa/mem/** diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json index 1c55c2e..7a5d640 100644 --- a/ro-crate-metadata.json +++ b/ro-crate-metadata.json @@ -23,7 +23,7 @@ "@type": "Dataset", "creativeWorkStatus": "Stable", "datePublished": "2025-10-12T21:50:53+00:00", - "description": "# plant-food-research-open/assemblyqc\n\n[![GitHub Actions CI Status](https://github.com/plant-food-research-open/assemblyqc/actions/workflows/nf-test.yml/badge.svg)](https://github.com/plant-food-research-open/assemblyqc/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/plant-food-research-open/assemblyqc/actions/workflows/linting.yml/badge.svg)](https://github.com/plant-food-research-open/assemblyqc/actions/workflows/linting.yml)\n[![Cite Article](http://img.shields.io/badge/DOI-10.1093/bioinformatics/btae477-1073c8?labelColor=000000)](https://doi.org/10.1093/bioinformatics/btae477)\n\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.3.2-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.3.2)\n\n[![run with conda \u274c](http://img.shields.io/badge/run%20with-conda%20\u274c-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/plant-food-research-open/assemblyqc)\n\n## Introduction\n\n**plant-food-research-open/assemblyqc** is a [Nextflow](https://www.nextflow.io/docs/latest/index.html) pipeline which evaluates assembly quality with multiple QC tools and presents the results in a unified html report. The tools are shown in the [Pipeline Flowchart](#pipeline-flowchart) and their references are listed in [CITATIONS.md](./CITATIONS.md). The pipeline includes skip flags to disable execution of various tools.\n\n## Pipeline Flowchart\n\n

\n\n- `Assembly`\n - [fa-lint](https://github.com/GallVp/fa-lint) + [SeqKit rmdup](https://github.com/shenwei356/seqkit): FASTA validation\n - [assemblathon_stats](https://github.com/PlantandFoodResearch/assemblathon2-analysis/blob/a93cba25d847434f7eadc04e63b58c567c46a56d/assemblathon_stats.pl), [gfastats](https://github.com/vgl-hub/gfastats): Assembly statistics\n - [NCBI FCS-adaptor](https://github.com/ncbi/fcs): Adaptor contamination pass/fail\n - [NCBI FCS-GX](https://github.com/ncbi/fcs): Foreign organism contamination pass/fail\n - [tidk](https://github.com/tolkit/telomeric-identifier): Telomere repeat identification\n - [BUSCO](https://gitlab.com/ezlab/busco): Gene-space completeness estimation\n - [LAI](https://github.com/oushujun/LTR_retriever/blob/master/LAI): Continuity of repetitive sequences\n - [Kraken 2](https://github.com/DerrickWood/kraken2), [Krona](https://github.com/marbl/Krona): Taxonomy classification\n - `Alignment and visualisation of HiC data`\n - [sra-tools](https://github.com/ncbi/sra-tools): HiC data download from SRA or use of local FASTQ files\n - [fastp](https://github.com/OpenGene/fastp), [FastQC](https://github.com/s-andrews/FastQC): Read QC and trimming\n - [SeqKit sort](https://github.com/shenwei356/seqkit): Alphanumeric sorting of FASTA by sequence ID\n - [HapHiC refsort](https://github.com/zengxiaofei/HapHiC): Reference-based sorting of FASTA\n - [bwa-mem](https://github.com/lh3/bwa): HiC read alignment\n - [samblaster](https://github.com/GregoryFaust/samblaster): Duplicate marking\n - [hic_qc](https://github.com/phasegenomics/hic_qc): HiC read and alignment statistics\n - [YaHS juicer pre](https://github.com/c-zhou/yahs): BAM to juicer conversion\n - [hictk load/zoomify](https://github.com/paulsengroup/hictk): `.hic` file creation\n - [juicebox.js](https://github.com/igvteam/juicebox.js): HiC contact map visualisation\n - `K-mer completeness, consensus quality and phasing assessment`\n - [sra-tools](https://github.com/ncbi/sra-tools): Assembly, maternal and paternal data download from SRA or use of local FASTQ files\n - [Merqury hapmers](https://github.com/marbl/merqury/blob/master/trio/hapmers.sh): Hapmer generation if parental data is available\n - [Merqury](https://github.com/marbl/merqury): Completeness, consensus quality and phasing assessment\n - `Synteny analysis`\n - [MUMmer](https://github.com/mummer4/mummer) \u2192 [Circos](http://circos.ca/documentation/) + [dotplot](https://plotly.com): One-to-all and all-to-all synteny analysis at the contig level\n - [Minimap2](https://github.com/lh3/minimap2) \u2192 [Syri](https://github.com/schneebergerlab/syri)/[Plotsr](https://github.com/schneebergerlab/plotsr): One-to-one synteny analysis at the chromosome level\n - `Mapback profile from alignment of long-read data, GC content and variant detection`\n - [Winnowmap](https://github.com/marbl/Winnowmap): Align long-read data\n - [paftools sam2paf](https://github.com/lh3/minimap2): Convert SAM to PAF\n - [T2T-Polish pafToCovClippedWig](https://github.com/arangrhie/T2T-Polish): Convert PAF to coverage Wig\n - [bedtools nuc](https://bedtools.readthedocs.io/en/latest/): Compute GC content\n - [Clair3](https://github.com/HKU-BAL/Clair3): Variant detection\n- `Annotation`\n - [GenomeTools gt gff3validator](https://genometools.org/tools/gt_gff3validator.html) + [FASTA/GFF correspondence](subworkflows/gallvp/gff3_gt_gff3_gff3validator_stat/main.nf): GFF3 validation\n - [GenomeTools gt stat](https://genometools.org/tools/gt_stat.html): Annotation statistics\n - [GffRead](https://github.com/gpertea/gffread), [BUSCO](https://gitlab.com/ezlab/busco): Gene-space completeness estimation in annotation proteins\n - [OrthoFinder](https://github.com/davidemms/OrthoFinder): Phylogenetic orthology inference for comparative genomics\n\n## Usage\n\nRefer to [usage](./docs/usage.md), [parameters](./docs/parameters.md) and [output](./docs/output.md) documents for details.\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nPrepare an `assemblysheet.csv` file with following columns representing target assemblies and associated meta-data.\n\n- `tag:` A unique tag which represents the target assembly throughout the pipeline and in the final report\n- `fasta:` FASTA file\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run plant-food-research-open/assemblyqc \\\n -revision \\\n -profile \\\n --input assemblysheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\n### Plant&Food Users\n\nDownload the pipeline to your `/workspace/$USER` folder. Change the parameters defined in the [pfr/params.json](./pfr/params.json) file. Submit the pipeline to SLURM for execution.\n\n```bash\nsbatch ./pfr_assemblyqc\n```\n\n## Credits\n\nplant-food-research-open/assemblyqc was originally written by Usman Rashid ([@gallvp](https://github.com/gallvp)) and Ken Smith ([@hzlnutspread](https://github.com/hzlnutspread)).\n\nRoss Crowhurst ([@rosscrowhurst](https://github.com/rosscrowhurst)), Chen Wu ([@christinawu2008](https://github.com/christinawu2008)) and Marcus Davy ([@mdavy86](https://github.com/mdavy86)) generously contributed their QC scripts.\n\nMahesh Binzer-Panchal ([@mahesh-panchal](https://github.com/mahesh-panchal)) and Simon Pearce ([@SPPearce](https://github.com/SPPearce)) helped port the pipeline modules and sub-workflows to [nf-core](https://nf-co.re) schema.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- [Cecilia Deng](https://github.com/CeciliaDeng)\n- [Ignacio Carvajal](https://github.com/ignacio3437)\n- [Jason Shiller](https://github.com/jasonshiller)\n- [Sarah Bailey](https://github.com/SarahBailey1998)\n- [Susan Thomson](https://github.com/cflsjt)\n- [Ting-Hsuan Chen](https://github.com/ting-hsuan-chen)\n\nThe pipeline uses nf-core modules contributed by following authors:\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Citations\n\nIf you use plant-food-research-open/assemblyqc for your analysis, please cite it as:\n\n> **AssemblyQC: A Nextflow pipeline for reproducible reporting of assembly quality.**\n>\n> Usman Rashid, Chen Wu, Jason Shiller, Ken Smith, Ross Crowhurst, Marcus Davy, Ting-Hsuan Chen, Ignacio Carvajal, Sarah Bailey, Susan Thomson & Cecilia H Deng.\n>\n> _Bioinformatics_. 2024 July 30. doi: [10.1093/bioinformatics/btae477](https://doi.org/10.1093/bioinformatics/btae477).\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/main/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", + "description": "# plant-food-research-open/assemblyqc\n\n[![GitHub Actions CI Status](https://github.com/plant-food-research-open/assemblyqc/actions/workflows/nf-test.yml/badge.svg)](https://github.com/plant-food-research-open/assemblyqc/actions/workflows/nf-test.yml)\n[![GitHub Actions Linting Status](https://github.com/plant-food-research-open/assemblyqc/actions/workflows/linting.yml/badge.svg)](https://github.com/plant-food-research-open/assemblyqc/actions/workflows/linting.yml)\n[![Cite Article](http://img.shields.io/badge/DOI-10.1093/bioinformatics/btae477-1073c8?labelColor=000000)](https://doi.org/10.1093/bioinformatics/btae477)\n\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.10.5-green?style=flat&logo=nextflow&logoColor=white&color=%230DC09D&link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.3.2-green?style=flat&logo=nfcore&logoColor=white&color=%2324B064&link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.3.2)\n\n[![run with conda \u274c](http://img.shields.io/badge/run%20with-conda%20\u274c-3EB049?labelColor=000000&logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000&logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/plant-food-research-open/assemblyqc)\n\n## Introduction\n\n**plant-food-research-open/assemblyqc** is a [Nextflow](https://www.nextflow.io/docs/latest/index.html) pipeline which evaluates assembly quality with multiple QC tools and presents the results in a unified html report. The tools are shown in the [Pipeline Flowchart](#pipeline-flowchart) and their references are listed in [CITATIONS.md](./CITATIONS.md). The pipeline includes skip flags to disable execution of various tools.\n\n## Pipeline Flowchart\n\n

\n\n- `Assembly`\n - [fa-lint](https://github.com/GallVp/fa-lint) + [SeqKit rmdup](https://github.com/shenwei356/seqkit): FASTA validation\n - [assemblathon_stats](https://github.com/PlantandFoodResearch/assemblathon2-analysis/blob/a93cba25d847434f7eadc04e63b58c567c46a56d/assemblathon_stats.pl), [gfastats](https://github.com/vgl-hub/gfastats): Assembly statistics\n - [NCBI FCS-adaptor](https://github.com/ncbi/fcs): Adaptor contamination pass/fail\n - [NCBI FCS-GX](https://github.com/ncbi/fcs): Foreign organism contamination pass/fail\n - [tidk](https://github.com/tolkit/telomeric-identifier): Telomere repeat identification\n - [BUSCO](https://gitlab.com/ezlab/busco): Gene-space completeness estimation\n - [LAI](https://github.com/oushujun/LTR_retriever/blob/master/LAI): Continuity of repetitive sequences\n - [Kraken 2](https://github.com/DerrickWood/kraken2), [Krona](https://github.com/marbl/Krona): Taxonomy classification\n - `Alignment and visualisation of HiC data`\n - [sra-tools](https://github.com/ncbi/sra-tools): HiC data download from SRA or use of local FASTQ files\n - [fastp](https://github.com/OpenGene/fastp), [FastQC](https://github.com/s-andrews/FastQC): Read QC and trimming\n - [SeqKit sort](https://github.com/shenwei356/seqkit): Alphanumeric sorting of FASTA by sequence ID\n - [HapHiC refsort](https://github.com/zengxiaofei/HapHiC): Reference-based sorting of FASTA\n - [minibwa](https://github.com/lh3/minibwa): HiC read alignment\n - [samblaster](https://github.com/GregoryFaust/samblaster): Duplicate marking\n - [hic_qc](https://github.com/phasegenomics/hic_qc): HiC read and alignment statistics\n - [YaHS juicer pre](https://github.com/c-zhou/yahs): BAM to juicer conversion\n - [hictk load/zoomify](https://github.com/paulsengroup/hictk): `.hic` file creation\n - [juicebox.js](https://github.com/igvteam/juicebox.js): HiC contact map visualisation\n - `K-mer completeness, consensus quality and phasing assessment`\n - [sra-tools](https://github.com/ncbi/sra-tools): Assembly, maternal and paternal data download from SRA or use of local FASTQ files\n - [Merqury hapmers](https://github.com/marbl/merqury/blob/master/trio/hapmers.sh): Hapmer generation if parental data is available\n - [Merqury](https://github.com/marbl/merqury): Completeness, consensus quality and phasing assessment\n - `Synteny analysis`\n - [MUMmer](https://github.com/mummer4/mummer) \u2192 [Circos](http://circos.ca/documentation/) + [dotplot](https://plotly.com): One-to-all and all-to-all synteny analysis at the contig level\n - [Minimap2](https://github.com/lh3/minimap2) \u2192 [Syri](https://github.com/schneebergerlab/syri)/[Plotsr](https://github.com/schneebergerlab/plotsr): One-to-one synteny analysis at the chromosome level\n - `Mapback profile from alignment of long-read data, GC content and variant detection`\n - [Winnowmap](https://github.com/marbl/Winnowmap): Align long-read data\n - [paftools sam2paf](https://github.com/lh3/minimap2): Convert SAM to PAF\n - [T2T-Polish pafToCovClippedWig](https://github.com/arangrhie/T2T-Polish): Convert PAF to coverage Wig\n - [bedtools nuc](https://bedtools.readthedocs.io/en/latest/): Compute GC content\n - [Clair3](https://github.com/HKU-BAL/Clair3): Variant detection\n- `Annotation`\n - [GenomeTools gt gff3validator](https://genometools.org/tools/gt_gff3validator.html) + [FASTA/GFF correspondence](subworkflows/gallvp/gff3_gt_gff3_gff3validator_stat/main.nf): GFF3 validation\n - [GenomeTools gt stat](https://genometools.org/tools/gt_stat.html): Annotation statistics\n - [GffRead](https://github.com/gpertea/gffread), [BUSCO](https://gitlab.com/ezlab/busco): Gene-space completeness estimation in annotation proteins\n - [OrthoFinder](https://github.com/davidemms/OrthoFinder): Phylogenetic orthology inference for comparative genomics\n\n## Usage\n\nRefer to [usage](./docs/usage.md), [parameters](./docs/parameters.md) and [output](./docs/output.md) documents for details.\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nPrepare an `assemblysheet.csv` file with following columns representing target assemblies and associated meta-data.\n\n- `tag:` A unique tag which represents the target assembly throughout the pipeline and in the final report\n- `fasta:` FASTA file\n\nNow, you can run the pipeline using:\n\n```bash\nnextflow run plant-food-research-open/assemblyqc \\\n -revision \\\n -profile \\\n --input assemblysheet.csv \\\n --outdir \n```\n\n> [!WARNING]\n> Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_; see [docs](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\n### Plant&Food Users\n\nDownload the pipeline to your `/workspace/$USER` folder. Change the parameters defined in the [pfr/params.json](./pfr/params.json) file. Submit the pipeline to SLURM for execution.\n\n```bash\nsbatch ./pfr_assemblyqc\n```\n\n## Credits\n\nplant-food-research-open/assemblyqc was originally written by Usman Rashid ([@gallvp](https://github.com/gallvp)) and Ken Smith ([@hzlnutspread](https://github.com/hzlnutspread)).\n\nRoss Crowhurst ([@rosscrowhurst](https://github.com/rosscrowhurst)), Chen Wu ([@christinawu2008](https://github.com/christinawu2008)) and Marcus Davy ([@mdavy86](https://github.com/mdavy86)) generously contributed their QC scripts.\n\nMahesh Binzer-Panchal ([@mahesh-panchal](https://github.com/mahesh-panchal)) and Simon Pearce ([@SPPearce](https://github.com/SPPearce)) helped port the pipeline modules and sub-workflows to [nf-core](https://nf-co.re) schema.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- [Cecilia Deng](https://github.com/CeciliaDeng)\n- [Ignacio Carvajal](https://github.com/ignacio3437)\n- [Jason Shiller](https://github.com/jasonshiller)\n- [Sarah Bailey](https://github.com/SarahBailey1998)\n- [Susan Thomson](https://github.com/cflsjt)\n- [Ting-Hsuan Chen](https://github.com/ting-hsuan-chen)\n\nThe pipeline uses nf-core modules contributed by following authors:\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Citations\n\nIf you use plant-food-research-open/assemblyqc for your analysis, please cite it as:\n\n> **AssemblyQC: A Nextflow pipeline for reproducible reporting of assembly quality.**\n>\n> Usman Rashid, Chen Wu, Jason Shiller, Ken Smith, Ross Crowhurst, Marcus Davy, Ting-Hsuan Chen, Ignacio Carvajal, Sarah Bailey, Susan Thomson & Cecilia H Deng.\n>\n> _Bioinformatics_. 2024 July 30. doi: [10.1093/bioinformatics/btae477](https://doi.org/10.1093/bioinformatics/btae477).\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/main/LICENSE).\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n", "hasPart": [ { "@id": "main.nf" From 63c9691ce51dd7ae605ac413f998ee1663181b5e Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Tue, 21 Jul 2026 10:52:41 +1200 Subject: [PATCH 06/12] versions fix --- subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf | 1 - 1 file changed, 1 deletion(-) diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf index 85a290a..c4c5826 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf @@ -49,7 +49,6 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { ch_mem_bam = MINIBWA_MAP.out.aligned ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_minibwa.first()) - ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_samtools.first()) // MODULE: SAMBLASTER SAMBLASTER ( ch_mem_bam ) From 2d1fd8f9c93423e443f2991deb46290ba1dede1c Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Tue, 21 Jul 2026 11:09:21 +1200 Subject: [PATCH 07/12] versions fix --- .../gallvp/fastq_bwa_mem_samblaster/main.nf | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf index c4c5826..59a850f 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf @@ -1,13 +1,9 @@ -include { MINIBWA_INDEX } from '../../../modules/nf-core/minibwa/index/main' -include { MINIBWA_MAP } from '../../../modules/nf-core/minibwa/map/main' -include { SAMBLASTER } from '../../../modules/gallvp/samblaster/main' - workflow FASTQ_BWA_MEM_SAMBLASTER { take: - ch_fastq // channel: [ val(meta), [ fq ] ] - ch_reference // channel: [ val(meta2), fasta, index ]; fasta | index - val_sort_bam // boolean: true|false + ch_fastq + ch_reference + val_sort_bam main: ch_versions = Channel.empty() @@ -24,18 +20,13 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { ch_bwa_index = MINIBWA_INDEX.out.index | mix( ch_has_index.yes - | map { meta2, _fasta, index -> - [ meta2, index ] - } + | map { meta2, _fasta, index -> [ meta2, index ] } ) - ch_versions = ch_versions.mix(MINIBWA_INDEX.out.versions_minibwa.first()) // MODULE: MINIBWA_MAP ch_mem_inputs = ch_fastq - | combine( - ch_bwa_index - ) + | combine(ch_bwa_index) | map { meta, fq, meta2, index -> [ meta + [ ref_id: meta2.id ], fq, index ] } @@ -48,14 +39,12 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { ) ch_mem_bam = MINIBWA_MAP.out.aligned - ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_minibwa.first()) - - // MODULE: SAMBLASTER - SAMBLASTER ( ch_mem_bam ) + // MODULE: SAMBLASTER + SAMBLASTER ( ch_mem_bam ) ch_versions = ch_versions.mix(SAMBLASTER.out.versions.first()) emit: - bam = SAMBLASTER.out.bam // channel: [ val(meta), bam ] - versions = ch_versions // channel: [ versions.yml ] -} + bam = SAMBLASTER.out.bam + versions = ch_versions // channel: [ versions.yml ] — old-style only, from SAMBLASTER +} \ No newline at end of file From 36fb251ad6bf1eb25dff82c8d9e2d7018f1fe5a3 Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Tue, 21 Jul 2026 11:58:32 +1200 Subject: [PATCH 08/12] restore --- subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf index 59a850f..c425a37 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf @@ -39,6 +39,14 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { ) ch_mem_bam = MINIBWA_MAP.out.aligned +<<<<<<< HEAD +======= + ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_minibwa.first()) + ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_samtools.first()) + + // MODULE: SAMBLASTER + SAMBLASTER ( ch_mem_bam ) +>>>>>>> parent of 63c9691 (versions fix) // MODULE: SAMBLASTER SAMBLASTER ( ch_mem_bam ) From 8df1ae1b489d6123d650125108b83513ff23e775 Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Tue, 21 Jul 2026 12:03:45 +1200 Subject: [PATCH 09/12] revert --- .../gallvp/fastq_bwa_mem_samblaster/main.nf | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf index c425a37..c4c5826 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf @@ -1,9 +1,13 @@ +include { MINIBWA_INDEX } from '../../../modules/nf-core/minibwa/index/main' +include { MINIBWA_MAP } from '../../../modules/nf-core/minibwa/map/main' +include { SAMBLASTER } from '../../../modules/gallvp/samblaster/main' + workflow FASTQ_BWA_MEM_SAMBLASTER { take: - ch_fastq - ch_reference - val_sort_bam + ch_fastq // channel: [ val(meta), [ fq ] ] + ch_reference // channel: [ val(meta2), fasta, index ]; fasta | index + val_sort_bam // boolean: true|false main: ch_versions = Channel.empty() @@ -20,13 +24,18 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { ch_bwa_index = MINIBWA_INDEX.out.index | mix( ch_has_index.yes - | map { meta2, _fasta, index -> [ meta2, index ] } + | map { meta2, _fasta, index -> + [ meta2, index ] + } ) + ch_versions = ch_versions.mix(MINIBWA_INDEX.out.versions_minibwa.first()) // MODULE: MINIBWA_MAP ch_mem_inputs = ch_fastq - | combine(ch_bwa_index) + | combine( + ch_bwa_index + ) | map { meta, fq, meta2, index -> [ meta + [ ref_id: meta2.id ], fq, index ] } @@ -39,20 +48,14 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { ) ch_mem_bam = MINIBWA_MAP.out.aligned -<<<<<<< HEAD -======= ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_minibwa.first()) - ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_samtools.first()) // MODULE: SAMBLASTER SAMBLASTER ( ch_mem_bam ) ->>>>>>> parent of 63c9691 (versions fix) - // MODULE: SAMBLASTER - SAMBLASTER ( ch_mem_bam ) ch_versions = ch_versions.mix(SAMBLASTER.out.versions.first()) emit: - bam = SAMBLASTER.out.bam - versions = ch_versions // channel: [ versions.yml ] — old-style only, from SAMBLASTER -} \ No newline at end of file + bam = SAMBLASTER.out.bam // channel: [ val(meta), bam ] + versions = ch_versions // channel: [ versions.yml ] +} From 06cb8c2b1ef23d1cc84dd7eac2483295a93ecbda Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Tue, 21 Jul 2026 12:05:57 +1200 Subject: [PATCH 10/12] version fix --- subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf index c4c5826..31ff1a0 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf @@ -29,7 +29,7 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { } ) - ch_versions = ch_versions.mix(MINIBWA_INDEX.out.versions_minibwa.first()) + // ch_versions = ch_versions.mix(MINIBWA_INDEX.out.versions_minibwa.first()) // MODULE: MINIBWA_MAP ch_mem_inputs = ch_fastq @@ -48,7 +48,7 @@ workflow FASTQ_BWA_MEM_SAMBLASTER { ) ch_mem_bam = MINIBWA_MAP.out.aligned - ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_minibwa.first()) + // ch_versions = ch_versions.mix(MINIBWA_MAP.out.versions_minibwa.first()) // MODULE: SAMBLASTER SAMBLASTER ( ch_mem_bam ) From 6d9fcd17abc5d8ffe250bd69f633055e3502a2f9 Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Tue, 21 Jul 2026 12:16:31 +1200 Subject: [PATCH 11/12] fix installed by --- modules.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.json b/modules.json index 8608865..092c9e5 100644 --- a/modules.json +++ b/modules.json @@ -306,12 +306,12 @@ "minibwa/index": { "branch": "master", "git_sha": "838d07c09dfac095defc7b39c6b56ca9741ee517", - "installed_by": ["fastq_bwa_mem_samblaster"] + "installed_by": ["modules"] }, "minibwa/map": { "branch": "master", "git_sha": "838d07c09dfac095defc7b39c6b56ca9741ee517", - "installed_by": ["fastq_bwa_mem_samblaster"] + "installed_by": ["modules"] }, "minimap2/align": { "branch": "master", From 3b871bd159b254c99951786bf9dd8c52ce799bb1 Mon Sep 17 00:00:00 2001 From: igncio3437 Date: Tue, 21 Jul 2026 14:56:38 +1200 Subject: [PATCH 12/12] update configs to MINIBWA_MAP --- conf/base.config | 2 +- conf/modules.config | 2 +- .../gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/base.config b/conf/base.config index 3f38870..a6cc9b0 100644 --- a/conf/base.config +++ b/conf/base.config @@ -63,7 +63,7 @@ process { withName:KRAKEN2 { memory = { 256.GB * task.attempt } } - withName:BWA_MEM { + withName:MINIBWA_MAP { time = { 2.day * task.attempt } } withName:SAMBLASTER { diff --git a/conf/modules.config b/conf/modules.config index a89229e..4085918 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -355,7 +355,7 @@ process { ext.prefix = { "${meta.id}.refsort" } } - withName: '.*:FQ2HIC:FASTQ_BWA_MEM_SAMBLASTER:BWA_MEM' { + withName: '.*:FQ2HIC:FASTQ_BWA_MEM_SAMBLASTER:MINIBWA_MAP' { ext.prefix = { "${meta.id}.on.${meta.ref_id}.bwa.mem" } ext.args = '--hic' ext.args2 = '-n' diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config b/subworkflows/gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config index c311790..2ab0a8e 100644 --- a/subworkflows/gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config +++ b/subworkflows/gallvp/fastq_bwa_mem_samblaster/tests/nextflow.config @@ -1,5 +1,5 @@ process { - withName: BWA_MEM { + withName: MINIBWA_MAP { ext.prefix = { "${meta.id}.on.${meta.ref_id}.bwa.mem" } ext.args = '--hic' ext.args2 = '-n'