diff --git a/conf/base.config b/conf/base.config index 9b053121..6f806413 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 e5eb9d67..40859184 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -355,9 +355,9 @@ 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 = '-5SP' + ext.args = '--hic' ext.args2 = '-n' } diff --git a/modules.json b/modules.json index e48a29d7..f1bc8639 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", @@ -313,6 +303,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/gallvp/bwa/index/main.nf b/modules/gallvp/bwa/index/main.nf deleted file mode 100644 index 72e078aa..00000000 --- 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 1781586f..00000000 --- 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 ec244994..00000000 --- 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 7c8f0465..00000000 --- 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 28bb483c..00000000 --- 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 f4c4109d..00000000 --- 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 3c544178..00000000 --- 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 e1265ab7..00000000 --- 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 b6e3c8b3..00000000 --- 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 3aaefdda..00000000 --- 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 82992d1f..00000000 --- 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/modules/gallvp/haphic/refsort/main.nf b/modules/gallvp/haphic/refsort/main.nf index 7f290465..20f612a2 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) diff --git a/modules/gallvp/bwa/index/environment.yml b/modules/nf-core/minibwa/index/environment.yml similarity index 57% rename from modules/gallvp/bwa/index/environment.yml rename to modules/nf-core/minibwa/index/environment.yml index f4c4109d..f6d4afd1 100644 --- a/modules/gallvp/bwa/index/environment.yml +++ b/modules/nf-core/minibwa/index/environment.yml @@ -3,9 +3,6 @@ channels: - conda-forge - bioconda - dependencies: - # renovate: datasource=conda depName=bioconda/bwa - - bioconda::bwa=0.7.18 - - bioconda::htslib=1.21 - - bioconda::samtools=1.21 + # 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 00000000..b5e0ef8e --- /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 00000000..5e07d116 --- /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 00000000..ca214a95 --- /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 00000000..c47e9f33 --- /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 00000000..8fce89ee --- /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 00000000..2d34b5f8 --- /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 00000000..e7a20cd4 --- /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 00000000..8abb8fcc --- /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 00000000..4847c06a --- /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 diff --git a/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf b/subworkflows/gallvp/fastq_bwa_mem_samblaster/main.nf index a3849ff8..31ff1a01 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 { 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,16 @@ 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()) + // 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 75830347..2ab0a8e5 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 { + withName: MINIBWA_MAP { ext.prefix = { "${meta.id}.on.${meta.ref_id}.bwa.mem" } - ext.args = '-5SP' + ext.args = '--hic' ext.args2 = '-n' }