diff --git a/subworkflows/nf-core/fasta_index_dna/main.nf b/subworkflows/nf-core/fasta_index_dna/main.nf index 3274f8aa7a85..1334cb0fc9bc 100644 --- a/subworkflows/nf-core/fasta_index_dna/main.nf +++ b/subworkflows/nf-core/fasta_index_dna/main.nf @@ -22,50 +22,41 @@ workflow FASTA_INDEX_DNA { ch_aligner_index = Channel.empty() ch_versions = Channel.empty() - switch (val_aligner) { - case 'bowtie2': - BOWTIE2_BUILD(ch_fasta ) // if aligner is bowtie2 - ch_aligner_index = ch_aligner_index.mix(BOWTIE2_BUILD.out.index) - ch_versions = ch_versions.mix(BOWTIE2_BUILD.out.versions) - break - case 'bwamem': - BWAMEM1_INDEX(ch_fasta) // If aligner is bwa-mem - ch_aligner_index = ch_aligner_index - .mix( - BWAMEM1_INDEX.out.index - .join(ch_altliftover) - .map{meta, index, alt -> [meta, index + alt]} - ) + // Handle different aligners using conditional logic + if (val_aligner == 'bowtie2') { + BOWTIE2_BUILD(ch_fasta) + ch_aligner_index = BOWTIE2_BUILD.out.index + ch_versions = BOWTIE2_BUILD.out.versions + } else if (val_aligner == 'bwamem') { + BWAMEM1_INDEX(ch_fasta) - ch_versions = ch_versions.mix(BWAMEM1_INDEX.out.versions) - break - case 'bwamem2': - BWAMEM2_INDEX(ch_fasta) // If aligner is bwa-mem2 - ch_aligner_index = ch_aligner_index - .mix( - BWAMEM2_INDEX.out.index - .join(ch_altliftover) - .map{meta, index, alt -> [meta, index + alt]} - ) + // returning the alt file next to the index, not inside the folder + ch_aligner_index = BWAMEM1_INDEX.out.index + .join(ch_altliftover) + .map { meta, index, alt -> [meta, [index, alt] ] } + ch_versions = BWAMEM1_INDEX.out.versions + } else if (val_aligner == 'bwamem2') { + BWAMEM2_INDEX(ch_fasta) + // returning the alt file next to the index, not inside the folder + ch_aligner_index = BWAMEM2_INDEX.out.index + .join(ch_altliftover) + .map { meta, index, alt -> [meta, [index, alt] ] } - ch_versions = ch_versions.mix(BWAMEM2_INDEX.out.versions) - break - case 'dragmap': - DRAGMAP_HASHTABLE(ch_fasta) // If aligner is dragmap - ch_aligner_index = ch_aligner_index.mix(DRAGMAP_HASHTABLE.out.hashmap) - ch_versions = ch_versions.mix(DRAGMAP_HASHTABLE.out.versions) - break - case 'snap': - ch_snap_reference = ch_fasta - .join(ch_altliftover) - .map {meta, fasta, alt -> [meta, fasta, [], [], alt]} + ch_versions = BWAMEM2_INDEX.out.versions + } else if (val_aligner == 'dragmap') { + DRAGMAP_HASHTABLE(ch_fasta) + ch_aligner_index = DRAGMAP_HASHTABLE.out.hashmap + ch_versions = DRAGMAP_HASHTABLE.out.versions + } else if (val_aligner == 'snap') { + ch_snap_reference = ch_fasta + .join(ch_altliftover) + .map { meta, fasta_, alt -> [meta, fasta_, [], [], alt] } - SNAP_INDEX(ch_snap_reference) // If aligner is snap - ch_aligner_index = ch_aligner_index.mix(SNAP_INDEX.out.index) - ch_versions = ch_versions.mix(SNAP_INDEX.out.versions) - break - default: - error "Unknown aligner: ${val_aligner}" + SNAP_INDEX(ch_snap_reference) + ch_aligner_index = SNAP_INDEX.out.index + ch_versions = SNAP_INDEX.out.versions + } else { + error "Unknown aligner: ${val_aligner}" } emit: diff --git a/subworkflows/nf-core/fasta_index_dna/tests/main.nf.test b/subworkflows/nf-core/fasta_index_dna/tests/main.nf.test new file mode 100644 index 000000000000..e57bb8336ae9 --- /dev/null +++ b/subworkflows/nf-core/fasta_index_dna/tests/main.nf.test @@ -0,0 +1,289 @@ +nextflow_workflow { + + name "Test Subworkflow FASTA_INDEX_DNA" + script "../main.nf" + workflow "FASTA_INDEX_DNA" + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fasta_index_dna" + tag "bowtie2/build" + tag "bwa/index" + tag "bwamem2/index" + tag "dragmap/hashtable" + tag "snapaligner/index" + + test("Params: bowtie2 | generate bowtie2 index") { + + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'bowtie2' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + test("Params: bwamem | generate bwamem1 index") { + + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'bwamem' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + test("Params: bwamem2 | generate bwamem2 index") { + + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'bwamem2' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + test("Params: dragmap | generate dragmap hashtable") { + + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'dragmap' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out.index[1].collect { file(it).name }.toSorted(), + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + test("Params: snapaligner | generate snapaligner index") { + + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'snap' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out.index[0][1].collect { file(it).name }.toSorted(), + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + + + test("Params: bowtie2 | generate bowtie2 index - stub") { + options '-stub' + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'bowtie2' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + test("Params: bwamem | generate bwamem1 index - stub") { + options '-stub' + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'bwamem' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + test("Params: bwamem2 | generate bwamem2 index - stub") { + options '-stub' + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'bwamem2' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + test("Params: dragmap | generate dragmap hashtable - stub") { + options '-stub' + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'dragmap' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + test("Params: snapaligner | generate snapaligner index - stub") { + options '-stub' + when { + workflow { + """ + input[0] = Channel.value([ + [id:'test'], + file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), + ]) + input[1] = Channel.value([ + [id:'test'], + [] + ]) + input[2] = 'snap' + """ + } + } + then { + assert workflow.success + assertAll( + { assert snapshot( + workflow.out, + workflow.out.versions.collect{ path(it).yaml } + ).match() } + ) + } + } + +} \ No newline at end of file diff --git a/subworkflows/nf-core/fasta_index_dna/tests/main.nf.test.snap b/subworkflows/nf-core/fasta_index_dna/tests/main.nf.test.snap new file mode 100644 index 000000000000..a2aab0eee52a --- /dev/null +++ b/subworkflows/nf-core/fasta_index_dna/tests/main.nf.test.snap @@ -0,0 +1,493 @@ +{ + "Params: bwamem2 | generate bwamem2 index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + [ + "genome.fasta.0123:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.bwt.2bit.64:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.pac:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + + ] + ] + ] + ], + "1": [ + "versions.yml:md5,7ba3169cff18b2edf7cbd2b5bffab2ae" + ], + "index": [ + [ + { + "id": "test" + }, + [ + [ + "genome.fasta.0123:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.bwt.2bit.64:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.fasta.pac:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + + ] + ] + ] + ], + "versions": [ + "versions.yml:md5,7ba3169cff18b2edf7cbd2b5bffab2ae" + ] + }, + [ + { + "FASTA_INDEX_DNA:BWAMEM2_INDEX": { + "bwamem2": "2.2.1" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-26T09:00:06.958771851" + }, + "Params: dragmap | generate dragmap hashtable": { + "content": [ + [ + + ], + [ + { + "FASTA_INDEX_DNA:DRAGMAP_HASHTABLE": { + "dragmap": "1.2.1" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-29T21:20:26.222919861" + }, + "Params: snapaligner | generate snapaligner index": { + "content": [ + [ + "Genome", + "GenomeIndex", + "GenomeIndexHash", + "OverflowTable" + ], + [ + { + "FASTA_INDEX_DNA:SNAP_INDEX": { + "snapaligner": "2.0.3" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-29T21:04:50.559045733" + }, + "Params: bowtie2 | generate bowtie2 index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "genome.1.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.2.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.3.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.4.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.rev.1.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.rev.2.bt2:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "1": [ + "versions.yml:md5,3b091297ba4bafebe767e26c7f85a086" + ], + "index": [ + [ + { + "id": "test" + }, + [ + "genome.1.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.2.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.3.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.4.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.rev.1.bt2:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.rev.2.bt2:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ] + ], + "versions": [ + "versions.yml:md5,3b091297ba4bafebe767e26c7f85a086" + ] + }, + [ + { + "FASTA_INDEX_DNA:BOWTIE2_BUILD": { + "bowtie2": "2.5.4" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-26T08:59:42.574081085" + }, + "Params: bwamem | generate bwamem1 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,d1b738f7f149345dc417a0f77ca16a1f" + ], + "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,d1b738f7f149345dc417a0f77ca16a1f" + ] + }, + [ + { + "FASTA_INDEX_DNA:BWAMEM1_INDEX": { + "bwa": "0.7.18-r1243-dirty" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-26T08:58:54.523166643" + }, + "Params: bowtie2 | generate bowtie2 index": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "genome.1.bt2:md5,cbe3d0bbea55bc57c99b4bfa25b5fbdf", + "genome.2.bt2:md5,47b153cd1319abc88dda532462651fcf", + "genome.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", + "genome.4.bt2:md5,c25be5f8b0378abf7a58c8a880b87626", + "genome.rev.1.bt2:md5,52be6950579598a990570fbcf5372184", + "genome.rev.2.bt2:md5,e3b4ef343dea4dd571642010a7d09597" + ] + ] + ], + "1": [ + "versions.yml:md5,3b091297ba4bafebe767e26c7f85a086" + ], + "index": [ + [ + { + "id": "test" + }, + [ + "genome.1.bt2:md5,cbe3d0bbea55bc57c99b4bfa25b5fbdf", + "genome.2.bt2:md5,47b153cd1319abc88dda532462651fcf", + "genome.3.bt2:md5,4ed93abba181d8dfab2e303e33114777", + "genome.4.bt2:md5,c25be5f8b0378abf7a58c8a880b87626", + "genome.rev.1.bt2:md5,52be6950579598a990570fbcf5372184", + "genome.rev.2.bt2:md5,e3b4ef343dea4dd571642010a7d09597" + ] + ] + ], + "versions": [ + "versions.yml:md5,3b091297ba4bafebe767e26c7f85a086" + ] + }, + [ + { + "FASTA_INDEX_DNA:BOWTIE2_BUILD": { + "bowtie2": "2.5.4" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-26T08:58:42.685936186" + }, + "Params: bwamem2 | generate bwamem2 index": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + [ + "genome.fasta.0123:md5,b02870de80106104abcb03cd9463e7d8", + "genome.fasta.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e", + "genome.fasta.ann:md5,c32e11f6c859f166c7525a9c1d583567", + "genome.fasta.bwt.2bit.64:md5,d097a1b82dee375d41a1ea69895a9216", + "genome.fasta.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66" + ], + [ + + ] + ] + ] + ], + "1": [ + "versions.yml:md5,7ba3169cff18b2edf7cbd2b5bffab2ae" + ], + "index": [ + [ + { + "id": "test" + }, + [ + [ + "genome.fasta.0123:md5,b02870de80106104abcb03cd9463e7d8", + "genome.fasta.amb:md5,3a68b8b2287e07dd3f5f95f4344ba76e", + "genome.fasta.ann:md5,c32e11f6c859f166c7525a9c1d583567", + "genome.fasta.bwt.2bit.64:md5,d097a1b82dee375d41a1ea69895a9216", + "genome.fasta.pac:md5,983e3d2cd6f36e2546e6d25a0da78d66" + ], + [ + + ] + ] + ] + ], + "versions": [ + "versions.yml:md5,7ba3169cff18b2edf7cbd2b5bffab2ae" + ] + }, + [ + { + "FASTA_INDEX_DNA:BWAMEM2_INDEX": { + "bwamem2": "2.2.1" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-26T08:59:07.902262015" + }, + "Params: bwamem | generate bwamem1 index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + [ + "genome.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.bwt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.pac:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.sa:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + + ] + ] + ] + ], + "1": [ + "versions.yml:md5,d1b738f7f149345dc417a0f77ca16a1f" + ], + "index": [ + [ + { + "id": "test" + }, + [ + [ + "genome.amb:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.ann:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.bwt:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.pac:md5,d41d8cd98f00b204e9800998ecf8427e", + "genome.sa:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + + ] + ] + ] + ], + "versions": [ + "versions.yml:md5,d1b738f7f149345dc417a0f77ca16a1f" + ] + }, + [ + { + "FASTA_INDEX_DNA:BWAMEM1_INDEX": { + "bwa": "0.7.18-r1243-dirty" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-26T08:59:54.234518213" + }, + "Params: dragmap | generate dragmap hashtable - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + + ] + ] + ], + "1": [ + "versions.yml:md5,e0cd4e970a93682e54b81dd073448058" + ], + "index": [ + [ + { + "id": "test" + }, + [ + + ] + ] + ], + "versions": [ + "versions.yml:md5,e0cd4e970a93682e54b81dd073448058" + ] + }, + [ + { + "FASTA_INDEX_DNA:DRAGMAP_HASHTABLE": { + "dragmap": "1.2.1" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-26T09:00:19.540679161" + }, + "Params: snapaligner | generate snapaligner index - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + [ + "Genome:md5,0154c489847fa6b3c612032782171293", + "GenomeIndex:md5,396ff91fd60821ae64be3aabe1dc98e7", + "GenomeIndexHash:md5,93800486f6f0a848562ef44675766907", + "OverflowTable:md5,719c5fe8b14741a4afb6f9b0e270db98" + ] + ] + ], + "1": [ + "versions.yml:md5,9bcabb7f47e8ffabdcbcab4df5312716" + ], + "index": [ + [ + { + "id": "test" + }, + [ + "Genome:md5,0154c489847fa6b3c612032782171293", + "GenomeIndex:md5,396ff91fd60821ae64be3aabe1dc98e7", + "GenomeIndexHash:md5,93800486f6f0a848562ef44675766907", + "OverflowTable:md5,719c5fe8b14741a4afb6f9b0e270db98" + ] + ] + ], + "versions": [ + "versions.yml:md5,9bcabb7f47e8ffabdcbcab4df5312716" + ] + }, + [ + { + "FASTA_INDEX_DNA:SNAP_INDEX": { + "snapaligner": "2.0.3" + } + } + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "25.04.2" + }, + "timestamp": "2025-05-26T09:00:45.90509196" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index ffa7f0aab3cc..e69de29bb2d1 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1,3 +0,0 @@ -subworkflows/fasta_index_dna: - - subworkflows/nf-core/fasta_index_dna/** - - tests/subworkflows/nf-core/fasta_index_dna/** diff --git a/tests/subworkflows/nf-core/fasta_index_dna/main.nf b/tests/subworkflows/nf-core/fasta_index_dna/main.nf deleted file mode 100644 index 50ae5cd9f96a..000000000000 --- a/tests/subworkflows/nf-core/fasta_index_dna/main.nf +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { FASTA_INDEX_DNA } from '../../../../subworkflows/nf-core/fasta_index_dna/main.nf' - -workflow test_bowtie2_build { - fasta = Channel.value([ - [id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), - ]) - altliftover = Channel.value([ - [id:'test'], - [] - ]) - FASTA_INDEX_DNA ( fasta, altliftover, 'bowtie2' ) -} - -workflow test_bwamem1_index { - fasta = Channel.value([ - [id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), - ]) - altliftover = Channel.value([ - [id:'test'], - [] - ]) - FASTA_INDEX_DNA ( fasta, altliftover, 'bwamem' ) -} - -workflow test_bwamem2_index { - fasta = Channel.value([ - [id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), - ]) - altliftover = Channel.value([ - [id:'test'], - [] - ]) - FASTA_INDEX_DNA ( fasta, altliftover, 'bwamem2' ) -} - -workflow test_dragmap_hashtable { - fasta = Channel.value([ - [id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), - ]) - altliftover = Channel.value([ - [id:'test'], - [] - ]) - FASTA_INDEX_DNA ( fasta, altliftover, 'dragmap' ) -} - -workflow test_snap_index { - fasta = Channel.value([ - [id:'test'], - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true), - ]) - altliftover = Channel.value([ - [id:'test'], - [] - ]) - FASTA_INDEX_DNA ( fasta, altliftover, 'snap' ) -} diff --git a/tests/subworkflows/nf-core/fasta_index_dna/nextflow.config b/tests/subworkflows/nf-core/fasta_index_dna/nextflow.config deleted file mode 100644 index 8730f1c4b930..000000000000 --- a/tests/subworkflows/nf-core/fasta_index_dna/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/subworkflows/nf-core/fasta_index_dna/test.yml b/tests/subworkflows/nf-core/fasta_index_dna/test.yml deleted file mode 100644 index 8e3e49d08cf0..000000000000 --- a/tests/subworkflows/nf-core/fasta_index_dna/test.yml +++ /dev/null @@ -1,134 +0,0 @@ -- name: fasta_index_dna test_bowtie2_build - command: nextflow run ./tests/subworkflows/nf-core/fasta_index_dna -entry test_bowtie2_build -c ./tests/config/nextflow.config - tags: - - bwa - - bwa/index - - bwamem2 - - bwamem2/index - - dragmap - - dragmap/hashtable - - bowtie2 - - bowtie2/build - - snapaligner - - snapaligner/index - - subworkflows - - subworkflows/fasta_index_dna - files: - - path: output/bowtie2/bowtie2/genome.1.bt2 - md5sum: cbe3d0bbea55bc57c99b4bfa25b5fbdf - - path: output/bowtie2/bowtie2/genome.2.bt2 - md5sum: 47b153cd1319abc88dda532462651fcf - - path: output/bowtie2/bowtie2/genome.3.bt2 - md5sum: 4ed93abba181d8dfab2e303e33114777 - - path: output/bowtie2/bowtie2/genome.4.bt2 - md5sum: c25be5f8b0378abf7a58c8a880b87626 - - path: output/bowtie2/bowtie2/genome.rev.1.bt2 - md5sum: 52be6950579598a990570fbcf5372184 - - path: output/bowtie2/bowtie2/genome.rev.2.bt2 - md5sum: e3b4ef343dea4dd571642010a7d09597 - -- name: fasta_index_dna test_bwamem1_index - command: nextflow run ./tests/subworkflows/nf-core/fasta_index_dna -entry test_bwamem1_index -c ./tests/config/nextflow.config - tags: - - bowtie2 - - bowtie2/build - - bwamem2 - - bwamem2/index - - dragmap - - dragmap/hashtable - - bwa - - bwa/index - - snapaligner - - snapaligner/index - - subworkflows - - subworkflows/fasta_index_dna - files: - - path: output/bwamem1/bwa/genome.amb - md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e - - path: output/bwamem1/bwa/genome.ann - md5sum: c32e11f6c859f166c7525a9c1d583567 - - path: output/bwamem1/bwa/genome.bwt - md5sum: 0469c30a1e239dd08f68afe66fde99da - - path: output/bwamem1/bwa/genome.pac - md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 - - path: output/bwamem1/bwa/genome.sa - md5sum: ab3952cabf026b48cd3eb5bccbb636d1 - -- name: fasta_index_dna test_bwamem2_index - command: nextflow run ./tests/subworkflows/nf-core/fasta_index_dna -entry test_bwamem2_index -c ./tests/config/nextflow.config - tags: - - bowtie2 - - bowtie2/build - - bwa - - bwa/index - - dragmap - - dragmap/hashtable - - bwamem2 - - bwamem2/index - - snapaligner - - snapaligner/index - - subworkflows/fasta_index_dna - files: - - path: output/bwamem2/bwamem2/genome.fasta.0123 - md5sum: b02870de80106104abcb03cd9463e7d8 - - path: output/bwamem2/bwamem2/genome.fasta.amb - md5sum: 3a68b8b2287e07dd3f5f95f4344ba76e - - path: output/bwamem2/bwamem2/genome.fasta.ann - md5sum: c32e11f6c859f166c7525a9c1d583567 - - path: output/bwamem2/bwamem2/genome.fasta.bwt.2bit.64 - md5sum: d097a1b82dee375d41a1ea69895a9216 - - path: output/bwamem2/bwamem2/genome.fasta.pac - md5sum: 983e3d2cd6f36e2546e6d25a0da78d66 - -- name: fasta_index_dna test_dragmap_hashtable - command: nextflow run ./tests/subworkflows/nf-core/fasta_index_dna -entry test_dragmap_hashtable -c ./tests/config/nextflow.config - tags: - - bowtie2 - - bowtie2/build - - bwa - - bwa/index - - bwamem2 - - bwamem2/index - - dragmap - - dragmap/hashtable - - snapaligner - - snapaligner/index - - subworkflows - - subworkflows/fasta_index_dna - files: - - path: output/dragmap/dragmap/hash_table.cfg - - path: output/dragmap/dragmap/hash_table.cfg.bin - - path: output/dragmap/dragmap/hash_table.cmp - md5sum: bc210e5358fd65656f9aea297b59ec7d - - path: output/dragmap/dragmap/hash_table_stats.txt - - path: output/dragmap/dragmap/ref_index.bin - md5sum: 8470be9566ecee77eb4aea6a38922a66 - - path: output/dragmap/dragmap/reference.bin - md5sum: b6b5c12a42416b990cd2844de8f33c5d - - path: output/dragmap/dragmap/repeat_mask.bin - md5sum: 2439259a2fd32a1d0f4c53d585f3da3a - - path: output/dragmap/dragmap/str_table.bin - md5sum: 302e2b30993973527e69c6bcd1f093d0 - -- name: fasta_index_dna test_snap_index - command: nextflow run ./tests/subworkflows/nf-core/fasta_index_dna -entry test_snap_index -c ./tests/config/nextflow.config - tags: - - bowtie2 - - bowtie2/build - - bwa - - bwa/index - - bwamem2 - - bwamem2/index - - dragmap - - dragmap/hashtable - - snapaligner - - snapaligner/index - - subworkflows - - subworkflows/fasta_index_dna - files: - - path: output/snap/snap/Genome - md5sum: 7e189c954142ba37460332b467e34ed4 - - path: output/snap/snap/GenomeIndex - md5sum: 298da8bcb1134f7b24379a792a7a46f8 - - path: output/snap/snap/GenomeIndexHash - - path: output/snap/snap/OverflowTable