From 19974cd133e6507bef3de015c241a7d48a1a0b90 Mon Sep 17 00:00:00 2001 From: Luisa Santus Date: Tue, 26 Nov 2024 15:15:19 +0100 Subject: [PATCH 1/6] Fix input tree in CLUSTALO/ALIGN (#7092) fix input tree --- modules/nf-core/clustalo/align/main.nf | 2 + .../nf-core/clustalo/align/tests/main.nf.test | 50 ++++-- .../clustalo/align/tests/main.nf.test.snap | 157 +++++++++++++----- .../clustalo/align/tests/nextflow.config | 3 - 4 files changed, 154 insertions(+), 58 deletions(-) delete mode 100644 modules/nf-core/clustalo/align/tests/nextflow.config diff --git a/modules/nf-core/clustalo/align/main.nf b/modules/nf-core/clustalo/align/main.nf index eb230cad269..7ac9b8fa5fa 100644 --- a/modules/nf-core/clustalo/align/main.nf +++ b/modules/nf-core/clustalo/align/main.nf @@ -22,6 +22,7 @@ process CLUSTALO_ALIGN { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def options_tree = tree ? "--guidetree-in=$tree" : "" def write_output = compress ? "--force -o >(pigz -cp ${task.cpus} > ${prefix}.aln.gz)" : "> ${prefix}.aln" // using >() is necessary to preserve the return value, // so nextflow knows to display an error when it failed @@ -31,6 +32,7 @@ process CLUSTALO_ALIGN { """ clustalo \ -i ${fasta} \ + $options_tree \ --threads=${task.cpus} \ $args \ $write_output diff --git a/modules/nf-core/clustalo/align/tests/main.nf.test b/modules/nf-core/clustalo/align/tests/main.nf.test index 6e20610e1ae..96efc0e9ad5 100644 --- a/modules/nf-core/clustalo/align/tests/main.nf.test +++ b/modules/nf-core/clustalo/align/tests/main.nf.test @@ -3,7 +3,6 @@ nextflow_process { name "Test Process CLUSTALO_ALIGN" script "../main.nf" process "CLUSTALO_ALIGN" - config "./nextflow.config" tag "modules" tag "modules_nfcore" @@ -17,8 +16,8 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) - ] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) + ] input[1] = [[:],[]] input[2] = false """ @@ -28,8 +27,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.alignment).match("alignment - uncompressed")}, - { assert snapshot(process.out.versions).match("versions0") } + { assert snapshot(process.out).match() } ) } @@ -41,8 +39,8 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) - ] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) + ] input[1] = [[:],[]] input[2] = true """ @@ -52,8 +50,7 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.alignment).match("alignment - compressed")}, - { assert snapshot(process.out.versions).match("versions1") } + { assert snapshot(process.out).match() } ) } @@ -68,8 +65,8 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) - ] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) + ] """ } } @@ -79,8 +76,8 @@ nextflow_process { process { """ input[0] = [ [ id:'test' ], // meta map - file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) - ] + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) + ] input[1] = CLUSTALO_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test_summary'], tree]} input[2] = true """ @@ -90,8 +87,31 @@ nextflow_process { then { assertAll( { assert process.success }, - { assert snapshot(process.out.alignment).match("with_guide_tree_alignment")}, - { assert snapshot(process.out.versions).match("with_guide_tree_versions") } + { assert snapshot(process.out).match() } + ) + } + } + + test("sarscov2 - contigs-fasta - stub") { + + options "-stub" + + when { + process { + """ + input[0] = [ [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) + ] + input[1] = [[:],[]] + input[2] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } ) } } diff --git a/modules/nf-core/clustalo/align/tests/main.nf.test.snap b/modules/nf-core/clustalo/align/tests/main.nf.test.snap index d7d69870c87..ddc7500079e 100644 --- a/modules/nf-core/clustalo/align/tests/main.nf.test.snap +++ b/modules/nf-core/clustalo/align/tests/main.nf.test.snap @@ -1,57 +1,134 @@ { - "alignment - compressed": { + "sarscov2 - contigs-fasta - uncompressed": { "content": [ - [ - [ - { - "id": "test" - }, - "test.aln.gz:md5,74bb9a2820a91cf68db94dbd46787722" + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,74bb9a2820a91cf68db94dbd46787722" + ] + ], + "1": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,74bb9a2820a91cf68db94dbd46787722" + ] + ], + "versions": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" ] - ] + } ], - "timestamp": "2024-02-09T19:39:46.647351958" + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-26T09:10:26.177965689" }, - "versions": { + "sarscov2 - contigs-fasta - stub": { "content": [ - [ - "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" - ] - ], - "timestamp": "2024-02-09T19:39:14.826528498" - }, - "alignment - uncompressed": { - "content": [ - [ - [ - { - "id": "test" - }, - "test.aln:md5,74bb9a2820a91cf68db94dbd46787722" + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" ] - ] + } ], - "timestamp": "2024-02-09T19:39:14.786480272" + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-26T09:11:58.57999142" }, - "with_guide_tree_alignment": { + "sarscov2 - contigs-fasta - compressed": { "content": [ - [ - [ - { - "id": "test" - }, - "test.aln.gz:md5,74bb9a2820a91cf68db94dbd46787722" + { + "0": [ + [ + { + "id": "test" + }, + "test.aln.gz:md5,74bb9a2820a91cf68db94dbd46787722" + ] + ], + "1": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln.gz:md5,74bb9a2820a91cf68db94dbd46787722" + ] + ], + "versions": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" ] - ] + } ], - "timestamp": "2024-02-09T19:40:45.057777867" + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-26T09:10:58.228696044" }, - "with_guide_tree_versions": { + "sarscov2 - contigs-fasta - guide_tree": { "content": [ - [ - "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" - ] + { + "0": [ + [ + { + "id": "test" + }, + "test.aln.gz:md5,74bb9a2820a91cf68db94dbd46787722" + ] + ], + "1": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln.gz:md5,74bb9a2820a91cf68db94dbd46787722" + ] + ], + "versions": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ] + } ], - "timestamp": "2024-02-09T19:40:45.122824595" + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-26T09:28:22.671455654" } } \ No newline at end of file diff --git a/modules/nf-core/clustalo/align/tests/nextflow.config b/modules/nf-core/clustalo/align/tests/nextflow.config deleted file mode 100644 index 71db4c7cc65..00000000000 --- a/modules/nf-core/clustalo/align/tests/nextflow.config +++ /dev/null @@ -1,3 +0,0 @@ -process { - ext.args = { tree ? "--guidetree-in=$tree" : "" } -} \ No newline at end of file From 4c4e742f1e3f9a02a3bc6e84af4a64e38ec2083b Mon Sep 17 00:00:00 2001 From: Louis LE NEZET <58640615+LouisLeNezet@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:40:48 +0100 Subject: [PATCH 2/6] `BCFTOOLS_CONVERT` Migration to nf-test (#7049) * Add nf-test * Migrate to nf-test * No version * Update nf-test * Remove tag.yml --------- Co-authored-by: LouisLeNezet Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> --- modules/nf-core/bcftools/convert/main.nf | 62 ++- modules/nf-core/bcftools/convert/meta.yml | 20 + .../bcftools/convert/tests/main.nf.test | 207 ++++++++++ .../bcftools/convert/tests/main.nf.test.snap | 367 ++++++++++++++++++ .../bcftools/convert/tests/nextflow.config | 5 + tests/config/pytest_modules.yml | 3 - .../modules/nf-core/bcftools/convert/main.nf | 71 ---- .../nf-core/bcftools/convert/nextflow.config | 17 - .../modules/nf-core/bcftools/convert/test.yml | 37 -- 9 files changed, 646 insertions(+), 143 deletions(-) create mode 100644 modules/nf-core/bcftools/convert/tests/main.nf.test create mode 100644 modules/nf-core/bcftools/convert/tests/main.nf.test.snap create mode 100644 modules/nf-core/bcftools/convert/tests/nextflow.config delete mode 100644 tests/modules/nf-core/bcftools/convert/main.nf delete mode 100644 tests/modules/nf-core/bcftools/convert/nextflow.config delete mode 100644 tests/modules/nf-core/bcftools/convert/test.yml diff --git a/modules/nf-core/bcftools/convert/main.nf b/modules/nf-core/bcftools/convert/main.nf index 6a22567ef10..7f4cb06da2a 100644 --- a/modules/nf-core/bcftools/convert/main.nf +++ b/modules/nf-core/bcftools/convert/main.nf @@ -19,30 +19,36 @@ process BCFTOOLS_CONVERT { tuple val(meta), path("*.bcf") , optional:true , emit: bcf tuple val(meta), path("*.hap.gz"), optional:true , emit: hap tuple val(meta), path("*.legend.gz"), optional:true , emit: legend - tuple val(meta), path("*.samples"), optional:true , emit: samples + tuple val(meta), path("*.samples") , optional:true , emit: samples + tuple val(meta), path("*.tbi") , optional:true , emit: tbi + tuple val(meta), path("*.csi") , optional:true , emit: csi path "versions.yml", emit: versions when: task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' + def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def regions = bed ? "--regions-file $bed" : "" + def regions = bed ? "--regions-file $bed" : "" def reference = fasta ? "--fasta-ref $fasta" : "" - def extension = args.contains("--output-type b") || args.contains("-Ob") ? "--output ${prefix}.bcf.gz" : - args.contains("--output-type u") || args.contains("-Ou") ? "--output ${prefix}.bcf" : - args.contains("--output-type z") || args.contains("-Oz") ? "--output ${prefix}.vcf.gz" : - args.contains("--output-type v") || args.contains("-Ov") ? "--output ${prefix}.vcf" : - args.contains("--haplegendsample") || args.contains("-h") ? "" : - "--output ${prefix}.vcf.gz" + def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : + args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : + args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : + args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : + args.contains("--haplegendsample") || args.contains("-h") ? "" : + "vcf.gz" + + def output_cmd = args.contains("--haplegendsample") ? "" : "--output ${prefix}.${extension}" + + if ("$input" == "${prefix}.${extension}") error "Input and output names are the same, set prefix in module configuration to disambiguate!" """ bcftools convert \\ $args \\ $regions \\ - $extension \\ + $output_cmd \\ --threads $task.cpus \\ $reference \\ $input @@ -57,13 +63,39 @@ process BCFTOOLS_CONVERT { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : - args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : - args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : - args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : + def extension = args.contains("--output-type b") || args.contains("-Ob") ? "bcf.gz" : + args.contains("--output-type u") || args.contains("-Ou") ? "bcf" : + args.contains("--output-type z") || args.contains("-Oz") ? "vcf.gz" : + args.contains("--output-type v") || args.contains("-Ov") ? "vcf" : + args.contains("--haplegendsample") || args.contains("-h") ? "hap.gz" : "vcf.gz" + + def index = args.contains("--write-index=tbi") || args.contains("-W=tbi") ? "tbi" : + args.contains("--write-index=csi") || args.contains("-W=csi") ? "csi" : + args.contains("--write-index") || args.contains("-W") ? "csi" : + "" + + def create_cmd = extension.endsWith(".gz") ? "echo '' | gzip >" : "touch" + def create_index = extension.endsWith(".gz") && index.matches("csi|tbi") ? "touch ${prefix}.${extension}.${index}" : "" + + if ("$input" == "${prefix}.${extension}") error "Input and output names are the same, set prefix in module configuration to disambiguate!" + + def hap = "" + + if (args.contains('--haplegendsample')) { + def args_split = args.split(' ') + hap = args_split.findIndexOf{ it == '--haplegendsample'} + prefix = args_split[hap + 1] + } """ - touch ${prefix}.${extension} + if [ -n "${hap}" ] ; then + ${create_cmd} ${prefix}.hap.gz + ${create_cmd} ${prefix}.legend.gz + touch ${prefix}.samples + else + ${create_cmd} ${prefix}.${extension} + ${create_index} + fi cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/bcftools/convert/meta.yml b/modules/nf-core/bcftools/convert/meta.yml index 4f2a9f3fb3d..3a1c197bb37 100644 --- a/modules/nf-core/bcftools/convert/meta.yml +++ b/modules/nf-core/bcftools/convert/meta.yml @@ -125,6 +125,26 @@ output: type: file description: samples format used by IMPUTE2 and SHAPEIT pattern: "*.samples" + - tbi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.tbi": + type: file + description: Alternative VCF file index + pattern: "*.tbi" + - csi: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - "*.csi": + type: file + description: Default VCF file index + pattern: "*.csi" - versions: - versions.yml: type: file diff --git a/modules/nf-core/bcftools/convert/tests/main.nf.test b/modules/nf-core/bcftools/convert/tests/main.nf.test new file mode 100644 index 00000000000..6c35b94c298 --- /dev/null +++ b/modules/nf-core/bcftools/convert/tests/main.nf.test @@ -0,0 +1,207 @@ +nextflow_process { + + name "Test Process BCFTOOLS_CONVERT" + script "../main.nf" + process "BCFTOOLS_CONVERT" + + tag "modules" + tag "modules_nfcore" + tag "bcftools" + tag "bcftools/convert" + + config "./nextflow.config" + + test("homo_sapiens - vcf1, tbi, [], fasta - to bcf") { + when { + params { + module_args = '--no-version --gvcf2vcf --output-type b5 --write-index=tbi' + } + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.bcf_gz, + process.out.tbi.collect{meta, tbi -> file(tbi).name}, + process.out.versions + ).match() } + ) + } + } + + test("homo_sapiens - vcf1, tbi, [], fasta - to hap") { + when { + params { + module_args = '--no-version --haplegendsample test' + } + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.hap, + process.out.legend, + process.out.samples, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - vcf1, tbi, bed, fasta - to gvcf") { + when { + params { + module_args = '--no-version --gvcf2vcf --write-index=csi' + } + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + process.out.vcf_gz, + process.out.csi.collect{meta, csi -> file(csi).name}, + process.out.versions + ).match() } + ) + } + + } + + test("homo_sapiens - vcf1, tbi, [], fasta - to bcf - stub") { + options '-stub' + when { + params { + module_args = '--no-version --gvcf2vcf --output-type b5 --write-index=tbi' + } + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("homo_sapiens - vcf1, tbi, [], fasta - to hap - stub") { + options '-stub' + when { + params { + module_args = '--no-version --haplegendsample test --write-index=tbi' + } + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = [] + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + + test("homo_sapiens - vcf1, tbi, bed, fasta - to gvcf - stub") { + options '-stub' + when { + params { + module_args = '--no-version --gvcf2vcf --write-index=csi' + } + process { + """ + input[0] = [ + [ id:'test3' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true) + ] + input[1] = [ + [ id:'genome' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) + ] + input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.bed', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/convert/tests/main.nf.test.snap b/modules/nf-core/bcftools/convert/tests/main.nf.test.snap new file mode 100644 index 00000000000..3aa96d9affc --- /dev/null +++ b/modules/nf-core/bcftools/convert/tests/main.nf.test.snap @@ -0,0 +1,367 @@ +{ + "homo_sapiens - vcf1, tbi, [], fasta - to bcf": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test3.bcf.gz:md5,998222c0d4780ce778e650962bf80c26" + ] + ], + [ + + ], + [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-22T11:50:55.026578232" + }, + "homo_sapiens - vcf1, tbi, [], fasta - to hap": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test.hap.gz:md5,1ecdaca6b10a55409ffd245fea63014f" + ] + ], + [ + [ + { + "id": "test3" + }, + "test.legend.gz:md5,2b537fa86c2d86b175ebbd2007e05371" + ] + ], + [ + [ + { + "id": "test3" + }, + "test.samples:md5,2606935b2fe508d5fd14afc249c141c0" + ] + ], + [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-22T11:51:02.355109034" + }, + "homo_sapiens - vcf1, tbi, [], fasta - to hap - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + [ + { + "id": "test3" + }, + "test.hap.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "5": [ + [ + { + "id": "test3" + }, + "test.legend.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "6": [ + [ + { + "id": "test3" + }, + "test.samples:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + + ], + "8": [ + + ], + "9": [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ], + "bcf": [ + + ], + "bcf_gz": [ + + ], + "csi": [ + + ], + "hap": [ + [ + { + "id": "test3" + }, + "test.hap.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "legend": [ + [ + { + "id": "test3" + }, + "test.legend.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "samples": [ + [ + { + "id": "test3" + }, + "test.samples:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "tbi": [ + + ], + "vcf": [ + + ], + "vcf_gz": [ + + ], + "versions": [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ] + } + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-21T15:49:01.988438909" + }, + "homo_sapiens - vcf1, tbi, bed, fasta - to gvcf - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "1": [ + + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + + ], + "7": [ + + ], + "8": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "9": [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ], + "bcf": [ + + ], + "bcf_gz": [ + + ], + "csi": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz.csi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "hap": [ + + ], + "legend": [ + + ], + "samples": [ + + ], + "tbi": [ + + ], + "vcf": [ + + ], + "vcf_gz": [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "versions": [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ] + } + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-21T14:41:45.395930996" + }, + "homo_sapiens - vcf1, tbi, [], fasta - to bcf - stub": { + "content": [ + { + "0": [ + + ], + "1": [ + + ], + "2": [ + [ + { + "id": "test3" + }, + "test3.bcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + + ], + "7": [ + [ + { + "id": "test3" + }, + "test3.bcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "8": [ + + ], + "9": [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ], + "bcf": [ + + ], + "bcf_gz": [ + [ + { + "id": "test3" + }, + "test3.bcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" + ] + ], + "csi": [ + + ], + "hap": [ + + ], + "legend": [ + + ], + "samples": [ + + ], + "tbi": [ + [ + { + "id": "test3" + }, + "test3.bcf.gz.tbi:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "vcf": [ + + ], + "vcf_gz": [ + + ], + "versions": [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ] + } + ], + "meta": { + "nf-test": "0.9.1", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-21T14:41:16.321899559" + }, + "homo_sapiens - vcf1, tbi, bed, fasta - to gvcf": { + "content": [ + [ + [ + { + "id": "test3" + }, + "test3.vcf.gz:md5,ef40139c7f15d8df22c0cc5cb409ef88" + ] + ], + [ + "test3.vcf.gz.csi" + ], + [ + "versions.yml:md5,b75cebea54ac69688ff5d1cbb0dda84f" + ] + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-22T11:51:10.259936966" + } +} \ No newline at end of file diff --git a/modules/nf-core/bcftools/convert/tests/nextflow.config b/modules/nf-core/bcftools/convert/tests/nextflow.config new file mode 100644 index 00000000000..dc2e6e5166e --- /dev/null +++ b/modules/nf-core/bcftools/convert/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: BCFTOOLS_CONVERT { + ext.args = params.module_args + } +} diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 1cf650215d0..4ea995efdb8 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -43,9 +43,6 @@ basicpy: bbmap/align: - modules/nf-core/bbmap/align/** - tests/modules/nf-core/bbmap/align/** -bcftools/convert: - - modules/nf-core/bcftools/convert/** - - tests/modules/nf-core/bcftools/convert/** biohansel: - modules/nf-core/biohansel/** - tests/modules/nf-core/biohansel/** diff --git a/tests/modules/nf-core/bcftools/convert/main.nf b/tests/modules/nf-core/bcftools/convert/main.nf deleted file mode 100644 index e17f75d5212..00000000000 --- a/tests/modules/nf-core/bcftools/convert/main.nf +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { BCFTOOLS_CONVERT as BCFTOOLS_CONVERT_GVCF } from '../../../../../modules/nf-core/bcftools/convert/main.nf' -include { BCFTOOLS_CONVERT as BCFTOOLS_CONVERT_BCF } from '../../../../../modules/nf-core/bcftools/convert/main.nf' -include { BCFTOOLS_CONVERT as BCFTOOLS_CONVERT_HAP } from '../../../../../modules/nf-core/bcftools/convert/main.nf' - -workflow test_bcftools_convert_gvcf { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), - [] - ] - - bed = [] - - fasta = [ [ id:'genome' ], // meta map - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - ] - BCFTOOLS_CONVERT_GVCF ( input, fasta, bed ) -} - -workflow test_bcftools_convert_gvcf_bed { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf_gz_tbi'], checkIfExists: true) - ] - - bed = file(params.test_data['homo_sapiens']['genome']['genome_bed'], checkIfExists: true) - - fasta = [ [ id:'genome' ], // meta map - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - ] - BCFTOOLS_CONVERT_GVCF ( input, fasta, bed ) -} - -workflow test_bcftools_convert_gvcf_to_bcf { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), - [] - ] - - bed = [] - - fasta = [ [ id:'genome' ], // meta map - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - ] - BCFTOOLS_CONVERT_BCF ( input, fasta, bed ) -} - -workflow test_bcftools_convert_vcf_to_hap { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_genome_vcf'], checkIfExists: true), - [] - ] - - bed = [] - - fasta = [ [ id:'genome' ], // meta map - file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true) - ] - BCFTOOLS_CONVERT_HAP ( input, fasta, bed ) -} diff --git a/tests/modules/nf-core/bcftools/convert/nextflow.config b/tests/modules/nf-core/bcftools/convert/nextflow.config deleted file mode 100644 index 47804000a29..00000000000 --- a/tests/modules/nf-core/bcftools/convert/nextflow.config +++ /dev/null @@ -1,17 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: BCFTOOLS_CONVERT_GVCF { - ext.args = '--gvcf2vcf' - } - - withName: BCFTOOLS_CONVERT_BCF { - ext.args = '--gvcf2vcf --output-type b5' - } - - withName: BCFTOOLS_CONVERT_HAP { - ext.args = '--haplegendsample test' - } - -} diff --git a/tests/modules/nf-core/bcftools/convert/test.yml b/tests/modules/nf-core/bcftools/convert/test.yml deleted file mode 100644 index dd92caacbee..00000000000 --- a/tests/modules/nf-core/bcftools/convert/test.yml +++ /dev/null @@ -1,37 +0,0 @@ -- name: bcftools convert test_bcftools_convert_gvcf - command: nextflow run ./tests/modules/nf-core/bcftools/convert -entry test_bcftools_convert_gvcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bcftools/convert/nextflow.config - tags: - - bcftools - - bcftools/convert - files: - - path: output/bcftools/test.vcf.gz - -- name: bcftools convert test_bcftools_convert_gvcf_bed - command: nextflow run ./tests/modules/nf-core/bcftools/convert -entry test_bcftools_convert_gvcf_bed -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bcftools/convert/nextflow.config - tags: - - bcftools - - bcftools/convert - files: - - path: output/bcftools/test.vcf.gz - -- name: bcftools convert test_bcftools_convert_gvcf_to_bcf - command: nextflow run ./tests/modules/nf-core/bcftools/convert -entry test_bcftools_convert_gvcf_to_bcf -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bcftools/convert/nextflow.config - tags: - - bcftools - - bcftools/convert - files: - - path: output/bcftools/test.bcf.gz - -- name: bcftools convert test_bcftools_convert_vcf_to_hap - command: nextflow run ./tests/modules/nf-core/bcftools/convert -entry test_bcftools_convert_vcf_to_hap -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bcftools/convert/nextflow.config - tags: - - bcftools - - bcftools/convert - files: - - path: output/bcftools/test.hap.gz - md5sum: 712a6d377eadd634193c896c4447ea50 - - path: output/bcftools/test.legend.gz - md5sum: fff6a3c04d230885842757b6ad983a97 - - path: output/bcftools/test.samples - md5sum: 2606935b2fe508d5fd14afc249c141c0 - - path: output/bcftools/versions.yml From f5de03e33783fe0a303d9f5732e4d3782aa545ed Mon Sep 17 00:00:00 2001 From: Meriam van Os <84883985+MeriamOs@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:43:32 +0100 Subject: [PATCH 3/6] Pydamage change output file name (#7095) * added sourcepredict module * Update nextflow.config edited nextflow.config * Update main.nf.test Edited the test file * added test data for new sourcepredict module * edited sourcepredict files * fixed numba and ete3 * added test data location to test_data.config * changed paths to nf-core new test data * fixed whitspaces * fixed whitspaces * fixed prettier * Update modules/nf-core/sourcepredict/main.nf Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/sourcepredict/main.nf Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/sourcepredict/main.nf Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/sourcepredict/main.nf Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/sourcepredict/main.nf Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> * Update modules/nf-core/sourcepredict/tests/main.nf.test Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com> * fixed commits after first PR * changed output file name to prevent file collision names --------- Co-authored-by: Meriam van Os meriam.vanos@postgrad.otago.ac.nz Co-authored-by: Sateesh_Peri <33637490+sateeshperi@users.noreply.github.com> Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com> --- modules/nf-core/pydamage/analyze/main.nf | 4 +++- modules/nf-core/pydamage/analyze/meta.yml | 2 +- modules/nf-core/pydamage/analyze/tests/main.nf.test.snap | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/nf-core/pydamage/analyze/main.nf b/modules/nf-core/pydamage/analyze/main.nf index 6bb7bed4f84..69790a77424 100644 --- a/modules/nf-core/pydamage/analyze/main.nf +++ b/modules/nf-core/pydamage/analyze/main.nf @@ -11,7 +11,7 @@ process PYDAMAGE_ANALYZE { tuple val(meta), path(bam), path(bai) output: - tuple val(meta), path("pydamage_results/pydamage_results.csv"), emit: csv + tuple val(meta), path("pydamage_results/*_pydamage_results.csv"), emit: csv path "versions.yml" , emit: versions when: @@ -27,6 +27,8 @@ process PYDAMAGE_ANALYZE { -p $task.cpus \\ $bam + mv pydamage_results/pydamage_results.csv pydamage_results/${prefix}_pydamage_results.csv + cat <<-END_VERSIONS > versions.yml "${task.process}": pydamage: \$(pydamage --version | sed -n 's/pydamage, version \\(.*\\)/\\1/p') diff --git a/modules/nf-core/pydamage/analyze/meta.yml b/modules/nf-core/pydamage/analyze/meta.yml index d862fd3d42d..0608e4374e5 100644 --- a/modules/nf-core/pydamage/analyze/meta.yml +++ b/modules/nf-core/pydamage/analyze/meta.yml @@ -42,7 +42,7 @@ output: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - pydamage_results/pydamage_results.csv: + - pydamage_results/*_pydamage_results.csv: type: file description: PyDamage results as csv files pattern: "*.csv" diff --git a/modules/nf-core/pydamage/analyze/tests/main.nf.test.snap b/modules/nf-core/pydamage/analyze/tests/main.nf.test.snap index d8046aa284a..da03ac2faef 100644 --- a/modules/nf-core/pydamage/analyze/tests/main.nf.test.snap +++ b/modules/nf-core/pydamage/analyze/tests/main.nf.test.snap @@ -8,7 +8,7 @@ "id": "test", "single_end": false }, - "pydamage_results.csv:md5,37ee6b4dee6890fd2ec8550337f21ac9" + "test_pydamage_results.csv:md5,37ee6b4dee6890fd2ec8550337f21ac9" ] ], "1": [ @@ -20,7 +20,7 @@ "id": "test", "single_end": false }, - "pydamage_results.csv:md5,37ee6b4dee6890fd2ec8550337f21ac9" + "test_pydamage_results.csv:md5,37ee6b4dee6890fd2ec8550337f21ac9" ] ], "versions": [ @@ -29,9 +29,9 @@ } ], "meta": { - "nf-test": "0.8.4", + "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-27T14:06:38.530007" + "timestamp": "2024-11-26T15:13:19.888455981" } } \ No newline at end of file From 2a8530b890878747f5063a894bad9fb2abd5c071 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Tue, 26 Nov 2024 17:10:55 +0100 Subject: [PATCH 4/6] Added four file params to clustalo/align (#7093) * Added four file params to clustalo/align * Update meta.yml * Update modules/nf-core/clustalo/align/tests/main.nf.test Co-authored-by: Luisa Santus * Update modules/nf-core/clustalo/align/tests/main.nf.test Co-authored-by: Luisa Santus * Reran tests --------- Co-authored-by: Luisa Santus --- modules/nf-core/clustalo/align/main.nf | 18 ++++- modules/nf-core/clustalo/align/meta.yml | 18 ++++- .../nf-core/clustalo/align/tests/main.nf.test | 74 +++++++++++++++++-- .../clustalo/align/tests/main.nf.test.snap | 74 ++++++++++++++++++- 4 files changed, 171 insertions(+), 13 deletions(-) diff --git a/modules/nf-core/clustalo/align/main.nf b/modules/nf-core/clustalo/align/main.nf index 7ac9b8fa5fa..e55ca172e78 100644 --- a/modules/nf-core/clustalo/align/main.nf +++ b/modules/nf-core/clustalo/align/main.nf @@ -10,7 +10,11 @@ process CLUSTALO_ALIGN { input: tuple val(meta) , path(fasta) tuple val(meta2), path(tree) - val(compress) + path hmm_in + path hmm_batch + path profile1 + path profile2 + val compress output: tuple val(meta), path("*.aln{.gz,}"), emit: alignment @@ -20,9 +24,13 @@ process CLUSTALO_ALIGN { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" def options_tree = tree ? "--guidetree-in=$tree" : "" + def fhmm_in = hmm_in ? "--hmm-in=${hmm_in}" : "" + def fhmm_batch = hmm_batch ? "--hmm-batch=${hmm_batch}" : "" + def fprofile1 = profile1 ? "--profile1=${profile1}" : "" + def fprofile2 = profile2 ? "--profile2=${profile2}" : "" def write_output = compress ? "--force -o >(pigz -cp ${task.cpus} > ${prefix}.aln.gz)" : "> ${prefix}.aln" // using >() is necessary to preserve the return value, // so nextflow knows to display an error when it failed @@ -33,6 +41,10 @@ process CLUSTALO_ALIGN { clustalo \ -i ${fasta} \ $options_tree \ + ${fhmm_in} \ + ${fhmm_batch} \ + ${fprofile1} \ + ${fprofile2} \ --threads=${task.cpus} \ $args \ $write_output diff --git a/modules/nf-core/clustalo/align/meta.yml b/modules/nf-core/clustalo/align/meta.yml index c97ebf722e9..cd59647131e 100644 --- a/modules/nf-core/clustalo/align/meta.yml +++ b/modules/nf-core/clustalo/align/meta.yml @@ -28,7 +28,7 @@ input: - fasta: type: file description: Input sequences in FASTA format - pattern: "*.{fa,fasta}" + pattern: "*.{fa,fasta,faa,fna}" - - meta2: type: map description: | @@ -38,6 +38,22 @@ input: type: file description: Input guide tree in Newick format pattern: "*.{dnd}" + - - hmm_in: + type: file + description: HMM file for profile alignment + pattern: "*.hmm" + - - hmm_batch: + type: file + description: specify HMMs for individual sequences + pattern: "*" + - - profile1: + type: file + description: Pre-aligned multiple sequence file 1 + pattern: "*.{alnfaa,faa,fa,fasta}" + - - profile2: + type: file + description: Pre-aligned multiple sequence file 2 + pattern: "*.{alnfaa,faa,fa,fasta}" - - compress: type: boolean description: Flag representing whether the output MSA should be compressed. diff --git a/modules/nf-core/clustalo/align/tests/main.nf.test b/modules/nf-core/clustalo/align/tests/main.nf.test index 96efc0e9ad5..3b3baf0e55d 100644 --- a/modules/nf-core/clustalo/align/tests/main.nf.test +++ b/modules/nf-core/clustalo/align/tests/main.nf.test @@ -19,7 +19,11 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) ] input[1] = [[:],[]] - input[2] = false + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + input[6] = false """ } } @@ -42,7 +46,11 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) ] input[1] = [[:],[]] - input[2] = true + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + input[6] = true """ } } @@ -56,6 +64,54 @@ nextflow_process { } + test("profile alignment -- hmm-in") { + + when { + process { + """ + input[0] = [ [ id: 'test'], file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/phyloplace/testdata/PF14720_3_sequences.faa", checkIfExists: true) ] + input[1] = [[:],[]] + input[2] = file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/phyloplace/testdata/PF14720.hmm", checkIfExists: true) + input[3] = [] + input[4] = [] + input[5] = [] + input[6] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("profile alignment -- profile1") { + + when { + process { + """ + input[0] = [ [ id: 'test'], file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/phyloplace/testdata/PF14720_3_sequences.faa", checkIfExists: true) ] + input[1] = [[:],[]] + input[2] = [] + input[3] = [] + input[4] = file("https://raw.githubusercontent.com/nf-core/test-datasets/refs/heads/phyloplace/testdata/PF14720_seed.alnfaa", checkIfExists: true) + input[5] = [] + input[6] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + test("sarscov2 - contigs-fasta - guide_tree") { setup { @@ -79,7 +135,11 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) ] input[1] = CLUSTALO_GUIDETREE.out.tree.collect{ meta, tree -> tree }.map{ tree -> [[ id: 'test_summary'], tree]} - input[2] = true + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + input[6] = true """ } } @@ -103,7 +163,11 @@ nextflow_process { file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', checkIfExists: true) ] input[1] = [[:],[]] - input[2] = false + input[2] = [] + input[3] = [] + input[4] = [] + input[5] = [] + input[6] = false """ } } @@ -115,4 +179,4 @@ nextflow_process { ) } } -} \ No newline at end of file +} diff --git a/modules/nf-core/clustalo/align/tests/main.nf.test.snap b/modules/nf-core/clustalo/align/tests/main.nf.test.snap index ddc7500079e..fe33fd24763 100644 --- a/modules/nf-core/clustalo/align/tests/main.nf.test.snap +++ b/modules/nf-core/clustalo/align/tests/main.nf.test.snap @@ -30,7 +30,40 @@ "nf-test": "0.9.2", "nextflow": "24.10.1" }, - "timestamp": "2024-11-26T09:10:26.177965689" + "timestamp": "2024-11-26T15:47:09.471999" + }, + "profile alignment -- hmm-in": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,9d3b05b9871b55ae5aaacedbc3f0f691" + ] + ], + "1": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,9d3b05b9871b55ae5aaacedbc3f0f691" + ] + ], + "versions": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-26T15:47:26.948278" }, "sarscov2 - contigs-fasta - stub": { "content": [ @@ -63,7 +96,7 @@ "nf-test": "0.9.2", "nextflow": "24.10.1" }, - "timestamp": "2024-11-26T09:11:58.57999142" + "timestamp": "2024-11-26T15:49:45.969566" }, "sarscov2 - contigs-fasta - compressed": { "content": [ @@ -96,7 +129,40 @@ "nf-test": "0.9.2", "nextflow": "24.10.1" }, - "timestamp": "2024-11-26T09:10:58.228696044" + "timestamp": "2024-11-26T15:47:21.819165" + }, + "profile alignment -- profile1": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,bc500eae88f3858f0f27800f8cd69698" + ] + ], + "1": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,bc500eae88f3858f0f27800f8cd69698" + ] + ], + "versions": [ + "versions.yml:md5,327da6a4250a6b7c4e45cddaa1f56280" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-26T15:47:32.12986" }, "sarscov2 - contigs-fasta - guide_tree": { "content": [ @@ -129,6 +195,6 @@ "nf-test": "0.9.2", "nextflow": "24.10.1" }, - "timestamp": "2024-11-26T09:28:22.671455654" + "timestamp": "2024-11-26T15:47:53.772195" } } \ No newline at end of file From b6515a01897b11b64b3368858c0359b4c813ad1e Mon Sep 17 00:00:00 2001 From: "Diego Alvarez S." Date: Tue, 26 Nov 2024 17:09:41 -0300 Subject: [PATCH 5/6] Bump GUNC and add gunc/run test (#6920) * Bump GUNC and add gunc/run test * Fix meta, use input_dir * Add snapshots * Change strategy to preserve filenames * Add gunc/mergecheckm test * Update tags * Fix test names * Update snapshots * Add stubs * Add stub snaps * Address review comments * Set args in nextflow.config again * Comment problematic tests * Comment another test --------- Co-authored-by: Edmund Miller <20095261+edmundmiller@users.noreply.github.com> --- .../nf-core/gunc/downloaddb/environment.yml | 3 +- modules/nf-core/gunc/downloaddb/main.nf | 4 +- .../gunc/downloaddb/tests/main.nf.test.snap | 18 +- .../nf-core/gunc/mergecheckm/environment.yml | 3 +- modules/nf-core/gunc/mergecheckm/main.nf | 14 +- .../gunc/mergecheckm/tests/main.nf.test | 175 ++++++++++++++++++ .../gunc/mergecheckm/tests/main.nf.test.snap | 68 +++++++ .../gunc/mergecheckm/tests/nextflow.config | 5 + .../nf-core/gunc/mergecheckm/tests/tags.yml | 6 + modules/nf-core/gunc/run/environment.yml | 3 +- modules/nf-core/gunc/run/main.nf | 19 +- modules/nf-core/gunc/run/meta.yml | 4 +- modules/nf-core/gunc/run/tests/main.nf.test | 96 ++++++++++ .../nf-core/gunc/run/tests/main.nf.test.snap | 90 +++++++++ modules/nf-core/gunc/run/tests/tags.yml | 3 + tests/config/pytest_modules.yml | 6 - 16 files changed, 489 insertions(+), 28 deletions(-) create mode 100644 modules/nf-core/gunc/mergecheckm/tests/main.nf.test create mode 100644 modules/nf-core/gunc/mergecheckm/tests/main.nf.test.snap create mode 100644 modules/nf-core/gunc/mergecheckm/tests/nextflow.config create mode 100644 modules/nf-core/gunc/mergecheckm/tests/tags.yml create mode 100644 modules/nf-core/gunc/run/tests/main.nf.test create mode 100644 modules/nf-core/gunc/run/tests/main.nf.test.snap create mode 100644 modules/nf-core/gunc/run/tests/tags.yml diff --git a/modules/nf-core/gunc/downloaddb/environment.yml b/modules/nf-core/gunc/downloaddb/environment.yml index d7301428db4..3a0264f4371 100644 --- a/modules/nf-core/gunc/downloaddb/environment.yml +++ b/modules/nf-core/gunc/downloaddb/environment.yml @@ -1,5 +1,6 @@ channels: - conda-forge - bioconda + dependencies: - - bioconda::gunc=1.0.5 + - bioconda::gunc=1.0.6 diff --git a/modules/nf-core/gunc/downloaddb/main.nf b/modules/nf-core/gunc/downloaddb/main.nf index be43affaaa8..71cac464951 100644 --- a/modules/nf-core/gunc/downloaddb/main.nf +++ b/modules/nf-core/gunc/downloaddb/main.nf @@ -4,8 +4,8 @@ process GUNC_DOWNLOADDB { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gunc:1.0.5--pyhdfd78af_0' : - 'biocontainers/gunc:1.0.5--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gunc:1.0.6--pyhdfd78af_0' : + 'biocontainers/gunc:1.0.6--pyhdfd78af_0' }" input: val db_name diff --git a/modules/nf-core/gunc/downloaddb/tests/main.nf.test.snap b/modules/nf-core/gunc/downloaddb/tests/main.nf.test.snap index d2af3a2ee70..eac880d152e 100644 --- a/modules/nf-core/gunc/downloaddb/tests/main.nf.test.snap +++ b/modules/nf-core/gunc/downloaddb/tests/main.nf.test.snap @@ -3,14 +3,14 @@ "content": [ "gunc_db_progenomes2.1.dmnd", [ - "versions.yml:md5,ab391d00f34801f2caa143c4c05eba56" + "versions.yml:md5,5ce1c695848ee48977b982a369b01141" ] ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-09-06T10:25:14.217951" + "timestamp": "2024-11-01T07:23:05.696265018" }, "test-gunc-downloaddb-stub": { "content": [ @@ -19,20 +19,20 @@ "progenomes.dmnd:md5,d41d8cd98f00b204e9800998ecf8427e" ], "1": [ - "versions.yml:md5,ab391d00f34801f2caa143c4c05eba56" + "versions.yml:md5,5ce1c695848ee48977b982a369b01141" ], "db": [ "progenomes.dmnd:md5,d41d8cd98f00b204e9800998ecf8427e" ], "versions": [ - "versions.yml:md5,ab391d00f34801f2caa143c4c05eba56" + "versions.yml:md5,5ce1c695848ee48977b982a369b01141" ] } ], "meta": { - "nf-test": "0.9.0", - "nextflow": "24.04.4" + "nf-test": "0.9.1", + "nextflow": "24.10.0" }, - "timestamp": "2024-09-06T10:25:20.120206" + "timestamp": "2024-11-01T07:23:16.109775313" } } \ No newline at end of file diff --git a/modules/nf-core/gunc/mergecheckm/environment.yml b/modules/nf-core/gunc/mergecheckm/environment.yml index d7301428db4..3a0264f4371 100644 --- a/modules/nf-core/gunc/mergecheckm/environment.yml +++ b/modules/nf-core/gunc/mergecheckm/environment.yml @@ -1,5 +1,6 @@ channels: - conda-forge - bioconda + dependencies: - - bioconda::gunc=1.0.5 + - bioconda::gunc=1.0.6 diff --git a/modules/nf-core/gunc/mergecheckm/main.nf b/modules/nf-core/gunc/mergecheckm/main.nf index 4a81db95bcc..611f916c2cd 100644 --- a/modules/nf-core/gunc/mergecheckm/main.nf +++ b/modules/nf-core/gunc/mergecheckm/main.nf @@ -4,8 +4,8 @@ process GUNC_MERGECHECKM { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gunc:1.0.5--pyhdfd78af_0' : - 'biocontainers/gunc:1.0.5--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gunc:1.0.6--pyhdfd78af_0' : + 'biocontainers/gunc:1.0.6--pyhdfd78af_0' }" input: tuple val(meta), path(gunc_file), path(checkm_file) @@ -33,4 +33,14 @@ process GUNC_MERGECHECKM { gunc: \$( gunc --version ) END_VERSIONS """ + + stub: + """ + touch gunc_merge_checkm.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gunc: \$( gunc --version ) + END_VERSIONS + """ } diff --git a/modules/nf-core/gunc/mergecheckm/tests/main.nf.test b/modules/nf-core/gunc/mergecheckm/tests/main.nf.test new file mode 100644 index 00000000000..dbd67b901d6 --- /dev/null +++ b/modules/nf-core/gunc/mergecheckm/tests/main.nf.test @@ -0,0 +1,175 @@ +nextflow_process { + + name "Test Process GUNC_MERGECHECKM" + script "../main.nf" + process "GUNC_MERGECHECKM" + config "./nextflow.config" + + tag "modules_nfcore" + tag "modules" + tag "gunc" + tag "gunc/mergecheckm" + tag "gunc/run" + tag "gunc/downloaddb" + tag "checkm/lineagewf" + tag "checkm/qa" + + // commented out because GitHub runners are not able to run this test + // test("gunc - mergecheckm") { + + // setup { + // run("CHECKM_LINEAGEWF") { + // script "../../../checkm/lineagewf/main.nf" + // process { + // """ + // input[0] = [ + // [id: 'test'], // meta map + // file( + // params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', + // checkIfExists: true + // ) + // ] + // input[1] = 'fasta' + // input[2] = [] // Download CheckM database + // """ + // } + // } + + // run("CHECKM_QA") { + // script "../../../checkm/qa/main.nf" + // process { + // """ + // input[0] = CHECKM_LINEAGEWF.out.checkm_output + // .join(CHECKM_LINEAGEWF.out.marker_file) + // .map { sample_data -> sample_data + [file('NO_FILE')] } + // input[1] = [] + // """ + // } + // } + + // run("GUNC_DOWNLOADDB") { + // script "../../downloaddb/main.nf" + // process { + // """ + // input[0] = 'progenomes' + // """ + // } + // } + + // run("GUNC_RUN") { + // script "../../run/main.nf" + // process { + // """ + // input[0] = [ + // [id: 'test'], + // [file( + // params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', + // checkIfExists: true + // )] + // ] + // input[1] = GUNC_DOWNLOADDB.out.db + // """ + // } + // } + // } + + // when { + // params { + // outdir = "${launchDir}/tests/results" + // } + // process { + // """ + // input[0] = GUNC_RUN.out.maxcss_level_tsv.join(CHECKM_QA.out.output) + // """ + // } + // } + + // then { + // assertAll( + // { assert process.success }, + // { assert snapshot(process.out).match() } + // ) + // } + + // } + + test("gunc - mergecheckm - stub") { + + options "-stub" + + setup { + run("CHECKM_LINEAGEWF") { + script "../../../checkm/lineagewf/main.nf" + process { + """ + input[0] = [ + [id: 'test'], // meta map + file( + params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', + checkIfExists: true + ) + ] + input[1] = 'fasta' + input[2] = [] // Download CheckM database + """ + } + } + + run("CHECKM_QA") { + script "../../../checkm/qa/main.nf" + process { + """ + input[0] = CHECKM_LINEAGEWF.out.checkm_output + .join(CHECKM_LINEAGEWF.out.marker_file) + .map { v -> v + [file('NO_FILE')] } + input[1] = [] + """ + } + } + + run("GUNC_DOWNLOADDB") { + script "../../downloaddb/main.nf" + process { + """ + input[0] = 'progenomes' + """ + } + } + + run("GUNC_RUN") { + script "../../run/main.nf" + process { + """ + input[0] = [ + [id: 'test'], + [file( + params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', + checkIfExists: true + )] + ] + input[1] = GUNC_DOWNLOADDB.out.db + """ + } + } + } + + when { + params { + outdir = "${launchDir}/tests/results" + } + process { + """ + input[0] = GUNC_RUN.out.maxcss_level_tsv.join(CHECKM_QA.out.output) + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } +} \ No newline at end of file diff --git a/modules/nf-core/gunc/mergecheckm/tests/main.nf.test.snap b/modules/nf-core/gunc/mergecheckm/tests/main.nf.test.snap new file mode 100644 index 00000000000..807c23f21a5 --- /dev/null +++ b/modules/nf-core/gunc/mergecheckm/tests/main.nf.test.snap @@ -0,0 +1,68 @@ +{ + "gunc - mergecheckm": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "GUNC_checkM.merged.tsv:md5,24cbd3c76a36cb90ac993c83525a2c1b" + ] + ], + "1": [ + "versions.yml:md5,a94747201129170b1cfbce5e59de62b0" + ], + "tsv": [ + [ + { + "id": "test" + }, + "GUNC_checkM.merged.tsv:md5,24cbd3c76a36cb90ac993c83525a2c1b" + ] + ], + "versions": [ + "versions.yml:md5,a94747201129170b1cfbce5e59de62b0" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-22T09:37:48.146410153" + }, + "gunc - mergecheckm - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "gunc_merge_checkm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + "versions.yml:md5,a94747201129170b1cfbce5e59de62b0" + ], + "tsv": [ + [ + { + "id": "test" + }, + "gunc_merge_checkm.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,a94747201129170b1cfbce5e59de62b0" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-21T16:47:06.752273424" + } +} \ No newline at end of file diff --git a/modules/nf-core/gunc/mergecheckm/tests/nextflow.config b/modules/nf-core/gunc/mergecheckm/tests/nextflow.config new file mode 100644 index 00000000000..1e9ba3dcb5d --- /dev/null +++ b/modules/nf-core/gunc/mergecheckm/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: CHECKM_QA { + ext.args = '--tab_table' + } +} diff --git a/modules/nf-core/gunc/mergecheckm/tests/tags.yml b/modules/nf-core/gunc/mergecheckm/tests/tags.yml new file mode 100644 index 00000000000..d05282f2af2 --- /dev/null +++ b/modules/nf-core/gunc/mergecheckm/tests/tags.yml @@ -0,0 +1,6 @@ +gunc/run: + - modules/nf-core/gunc/mergecheckm/** + - modules/nf-core/gunc/run/** + - modules/nf-core/gunc/downloaddb/** + - modules/nf-core/checkm/lineagewf/** + - modules/nf-core/checkm/qa/** diff --git a/modules/nf-core/gunc/run/environment.yml b/modules/nf-core/gunc/run/environment.yml index d7301428db4..3a0264f4371 100644 --- a/modules/nf-core/gunc/run/environment.yml +++ b/modules/nf-core/gunc/run/environment.yml @@ -1,5 +1,6 @@ channels: - conda-forge - bioconda + dependencies: - - bioconda::gunc=1.0.5 + - bioconda::gunc=1.0.6 diff --git a/modules/nf-core/gunc/run/main.nf b/modules/nf-core/gunc/run/main.nf index ab5ec54ba29..9ee614e4c71 100644 --- a/modules/nf-core/gunc/run/main.nf +++ b/modules/nf-core/gunc/run/main.nf @@ -4,11 +4,11 @@ process GUNC_RUN { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gunc:1.0.5--pyhdfd78af_0' : - 'biocontainers/gunc:1.0.5--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/gunc:1.0.6--pyhdfd78af_0' : + 'biocontainers/gunc:1.0.6--pyhdfd78af_0' }" input: - tuple val(meta), path(fasta) + tuple val(meta), path(fasta_files, stageAs: 'input_files/*') path(db) output: @@ -23,9 +23,10 @@ process GUNC_RUN { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ + ls input_files/* > input_files.txt gunc \\ run \\ - --input_fasta $fasta \\ + --input_file input_files.txt \\ --db_file $db \\ --threads $task.cpus \\ $args @@ -35,4 +36,14 @@ process GUNC_RUN { gunc: \$( gunc --version ) END_VERSIONS """ + + stub: + """ + touch maxCSS_level.tsv all_levels.tsv + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + gunc: \$( gunc --version ) + END_VERSIONS + """ } diff --git a/modules/nf-core/gunc/run/meta.yml b/modules/nf-core/gunc/run/meta.yml index 63f437f363b..3ecc0b74daa 100644 --- a/modules/nf-core/gunc/run/meta.yml +++ b/modules/nf-core/gunc/run/meta.yml @@ -22,9 +22,9 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - fasta: + - fasta_files: type: file - description: FASTA file containing contig (bins) + description: A list of FASTA files containing contig (bins) pattern: "*.fa" - - db: type: file diff --git a/modules/nf-core/gunc/run/tests/main.nf.test b/modules/nf-core/gunc/run/tests/main.nf.test new file mode 100644 index 00000000000..c1659f0c521 --- /dev/null +++ b/modules/nf-core/gunc/run/tests/main.nf.test @@ -0,0 +1,96 @@ +nextflow_process { + + name "Test Process GUNC_RUN" + script "../main.nf" + process "GUNC_RUN" + + tag "modules_nfcore" + tag "modules" + tag "gunc" + tag "gunc/run" + tag "gunc/downloaddb" + + // commented out because GitHub runners are not able to run this test + // test("gunc - run") { + + // setup { + // run("GUNC_DOWNLOADDB") { + // script "../../downloaddb/main.nf" + // process { + // """ + // input[0] = 'progenomes' + // """ + // } + // } + // } + + // when { + // params { + // outdir = "${launchDir}/tests/results" + // } + // process { + // """ + // input[0] = [ + // [id: 'test'], + // [file( + // params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', + // checkIfExists: true + // )] + // ] + // input[1] = GUNC_DOWNLOADDB.out.db + // """ + // } + // } + + // then { + // assertAll( + // { assert process.success }, + // { assert snapshot(process.out).match() } + // ) + // } + + // } + + test("gunc - run - stub") { + + options "-stub" + + setup { + run("GUNC_DOWNLOADDB") { + script "../../downloaddb/main.nf" + process { + """ + input[0] = 'progenomes' + """ + } + } + } + + when { + params { + outdir = "${launchDir}/tests/results" + } + process { + """ + input[0] = [ + [id: 'test'], + [file( + params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fasta/contigs.fasta', + checkIfExists: true + )] + ] + input[1] = GUNC_DOWNLOADDB.out.db + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + + } + +} \ No newline at end of file diff --git a/modules/nf-core/gunc/run/tests/main.nf.test.snap b/modules/nf-core/gunc/run/tests/main.nf.test.snap new file mode 100644 index 00000000000..516425c8ee0 --- /dev/null +++ b/modules/nf-core/gunc/run/tests/main.nf.test.snap @@ -0,0 +1,90 @@ +{ + "gunc - run - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "maxCSS_level.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "all_levels.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,2ee4942c0187a663aed4b66af3bead6a" + ], + "all_levels_tsv": [ + [ + { + "id": "test" + }, + "all_levels.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "maxcss_level_tsv": [ + [ + { + "id": "test" + }, + "maxCSS_level.tsv:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,2ee4942c0187a663aed4b66af3bead6a" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-21T17:29:46.904708749" + }, + "gunc - run": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "GUNC.progenomes_2.1.maxCSS_level.tsv:md5,938826458a44404d0bf2e7cb4edde405" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,2ee4942c0187a663aed4b66af3bead6a" + ], + "all_levels_tsv": [ + + ], + "maxcss_level_tsv": [ + [ + { + "id": "test" + }, + "GUNC.progenomes_2.1.maxCSS_level.tsv:md5,938826458a44404d0bf2e7cb4edde405" + ] + ], + "versions": [ + "versions.yml:md5,2ee4942c0187a663aed4b66af3bead6a" + ] + } + ], + "meta": { + "nf-test": "0.9.2", + "nextflow": "24.10.0" + }, + "timestamp": "2024-11-22T10:12:03.813571948" + } +} \ No newline at end of file diff --git a/modules/nf-core/gunc/run/tests/tags.yml b/modules/nf-core/gunc/run/tests/tags.yml new file mode 100644 index 00000000000..0af9644423f --- /dev/null +++ b/modules/nf-core/gunc/run/tests/tags.yml @@ -0,0 +1,3 @@ +gunc/run: + - modules/nf-core/gunc/run/** + - modules/nf-core/gunc/downloaddb/** diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 4ea995efdb8..1115734a7d5 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -236,12 +236,6 @@ gridss/gridssgenerateponbedpe: gsea/gsea: - modules/nf-core/gsea/gsea/** - tests/modules/nf-core/gsea/gsea/** -gunc/mergecheckm: - - modules/nf-core/gunc/mergecheckm/** - - tests/modules/nf-core/gunc/mergecheckm/** -gunc/run: - - modules/nf-core/gunc/run/** - - tests/modules/nf-core/gunc/run/** hicexplorer/hicpca: - modules/nf-core/hicexplorer/hicpca/** - tests/modules/nf-core/hicexplorer/hicpca/** From 3628d826c68eea367143e403412133054f607650 Mon Sep 17 00:00:00 2001 From: Usman Rashid Date: Wed, 27 Nov 2024 10:15:48 +1300 Subject: [PATCH 6/6] Added subworkflow fasta_gxf_busco_plot (#7051) * Added subworkflow fasta_gxf_busco_plot * Update subworkflows/nf-core/fasta_gxf_busco_plot/main.nf Co-authored-by: Fernando Duarte <123090819+FernandoDuarteF@users.noreply.github.com> * Update subworkflows/nf-core/fasta_gxf_busco_plot/main.nf Co-authored-by: Fernando Duarte <123090819+FernandoDuarteF@users.noreply.github.com> * Update subworkflows/nf-core/fasta_gxf_busco_plot/main.nf Co-authored-by: Fernando Duarte <123090819+FernandoDuarteF@users.noreply.github.com> * Update subworkflows/nf-core/fasta_gxf_busco_plot/main.nf Co-authored-by: Fernando Duarte <123090819+FernandoDuarteF@users.noreply.github.com> * Fixed linting and updated snapshot * Applied suggestions --------- Co-authored-by: Fernando Duarte <123090819+FernandoDuarteF@users.noreply.github.com> --- .../nf-core/fasta_gxf_busco_plot/main.nf | 172 ++++++++++++ .../nf-core/fasta_gxf_busco_plot/meta.yml | 131 +++++++++ .../fasta_gxf_busco_plot/tests/main.nf.test | 114 ++++++++ .../tests/main.nf.test.snap | 255 ++++++++++++++++++ .../tests/nextflow.config | 5 + 5 files changed, 677 insertions(+) create mode 100644 subworkflows/nf-core/fasta_gxf_busco_plot/main.nf create mode 100644 subworkflows/nf-core/fasta_gxf_busco_plot/meta.yml create mode 100644 subworkflows/nf-core/fasta_gxf_busco_plot/tests/main.nf.test create mode 100644 subworkflows/nf-core/fasta_gxf_busco_plot/tests/main.nf.test.snap create mode 100644 subworkflows/nf-core/fasta_gxf_busco_plot/tests/nextflow.config diff --git a/subworkflows/nf-core/fasta_gxf_busco_plot/main.nf b/subworkflows/nf-core/fasta_gxf_busco_plot/main.nf new file mode 100644 index 00000000000..a04c722cfe0 --- /dev/null +++ b/subworkflows/nf-core/fasta_gxf_busco_plot/main.nf @@ -0,0 +1,172 @@ +include { BUSCO_BUSCO as BUSCO_ASSEMBLY } from '../../../modules/nf-core/busco/busco/main' +include { BUSCO_GENERATEPLOT as PLOT_ASSEMBLY } from '../../../modules/nf-core/busco/generateplot/main' +include { GFFREAD as EXTRACT_PROTEINS } from '../../../modules/nf-core/gffread/main' +include { BUSCO_BUSCO as BUSCO_ANNOTATION } from '../../../modules/nf-core/busco/busco/main' +include { BUSCO_GENERATEPLOT as PLOT_ANNOTATION } from '../../../modules/nf-core/busco/generateplot/main' + +workflow FASTA_GXF_BUSCO_PLOT { + + take: + ch_fasta // channel: [ val(meta), fasta ] + ch_gxf // channel: [ val(meta2), gxf ]; gxf ~ gff | gff3 | gtf + // + // meta and meta2 should have same id + + val_mode // val(mode); BUSCO mode to apply to ch_fasta + // - genome, for genome assemblies (DNA) + // - transcriptome, for transcriptome assemblies (DNA) + // - proteins, for annotated gene sets (protein) + // + // If mode is genome, annotations from ch_gxf are evaluated with + // mode proteins, otherwise, evaluation of the annotations is skipped + // + val_lineages // [ val(lineage) ] + val_busco_lineages_path // val(path); Optional; Set to [] if not needed + val_busco_config // val(path); Optional; Set to [] if not needed + + main: + ch_versions = Channel.empty() + ch_db_path = val_busco_lineages_path + ? Channel.of(file(val_busco_lineages_path, checkIfExists: true)) + : Channel.of( [ [] ] ) + ch_config_path = val_busco_config + ? Channel.of(file(val_busco_config, checkIfExists: true)) + : Channel.of( [ [] ] ) + + // MODULE: BUSCO_BUSCO as BUSCO_ASSEMBLY + ch_busco_assembly_inputs = ch_fasta + | combine( + Channel.of(val_mode) + ) + | combine( + Channel.fromList(val_lineages) + ) + | map { meta, fasta, mode, lineage -> + [ + meta + [ mode:mode, lineage:lineage ], + fasta, mode, lineage + ] + } + | combine( + ch_db_path + ) + | combine( + ch_config_path + ) + + BUSCO_ASSEMBLY( + ch_busco_assembly_inputs.map { meta, fasta, _mode, _lineage, _db, _config -> [ meta, fasta ] }, + ch_busco_assembly_inputs.map { _meta, _fasta, mode, _lineage, _db, _config -> mode }, + ch_busco_assembly_inputs.map { _meta, _fasta, _mode, lineage, _db, _config -> lineage }, + ch_busco_assembly_inputs.map { _meta, _fasta, _mode, _lineage, db, _config -> db }, + ch_busco_assembly_inputs.map { _meta, _fasta, _mode, _lineage, _db, config -> config } + ) + + ch_assembly_batch_summary = BUSCO_ASSEMBLY.out.batch_summary + ch_assembly_short_summaries_txt = BUSCO_ASSEMBLY.out.short_summaries_txt + ch_assembly_short_summaries_json = BUSCO_ASSEMBLY.out.short_summaries_json + ch_assembly_full_table = BUSCO_ASSEMBLY.out.full_table + ch_versions = ch_versions.mix(BUSCO_ASSEMBLY.out.versions.first()) + + // MODULE: BUSCO_GENERATEPLOT as PLOT_ASSEMBLY + ch_assembly_plot_summary = ch_assembly_short_summaries_txt + | map { meta, txt -> + def lineage_name = meta.lineage - '_odb' + [ + "short_summary.specific.${meta.lineage}.${meta.id}_${lineage_name}.txt", + txt.text + ] + } + | collectFile + + PLOT_ASSEMBLY( ch_assembly_plot_summary.collect() ) + + ch_assembly_png = PLOT_ASSEMBLY.out.png + ch_versions = ch_versions.mix(PLOT_ASSEMBLY.out.versions) + + // MODULE: GFFREAD as EXTRACT_PROTEINS + ch_gffread_inputs = val_mode !in [ 'geno', 'genome' ] + ? Channel.empty() + : ch_fasta + | map { meta, fasta -> [ meta.id, meta, fasta ] } + | join( + ch_gxf.map { meta2, gxf -> [ meta2.id, gxf ] } + // Join with matching annotation + // to allow one annotations per fasta + ) + | map { _id, meta, fasta, gxf -> [ meta, gxf, fasta ] } + EXTRACT_PROTEINS( + ch_gffread_inputs.map { meta, gxf, _fasta -> [ meta, gxf ] }, + ch_gffread_inputs.map { _meta, _gxf, fasta -> fasta } + ) + + ch_proteins = EXTRACT_PROTEINS.out.gffread_fasta + ch_versions = ch_versions.mix(EXTRACT_PROTEINS.out.versions.first()) + + // MODULE: BUSCO_BUSCO as BUSCO_ANNOTATION + ch_busco_annotation_inputs = ch_proteins + | combine( + Channel.of('proteins') + ) + | combine( + Channel.fromList(val_lineages) + ) + | map { meta, fasta, mode, lineage -> + [ + meta + [ mode:mode, lineage:lineage ], + fasta, mode, lineage + ] + } + | combine( + ch_db_path + ) + | combine( + ch_config_path + ) + + BUSCO_ANNOTATION( + ch_busco_annotation_inputs.map { meta, fasta, _mode, _lineage, _db, _config -> [ meta, fasta ] }, + ch_busco_annotation_inputs.map { _meta, _fasta, mode, _lineage, _db, _config -> mode }, + ch_busco_annotation_inputs.map { _meta, _fasta, _mode, lineage, _db, _config -> lineage }, + ch_busco_annotation_inputs.map { _meta, _fasta, _mode, _lineage, db, _config -> db }, + ch_busco_annotation_inputs.map { _meta, _fasta, _mode, _lineage, _db, config -> config } + ) + + ch_annotation_batch_summary = BUSCO_ANNOTATION.out.batch_summary + ch_annotation_short_summaries_txt = BUSCO_ANNOTATION.out.short_summaries_txt + ch_annotation_short_summaries_json = BUSCO_ANNOTATION.out.short_summaries_json + ch_annotation_full_table = BUSCO_ANNOTATION.out.full_table + ch_versions = ch_versions.mix(BUSCO_ANNOTATION.out.versions.first()) + + // MODULE: BUSCO_GENERATEPLOT as PLOT_ANNOTATION + ch_annotation_plot_summary = ch_annotation_short_summaries_txt + | map { meta, txt -> + def lineage_name = meta.lineage - '_odb' + [ + "short_summary.specific.${meta.lineage}.${meta.id}_${lineage_name}.proteins.txt", + txt.text + ] + } + | collectFile + + PLOT_ANNOTATION( ch_annotation_plot_summary.collect() ) + + ch_annotation_png = PLOT_ANNOTATION.out.png + ch_versions = ch_versions.mix(PLOT_ANNOTATION.out.versions) + + + emit: + assembly_batch_summary = ch_assembly_batch_summary // channel: [ meta3, txt ]; meta3 ~ meta + [ val(mode), val(lineage) ] + assembly_short_summaries_txt = ch_assembly_short_summaries_txt // channel: [ meta3, txt ] + assembly_short_summaries_json = ch_assembly_short_summaries_json // channel: [ meta3, json ] + assembly_full_table = ch_assembly_full_table // channel: [ meta3, tsv ] + assembly_plot_summary_txt = ch_assembly_plot_summary // channel: [ text ] + assembly_png = ch_assembly_png // channel: [ png ] + annotation_batch_summary = ch_annotation_batch_summary // channel: [ meta3, txt ] + annotation_short_summaries_txt = ch_annotation_short_summaries_txt // channel: [ meta3, txt ] + annotation_short_summaries_json = ch_annotation_short_summaries_json // channel: [ meta3, json ] + annotation_full_table = ch_annotation_full_table // channel: [ meta3, tsv ] + annotation_plot_summary_txt = ch_annotation_plot_summary // channel: [ txt ] + annotation_png = ch_annotation_png // channel: [ png ] + versions = ch_versions // channel: [ versions.yml ] +} diff --git a/subworkflows/nf-core/fasta_gxf_busco_plot/meta.yml b/subworkflows/nf-core/fasta_gxf_busco_plot/meta.yml new file mode 100644 index 00000000000..bf0e437f326 --- /dev/null +++ b/subworkflows/nf-core/fasta_gxf_busco_plot/meta.yml @@ -0,0 +1,131 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/subworkflows/yaml-schema.json +name: "fasta_gxf_busco_plot" +description: | + Runs BUSCO for input assemblies and their annotations in GFF/GFF3/GTF format, and creates summary plots using `BUSCO/generate_plot.py` script +keywords: + - genome + - annotation + - busco + - plot +components: + - busco/busco + - busco/generateplot + - gffread +input: + - ch_fasta: + type: file + description: | + Channel containing FASTA files + Structure:[ val(meta), fasta ] + pattern: "*.{fa,faa,fsa,fas,fasta}(.gz)?" + - ch_gxf: + type: file + description: | + Channel containing GFF/GFF3/GTF files + Structure:[ val(meta2), gxf ] + pattern: "*.{gff,gff3,gtf}" + - val_mode: + type: string + description: | + String containing BUSCO mode to apply to ch_fasta files + Structure:val(mode) + - val_lineages: + type: array + description: | + Array of strings representing BUSCO lineage datasets + Structure:[ val(lineage) ] + - val_busco_lineages_path: + type: path + description: | + Path where BUSCO lineages are located or downloaded if not already there. If this input is `[]`, + BUSCO will download the datasets in the task work directory + Structure:val(busco_lineages_path) + - val_busco_config: + type: path + description: | + Path to BUSCO config. It is optional and can be set to `[]` + Structure:val(busco_config) +output: + - assembly_batch_summary: + type: file + description: | + Channel containing BUSCO batch summaries corresponding to fasta files + Structure: [ val(meta), txt ] + pattern: "*.txt" + - assembly_short_summaries_txt: + type: file + description: | + Channel containing BUSCO short summaries corresponding to fasta files + Structure: [ val(meta), txt ] + pattern: "*.txt" + - assembly_short_summaries_json: + type: file + description: | + Channel containing BUSCO short summaries corresponding to fasta files + Structure: [ val(meta), json ] + pattern: "*.json" + - assembly_full_table: + description: | + Channel containing complete results in a tabular format with scores and lengths of BUSCO matches, + and coordinates (for genome mode) or gene/protein IDs (for transcriptome or protein modes) + Structure: [ val(meta), tsv ] + pattern: "*.tsv" + - assembly_plot_summary_txt: + type: file + description: | + Channel containing BUSCO short summaries corresponding to fasta files renamed to include lineage in sample id + Structure: [ txt ] + pattern: "*.txt" + - assembly_png: + type: file + description: | + Channel containing summary plot for assemblies + Structure: png + pattern: "*.png" + - annotation_batch_summary: + type: file + description: | + Channel containing BUSCO batch summaries corresponding to annotation files + Structure: [ val(meta), txt ] + pattern: "*.txt" + - annotation_short_summaries_txt: + type: file + description: | + Channel containing BUSCO short summaries corresponding to annotation files + Structure: [ val(meta), txt ] + pattern: "*.txt" + - annotation_short_summaries_json: + type: file + description: | + Channel containing BUSCO short summaries corresponding to annotation files + Structure: [ val(meta), json ] + pattern: "*.json" + - annotation_full_table: + description: | + Channel containing complete results in a tabular format with scores and lengths of BUSCO matches, + protein IDs in protein mode + Structure: [ val(meta), tsv ] + pattern: "*.tsv" + - annotation_plot_summary_txt: + type: file + description: | + Channel containing BUSCO short summaries corresponding to annotation files renamed to include lineage in sample id + Structure: [ txt ] + pattern: "*.txt" + - annotation_png: + type: file + description: | + Channel containing summary plot for annotations + Structure: png + pattern: "*.png" + - versions: + type: file + description: | + File containing software versions + Structure: [ path(versions.yml) ] + pattern: "versions.yml" +authors: + - "@GallVp" +maintainers: + - "@GallVp" + - "@FernandoDuarteF" diff --git a/subworkflows/nf-core/fasta_gxf_busco_plot/tests/main.nf.test b/subworkflows/nf-core/fasta_gxf_busco_plot/tests/main.nf.test new file mode 100644 index 00000000000..0154f9c1476 --- /dev/null +++ b/subworkflows/nf-core/fasta_gxf_busco_plot/tests/main.nf.test @@ -0,0 +1,114 @@ +nextflow_workflow { + + name "Test Subworkflow FASTA_GXF_BUSCO_PLOT" + script "../main.nf" + workflow "FASTA_GXF_BUSCO_PLOT" + config './nextflow.config' + + tag "subworkflows" + tag "subworkflows_nfcore" + tag "subworkflows/fasta_gxf_busco_plot" + tag "busco" + tag "busco/busco" + tag "busco/generateplot" + tag "gffread" + + test("candidatus_portiera_aleyrodidarum - bacteroides_fragilis - genome") { + + when { + + params { + extract_proteins_args = '-y' + } + + workflow { + """ + input[0] = Channel.of( + [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/genome.fasta', checkIfExists: true) + ], + [ + [ id:'test2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) + ] + ) + input[1] = Channel.of( + [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test1.gff', checkIfExists: true) + ] + ) + input[2] = 'genome' + input[3] = [ 'bacteria_odb10', 'archaea_odb10' ] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot( + workflow.out.assembly_batch_summary, + workflow.out.annotation_batch_summary, + workflow.out.versions, + ).match() + }, + + { assert workflow.out.assembly_png != null }, + { assert workflow.out.annotation_png != null }, + + { assert workflow.out.assembly_short_summaries_json != null }, + { assert workflow.out.assembly_short_summaries_txt != null }, + { assert workflow.out.annotation_short_summaries_json != null }, + { assert workflow.out.annotation_short_summaries_txt != null } + ) + } + } + + test("candidatus_portiera_aleyrodidarum - bacteroides_fragilis - genome - stub") { + + options '-stub' + + when { + + params { + extract_proteins_args = '-y' + } + + workflow { + """ + input[0] = Channel.of( + [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/genome.fasta', checkIfExists: true) + ], + [ + [ id:'test2' ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/genome/genome.fna.gz', checkIfExists: true) + ] + ) + input[1] = Channel.of( + [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/prokaryotes/candidatus_portiera_aleyrodidarum/genome/gff/test1.gff', checkIfExists: true) + ] + ) + input[2] = 'genome' + input[3] = [ 'bacteria_odb10', 'archaea_odb10' ] + input[4] = [] + input[5] = [] + """ + } + } + + then { + assertAll( + { assert workflow.success}, + { assert snapshot(workflow.out).match()} + ) + } + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/fasta_gxf_busco_plot/tests/main.nf.test.snap b/subworkflows/nf-core/fasta_gxf_busco_plot/tests/main.nf.test.snap new file mode 100644 index 00000000000..89604dc25c0 --- /dev/null +++ b/subworkflows/nf-core/fasta_gxf_busco_plot/tests/main.nf.test.snap @@ -0,0 +1,255 @@ +{ + "candidatus_portiera_aleyrodidarum - bacteroides_fragilis - genome - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "mode": "genome", + "lineage": "archaea_odb10" + }, + "test-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test", + "mode": "genome", + "lineage": "bacteria_odb10" + }, + "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test2", + "mode": "genome", + "lineage": "archaea_odb10" + }, + "test2-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test2", + "mode": "genome", + "lineage": "bacteria_odb10" + }, + "test2-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + + ], + "10": [ + + ], + "11": [ + + ], + "12": [ + "versions.yml:md5,36b11c442943567e471af0abd474a10b", + "versions.yml:md5,9435355f913e283f60b4fb7ef77dd52a", + "versions.yml:md5,e9d65e2f2f13175e99c5b7f4ae1013b9" + ], + "2": [ + + ], + "3": [ + + ], + "4": [ + + ], + "5": [ + + ], + "6": [ + [ + { + "id": "test", + "mode": "proteins", + "lineage": "archaea_odb10" + }, + "test-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test", + "mode": "proteins", + "lineage": "bacteria_odb10" + }, + "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "7": [ + + ], + "8": [ + + ], + "9": [ + + ], + "annotation_batch_summary": [ + [ + { + "id": "test", + "mode": "proteins", + "lineage": "archaea_odb10" + }, + "test-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test", + "mode": "proteins", + "lineage": "bacteria_odb10" + }, + "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "annotation_full_table": [ + + ], + "annotation_plot_summary_txt": [ + + ], + "annotation_png": [ + + ], + "annotation_short_summaries_json": [ + + ], + "annotation_short_summaries_txt": [ + + ], + "assembly_batch_summary": [ + [ + { + "id": "test", + "mode": "genome", + "lineage": "archaea_odb10" + }, + "test-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test", + "mode": "genome", + "lineage": "bacteria_odb10" + }, + "test-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test2", + "mode": "genome", + "lineage": "archaea_odb10" + }, + "test2-archaea_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ], + [ + { + "id": "test2", + "mode": "genome", + "lineage": "bacteria_odb10" + }, + "test2-bacteria_odb10-busco.batch_summary.txt:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "assembly_full_table": [ + + ], + "assembly_plot_summary_txt": [ + + ], + "assembly_png": [ + + ], + "assembly_short_summaries_json": [ + + ], + "assembly_short_summaries_txt": [ + + ], + "versions": [ + "versions.yml:md5,36b11c442943567e471af0abd474a10b", + "versions.yml:md5,9435355f913e283f60b4fb7ef77dd52a", + "versions.yml:md5,e9d65e2f2f13175e99c5b7f4ae1013b9" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.10.1" + }, + "timestamp": "2024-11-25T10:31:03.980517" + }, + "candidatus_portiera_aleyrodidarum - bacteroides_fragilis - genome": { + "content": [ + [ + [ + { + "id": "test", + "mode": "genome", + "lineage": "archaea_odb10" + }, + "test-archaea_odb10-busco.batch_summary.txt:md5,1397d74518a776ad75b16a843bc5b6c1" + ], + [ + { + "id": "test", + "mode": "genome", + "lineage": "bacteria_odb10" + }, + "test-bacteria_odb10-busco.batch_summary.txt:md5,a1186bc25448ac1949bf7790810f7161" + ], + [ + { + "id": "test2", + "mode": "genome", + "lineage": "archaea_odb10" + }, + "test2-archaea_odb10-busco.batch_summary.txt:md5,946582b353a8dba7d6452a71856eca06" + ], + [ + { + "id": "test2", + "mode": "genome", + "lineage": "bacteria_odb10" + }, + "test2-bacteria_odb10-busco.batch_summary.txt:md5,21b3fb771cf36be917cc451540d999be" + ] + ], + [ + [ + { + "id": "test", + "mode": "proteins", + "lineage": "archaea_odb10" + }, + "test-archaea_odb10-busco.batch_summary.txt:md5,95172bd5b1a30e632fc79084ea0ca585" + ], + [ + { + "id": "test", + "mode": "proteins", + "lineage": "bacteria_odb10" + }, + "test-bacteria_odb10-busco.batch_summary.txt:md5,995127c0caecb36205dbf21aa2f9f8a8" + ] + ], + [ + "versions.yml:md5,05d8022e3afb0d5642ed17147b991730", + "versions.yml:md5,36b11c442943567e471af0abd474a10b", + "versions.yml:md5,53987b35fc275297efdaf525937fdca3", + "versions.yml:md5,9435355f913e283f60b4fb7ef77dd52a", + "versions.yml:md5,e9d65e2f2f13175e99c5b7f4ae1013b9" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-05-13T16:39:04.376704" + } +} \ No newline at end of file diff --git a/subworkflows/nf-core/fasta_gxf_busco_plot/tests/nextflow.config b/subworkflows/nf-core/fasta_gxf_busco_plot/tests/nextflow.config new file mode 100644 index 00000000000..12b9956c2b2 --- /dev/null +++ b/subworkflows/nf-core/fasta_gxf_busco_plot/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: EXTRACT_PROTEINS { + ext.args = params.extract_proteins_args + } +}