diff --git a/modules/nf-core/atlas/call/meta.yml b/modules/nf-core/atlas/call/meta.yml index 9b1142bdd94..a07bc6a7dd7 100644 --- a/modules/nf-core/atlas/call/meta.yml +++ b/modules/nf-core/atlas/call/meta.yml @@ -12,7 +12,7 @@ tools: documentation: "https://bitbucket.org/wegmannlab/atlas/wiki/Home" tool_dev_url: "https://bitbucket.org/wegmannlab/atlas" doi: "10.1101/105346" - licence: "['GPL v3']" + licence: ["GPL v3"] input: - meta: type: map @@ -48,7 +48,7 @@ input: description: Optional tab separated text file containing 1-based list of known alleles. See atlas call documentation. pattern: "*.{txt.tsv}" - method: - type: character + type: string description: Which variant calling algorithm to use. Some may require additional parameters supplied via ext.args. Check atlas documentation. pattern: "MLE|Bayesian|allelePresence|randomBase|majorityBase" output: @@ -61,7 +61,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - bam: + - vcf: type: file description: VCF file with variant calls pattern: "*.vcf.gz" diff --git a/modules/nf-core/atlas/call/tests/main.nf.test b/modules/nf-core/atlas/call/tests/main.nf.test new file mode 100644 index 00000000000..dbd40640873 --- /dev/null +++ b/modules/nf-core/atlas/call/tests/main.nf.test @@ -0,0 +1,46 @@ + +nextflow_process { + + name "Test Process ATLAS_CALL" + script "../main.nf" + process "ATLAS_CALL" + + tag "modules" + tag "modules_nfcore" + tag "atlas" + tag "atlas/call" + + test("test-atlas-call") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + [], + [] + ] + input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) + input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) + input[3] = [] + input[4] = 'randomBase' + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.vcf[0][1]).vcf.summary, + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/atlas/call/tests/main.nf.test.snap b/modules/nf-core/atlas/call/tests/main.nf.test.snap new file mode 100644 index 00000000000..c5a406b2227 --- /dev/null +++ b/modules/nf-core/atlas/call/tests/main.nf.test.snap @@ -0,0 +1,15 @@ +{ + "test-atlas-call": { + "content": [ + "VcfFile [chromosomes=[MT192765.1], sampleCount=1, variantCount=12674, phased=true, phasedAutodetect=true]", + [ + "versions.yml:md5,abad4c906071792f8a5270fdb143fc4e" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T15:48:22.930389" + } +} \ No newline at end of file diff --git a/modules/nf-core/atlas/recal/meta.yml b/modules/nf-core/atlas/recal/meta.yml index 886e93cb4e6..47b9c9afe6d 100644 --- a/modules/nf-core/atlas/recal/meta.yml +++ b/modules/nf-core/atlas/recal/meta.yml @@ -1,15 +1,16 @@ name: "atlas_recal" -description: gives an estimation of the sequencing bias based on known invariant sites +description: Gives an estimation of the sequencing bias based on known invariant sites keywords: - sequencing_bias - ATLAS + - bias tools: - "atlas": description: "ATLAS, a suite of methods to accurately genotype and estimate genetic diversity" homepage: "https://bitbucket.org/wegmannlab/atlas/wiki/Home" documentation: "https://bitbucket.org/wegmannlab/atlas/wiki/Home" doi: "10.1101/105346" - licence: "['GPL v3']" + licence: ["GPL v3"] input: - meta: type: map diff --git a/modules/nf-core/atlas/recal/tests/main.nf.test b/modules/nf-core/atlas/recal/tests/main.nf.test new file mode 100644 index 00000000000..e03c6208b36 --- /dev/null +++ b/modules/nf-core/atlas/recal/tests/main.nf.test @@ -0,0 +1,44 @@ + +nextflow_process { + + name "Test Process ATLAS_RECAL" + script "../main.nf" + process "ATLAS_RECAL" + + tag "modules" + tag "modules_nfcore" + tag "atlas" + tag "atlas/recal" + + test("test-atlas-recal") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), + [], + [] + ] + input[1] = [] + input[2] = [] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + file(process.out.recal_patterns[0][1]).readLines()[0], + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/atlas/recal/tests/main.nf.test.snap b/modules/nf-core/atlas/recal/tests/main.nf.test.snap new file mode 100644 index 00000000000..a780f7c9b17 --- /dev/null +++ b/modules/nf-core/atlas/recal/tests/main.nf.test.snap @@ -0,0 +1,15 @@ +{ + "test-atlas-recal": { + "content": [ + "readGroup\tmate\tmodel\tquality\tposition\tcontext", + [ + "versions.yml:md5,69864cf23ffc5b0559af20e0675c4290" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T15:57:16.06295" + } +} \ No newline at end of file diff --git a/modules/nf-core/bam2fastx/bam2fastq/tests/main.nf.test b/modules/nf-core/bam2fastx/bam2fastq/tests/main.nf.test new file mode 100644 index 00000000000..0d4f80ae699 --- /dev/null +++ b/modules/nf-core/bam2fastx/bam2fastq/tests/main.nf.test @@ -0,0 +1,37 @@ + +nextflow_process { + + name "Test Process BAM2FASTX_BAM2FASTQ" + script "../main.nf" + process "BAM2FASTX_BAM2FASTQ" + + tag "modules" + tag "modules_nfcore" + tag "bam2fastx" + tag "bam2fastx/bam2fastq" + + test("test-bam2fastx-bam2fastq") { + + when { + process { + """ + input[0] = [ + [ id:'test' ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/alz.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pacbio/bam/alz.bam.pbi', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() + } + ) + } + } + +} diff --git a/modules/nf-core/bam2fastx/bam2fastq/tests/main.nf.test.snap b/modules/nf-core/bam2fastx/bam2fastq/tests/main.nf.test.snap new file mode 100644 index 00000000000..342241ef940 --- /dev/null +++ b/modules/nf-core/bam2fastx/bam2fastq/tests/main.nf.test.snap @@ -0,0 +1,35 @@ +{ + "test-bam2fastx-bam2fastq": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.fastq.gz:md5,8abf16176fd1625998ee28590e1039b1" + ] + ], + "1": [ + "versions.yml:md5,1b954947255d9b2ad16d2c523258cceb" + ], + "fastq": [ + [ + { + "id": "test" + }, + "test.fastq.gz:md5,8abf16176fd1625998ee28590e1039b1" + ] + ], + "versions": [ + "versions.yml:md5,1b954947255d9b2ad16d2c523258cceb" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T06:30:10.25178642" + } +} \ No newline at end of file diff --git a/modules/nf-core/bamtools/stats/tests/main.nf.test b/modules/nf-core/bamtools/stats/tests/main.nf.test new file mode 100644 index 00000000000..478a6f0e84d --- /dev/null +++ b/modules/nf-core/bamtools/stats/tests/main.nf.test @@ -0,0 +1,35 @@ + +nextflow_process { + + name "Test Process BAMTOOLS_STATS" + script "../main.nf" + process "BAMTOOLS_STATS" + + tag "modules" + tag "modules_nfcore" + tag "bamtools" + tag "bamtools/stats" + + test("test-bamtools-stats") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/bamtools/stats/tests/main.nf.test.snap b/modules/nf-core/bamtools/stats/tests/main.nf.test.snap new file mode 100644 index 00000000000..c12ce29e5fb --- /dev/null +++ b/modules/nf-core/bamtools/stats/tests/main.nf.test.snap @@ -0,0 +1,37 @@ +{ + "test-bamtools-stats": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.stats:md5,b7c3f01682673a652d664a2889b15b66" + ] + ], + "1": [ + "versions.yml:md5,cdecc135c35467721cc72a58b542323b" + ], + "stats": [ + [ + { + "id": "test", + "single_end": false + }, + "test.bam.stats:md5,b7c3f01682673a652d664a2889b15b66" + ] + ], + "versions": [ + "versions.yml:md5,cdecc135c35467721cc72a58b542323b" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T15:23:51.167984" + } +} \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 7e77b32cec4..e252ff3980c 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -25,30 +25,18 @@ ataqv/ataqv: ataqv/mkarv: - modules/nf-core/ataqv/mkarv/** - tests/modules/nf-core/ataqv/mkarv/** -atlas/call: - - modules/nf-core/atlas/call/** - - tests/modules/nf-core/atlas/call/** -atlas/recal: - - modules/nf-core/atlas/recal/** - - tests/modules/nf-core/atlas/recal/** atlas/splitmerge: - modules/nf-core/atlas/splitmerge/** - tests/modules/nf-core/atlas/splitmerge/** authentict/deam2cont: - modules/nf-core/authentict/deam2cont/** - tests/modules/nf-core/authentict/deam2cont/** -bam2fastx/bam2fastq: - - modules/nf-core/bam2fastx/bam2fastq/** - - tests/modules/nf-core/bam2fastx/bam2fastq/** bamtools/convert: - modules/nf-core/bamtools/convert/** - tests/modules/nf-core/bamtools/convert/** bamtools/split: - modules/nf-core/bamtools/split/** - tests/modules/nf-core/bamtools/split/** -bamtools/stats: - - modules/nf-core/bamtools/stats/** - - tests/modules/nf-core/bamtools/stats/** bamutil/trimbam: - modules/nf-core/bamutil/trimbam/** - tests/modules/nf-core/bamutil/trimbam/** diff --git a/tests/modules/nf-core/atlas/call/main.nf b/tests/modules/nf-core/atlas/call/main.nf deleted file mode 100644 index 5e2320b2c11..00000000000 --- a/tests/modules/nf-core/atlas/call/main.nf +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { ATLAS_CALL } from '../../../../../modules/nf-core/atlas/call/main.nf' - -workflow test_atlas_call { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - [], - [] - ] - fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - fai = file(params.test_data['sarscov2']['genome']['genome_fasta_fai'], checkIfExists: true) - known_alleles = [] - method = 'randomBase' - - ATLAS_CALL ( input, fasta, fai, known_alleles, method ) -} diff --git a/tests/modules/nf-core/atlas/call/nextflow.config b/tests/modules/nf-core/atlas/call/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/atlas/call/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/atlas/call/test.yml b/tests/modules/nf-core/atlas/call/test.yml deleted file mode 100644 index 78549fa3feb..00000000000 --- a/tests/modules/nf-core/atlas/call/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: atlas call test_atlas_call - command: nextflow run ./tests/modules/nf-core/atlas/call -entry test_atlas_call -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/atlas/call/nextflow.config - tags: - - atlas - - atlas/call - files: - - path: output/atlas/test.paired_end.sorted_randomBase.vcf.gz - contains: - - "##source=atlas" diff --git a/tests/modules/nf-core/atlas/recal/main.nf b/tests/modules/nf-core/atlas/recal/main.nf deleted file mode 100644 index fadda2019e6..00000000000 --- a/tests/modules/nf-core/atlas/recal/main.nf +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { ATLAS_RECAL } from '../../../../../modules/nf-core/atlas/recal/main.nf' - -workflow test_atlas_recal { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), - [], - [] - ] - alleles = [] - invariant_sites = [] - - ATLAS_RECAL ( input, alleles, invariant_sites ) -} - - diff --git a/tests/modules/nf-core/atlas/recal/nextflow.config b/tests/modules/nf-core/atlas/recal/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/atlas/recal/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/atlas/recal/test.yml b/tests/modules/nf-core/atlas/recal/test.yml deleted file mode 100644 index a18b22c01dc..00000000000 --- a/tests/modules/nf-core/atlas/recal/test.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: atlas recal test_atlas_recal - command: nextflow run ./tests/modules/nf-core/atlas/recal -entry test_atlas_recal -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/atlas/recal/nextflow.config - tags: - - atlas/recal - - atlas - files: - - path: output/atlas/test_recalibrationEM.txt - contains: ["readGroup"] diff --git a/tests/modules/nf-core/bam2fastx/bam2fastq/main.nf b/tests/modules/nf-core/bam2fastx/bam2fastq/main.nf deleted file mode 100644 index d8073765b6d..00000000000 --- a/tests/modules/nf-core/bam2fastx/bam2fastq/main.nf +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { BAM2FASTX_BAM2FASTQ } from '../../../../../modules/nf-core/bam2fastx/bam2fastq/main.nf' - -workflow test_bam2fastx_bam2fastq { - - input = [ - [ id:'test' ], // meta map - file(params.test_data['homo_sapiens']['pacbio']['alz'], checkIfExists: true), - file(params.test_data['homo_sapiens']['pacbio']['alzpbi'], checkIfExists: true) - ] - - BAM2FASTX_BAM2FASTQ ( input ) -} diff --git a/tests/modules/nf-core/bam2fastx/bam2fastq/nextflow.config b/tests/modules/nf-core/bam2fastx/bam2fastq/nextflow.config deleted file mode 100644 index 8730f1c4b93..00000000000 --- a/tests/modules/nf-core/bam2fastx/bam2fastq/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} diff --git a/tests/modules/nf-core/bam2fastx/bam2fastq/test.yml b/tests/modules/nf-core/bam2fastx/bam2fastq/test.yml deleted file mode 100644 index 18b9f144a72..00000000000 --- a/tests/modules/nf-core/bam2fastx/bam2fastq/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: bam2fastx bam2fastq test_bam2fastx_bam2fastq - command: nextflow run ./tests/modules/nf-core/bam2fastx/bam2fastq -entry test_bam2fastx_bam2fastq -c ./tests/config/nextflow.config - tags: - - bam2fastx/bam2fastq - - bam2fastx - files: - - path: output/bam2fastx/test.fastq.gz - md5sum: f0329f9ea12324c6631ac9f3712f2ca5 - - path: output/bam2fastx/versions.yml diff --git a/tests/modules/nf-core/bamtools/stats/main.nf b/tests/modules/nf-core/bamtools/stats/main.nf deleted file mode 100644 index 6adbb060bea..00000000000 --- a/tests/modules/nf-core/bamtools/stats/main.nf +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { BAMTOOLS_STATS } from '../../../../../modules/nf-core/bamtools/stats/main.nf' - -workflow test_bamtools_stats { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) - ] - - BAMTOOLS_STATS ( input ) -} diff --git a/tests/modules/nf-core/bamtools/stats/nextflow.config b/tests/modules/nf-core/bamtools/stats/nextflow.config deleted file mode 100644 index 50f50a7a357..00000000000 --- a/tests/modules/nf-core/bamtools/stats/nextflow.config +++ /dev/null @@ -1,5 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - -} \ No newline at end of file diff --git a/tests/modules/nf-core/bamtools/stats/test.yml b/tests/modules/nf-core/bamtools/stats/test.yml deleted file mode 100644 index b8bd38e44bd..00000000000 --- a/tests/modules/nf-core/bamtools/stats/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: bamtools stats test_bamtools_stats - command: nextflow run ./tests/modules/nf-core/bamtools/stats -entry test_bamtools_stats -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/bamtools/stats/nextflow.config - tags: - - bamtools - - bamtools/stats - files: - - path: output/bamtools/test.bam.stats - md5sum: b7c3f01682673a652d664a2889b15b66 - - path: output/bamtools/versions.yml