diff --git a/modules/nf-core/angsd/docounts/meta.yml b/modules/nf-core/angsd/docounts/meta.yml index 8381091f9c6..b1eec87da70 100644 --- a/modules/nf-core/angsd/docounts/meta.yml +++ b/modules/nf-core/angsd/docounts/meta.yml @@ -12,7 +12,7 @@ tools: documentation: "http://www.popgen.dk/angsd/" tool_dev_url: "https://github.com/ANGSD/angsd" doi: "10.1186/s12859-014-0356-4" - licence: "['GPL v3, MIT']" + licence: ["GPL v3, MIT"] input: - meta: type: map diff --git a/modules/nf-core/angsd/docounts/tests/main.nf.test b/modules/nf-core/angsd/docounts/tests/main.nf.test new file mode 100644 index 00000000000..68993421b82 --- /dev/null +++ b/modules/nf-core/angsd/docounts/tests/main.nf.test @@ -0,0 +1,43 @@ + +nextflow_process { + + name "Test Process ANGSD_DOCOUNTS" + script "../main.nf" + process "ANGSD_DOCOUNTS" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "angsd" + tag "angsd/docounts" + + test("test-angsd-docounts") { + + 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.markduplicates.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai', checkIfExists: true), + [] + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.counts[0][1]).linesGzip[0..5], + file(process.out.icounts[0][1]).name, + path(process.out.pos[0][1]).linesGzip[0..5], + process.out.versions + ).match() } + ) + } + } + +} diff --git a/modules/nf-core/angsd/docounts/tests/main.nf.test.snap b/modules/nf-core/angsd/docounts/tests/main.nf.test.snap new file mode 100644 index 00000000000..9a282b158a2 --- /dev/null +++ b/modules/nf-core/angsd/docounts/tests/main.nf.test.snap @@ -0,0 +1,31 @@ +{ + "test-angsd-docounts": { + "content": [ + [ + "ind0TotDepth\t", + "1\t", + "1\t", + "1\t", + "1\t", + "1\t" + ], + "test.icnts.gz", + [ + "chr\tpos\ttotDepth", + "chr21\t5011214\t1", + "chr21\t5011215\t1", + "chr21\t5011216\t1", + "chr21\t5011217\t1", + "chr21\t5011218\t1" + ], + [ + "versions.yml:md5,211a931297225fefaa891d02b755e215" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-21T15:43:59.931683" + } +} \ No newline at end of file diff --git a/modules/nf-core/angsd/docounts/tests/nextflow.config b/modules/nf-core/angsd/docounts/tests/nextflow.config new file mode 100644 index 00000000000..71db903efbf --- /dev/null +++ b/modules/nf-core/angsd/docounts/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: ANGSD_DOCOUNTS { + ext.args = "-iCounts 1 -doDepth -dumpCounts 2" + } +} diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 89983665502..c7991010d0b 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -7,9 +7,6 @@ amps: angsd/contamination: - modules/nf-core/angsd/contamination/** - tests/modules/nf-core/angsd/contamination/** -angsd/docounts: - - modules/nf-core/angsd/docounts/** - - tests/modules/nf-core/angsd/docounts/** arcashla/extract: - modules/nf-core/arcashla/extract/** - tests/modules/nf-core/arcashla/extract/** diff --git a/tests/modules/nf-core/angsd/docounts/main.nf b/tests/modules/nf-core/angsd/docounts/main.nf deleted file mode 100644 index 2188a097c03..00000000000 --- a/tests/modules/nf-core/angsd/docounts/main.nf +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { ANGSD_DOCOUNTS } from '../../../../../modules/nf-core/angsd/docounts/main.nf' - -workflow test_angsd_docounts { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam'], checkIfExists: true), - file(params.test_data['homo_sapiens']['illumina']['test_paired_end_markduplicates_sorted_bam_bai'], checkIfExists: true), - [] - ] - - ANGSD_DOCOUNTS ( input ) -} diff --git a/tests/modules/nf-core/angsd/docounts/nextflow.config b/tests/modules/nf-core/angsd/docounts/nextflow.config deleted file mode 100644 index 600e1be048f..00000000000 --- a/tests/modules/nf-core/angsd/docounts/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: ANGSD_DOCOUNTS { - ext.args = "-iCounts 1 -doDepth -dumpCounts 2" - } - -} diff --git a/tests/modules/nf-core/angsd/docounts/test.yml b/tests/modules/nf-core/angsd/docounts/test.yml deleted file mode 100644 index eea06d7bcc5..00000000000 --- a/tests/modules/nf-core/angsd/docounts/test.yml +++ /dev/null @@ -1,11 +0,0 @@ -- name: angsd docounts test_angsd_docounts - command: nextflow run ./tests/modules/nf-core/angsd/docounts -entry test_angsd_docounts -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/angsd/docounts/nextflow.config - tags: - - angsd/docounts - - angsd - files: - - path: output/angsd/test.counts.gz - contains: ["ind0TotDepth"] - - path: output/angsd/test.icnts.gz - - path: output/angsd/test.pos.gz - contains: ["chr pos totDepth"]