diff --git a/modules/nf-core/pairtools/dedup/tests/main.nf.test b/modules/nf-core/pairtools/dedup/tests/main.nf.test new file mode 100644 index 00000000000..41bbfabb45c --- /dev/null +++ b/modules/nf-core/pairtools/dedup/tests/main.nf.test @@ -0,0 +1,39 @@ + +nextflow_process { + + name "Test Process PAIRTOOLS_DEDUP" + script "../main.nf" + process "PAIRTOOLS_DEDUP" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "pairtools" + tag "pairtools/dedup" + + test("test-pairtools-dedup") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pairtools/mock.4dedup.pairsam', checkIfExists: true) ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.pairs[0][1]).linesGzip[3..7], + process.out.stat, + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/pairtools/dedup/tests/main.nf.test.snap b/modules/nf-core/pairtools/dedup/tests/main.nf.test.snap new file mode 100644 index 00000000000..46dcf9654b7 --- /dev/null +++ b/modules/nf-core/pairtools/dedup/tests/main.nf.test.snap @@ -0,0 +1,30 @@ +{ + "test-pairtools-dedup": { + "content": [ + [ + "#genome_assembly: unknown", + "#chromosomes: chr1 chr2", + "#columns: readID chrom1 pos1 chrom2 pos2 strand1 strand2 pair_type sam1 sam2", + "readid3\tchr1\t1\tchr1\t20\t+\t+\tUU\t.\t.", + "readid5\tchr1\t1\tchr1\t25\t+\t+\tUU\t.\t." + ], + [ + [ + { + "id": "test", + "single_end": false + }, + "test.dedup.pairs.stat:md5,94682d1bc608ade150dd11993fbfd2a3" + ] + ], + [ + "versions.yml:md5,485fbdd68f35d563c8559e1afedc4c53" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T11:23:16.451408" + } +} \ No newline at end of file diff --git a/modules/nf-core/pairtools/dedup/tests/nextflow.config b/modules/nf-core/pairtools/dedup/tests/nextflow.config new file mode 100644 index 00000000000..d0cfe51f1a2 --- /dev/null +++ b/modules/nf-core/pairtools/dedup/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: PAIRTOOLS_DEDUP { + ext.prefix = { "${meta.id}.dedup" } + } +} diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index b698856bbae..e68c1f9d130 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1001,9 +1001,6 @@ paftools/sam2paf: pairix: - modules/nf-core/pairix/** - tests/modules/nf-core/pairix/** -pairtools/dedup: - - modules/nf-core/pairtools/dedup/** - - tests/modules/nf-core/pairtools/dedup/** pairtools/flip: - modules/nf-core/pairtools/flip/** - tests/modules/nf-core/pairtools/flip/** diff --git a/tests/modules/nf-core/pairtools/dedup/main.nf b/tests/modules/nf-core/pairtools/dedup/main.nf deleted file mode 100644 index 408dd02da09..00000000000 --- a/tests/modules/nf-core/pairtools/dedup/main.nf +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { PAIRTOOLS_DEDUP } from '../../../../../modules/nf-core/pairtools/dedup/main.nf' - -workflow test_pairtools_dedup { - - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['generic']['pairtools']['mock_4dedup_pairsam'], checkIfExists: true) ] - - PAIRTOOLS_DEDUP ( input ) -} diff --git a/tests/modules/nf-core/pairtools/dedup/nextflow.config b/tests/modules/nf-core/pairtools/dedup/nextflow.config deleted file mode 100644 index b47fab16594..00000000000 --- a/tests/modules/nf-core/pairtools/dedup/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: PAIRTOOLS_DEDUP { - ext.prefix = { "${meta.id}.dedup" } - } - -} diff --git a/tests/modules/nf-core/pairtools/dedup/test.yml b/tests/modules/nf-core/pairtools/dedup/test.yml deleted file mode 100644 index 722ec9f66d9..00000000000 --- a/tests/modules/nf-core/pairtools/dedup/test.yml +++ /dev/null @@ -1,10 +0,0 @@ -- name: pairtools dedup test_pairtools_dedup - command: nextflow run ./tests/modules/nf-core/pairtools/dedup -entry test_pairtools_dedup -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/pairtools/dedup/nextflow.config - tags: - - pairtools/dedup - - pairtools - files: - - path: output/pairtools/test.dedup.pairs.gz - md5sum: 7ed7436793eccc77aeacb25fbe7816aa - - path: output/pairtools/test.dedup.pairs.stat - md5sum: 94682d1bc608ade150dd11993fbfd2a3