diff --git a/modules/nf-core/pairtools/sort/tests/main.nf.test b/modules/nf-core/pairtools/sort/tests/main.nf.test new file mode 100644 index 00000000000..a4e789bc58d --- /dev/null +++ b/modules/nf-core/pairtools/sort/tests/main.nf.test @@ -0,0 +1,38 @@ + +nextflow_process { + + name "Test Process PAIRTOOLS_SORT" + script "../main.nf" + process "PAIRTOOLS_SORT" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "pairtools" + tag "pairtools/sort" + + test("test-pairtools-sort") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/homo_sapiens/pairtools/mock.pairsam', checkIfExists: true) ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + path(process.out.sorted[0][1]).linesGzip[3..7], + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/pairtools/sort/tests/main.nf.test.snap b/modules/nf-core/pairtools/sort/tests/main.nf.test.snap new file mode 100644 index 00000000000..1b22f32856f --- /dev/null +++ b/modules/nf-core/pairtools/sort/tests/main.nf.test.snap @@ -0,0 +1,21 @@ +{ + "test-pairtools-sort": { + "content": [ + [ + "#genome_assembly: unknown", + "#chromosomes: : chr1 chr2 chr3", + "#chromsize: chr2 100", + "#chromsize: chr3 100", + "#chromsize: chr1 100" + ], + [ + "versions.yml:md5,6f5e6b4260ee11d35e306d2e085fb762" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-23T11:12:01.451816" + } +} \ No newline at end of file diff --git a/modules/nf-core/pairtools/sort/tests/nextflow.config b/modules/nf-core/pairtools/sort/tests/nextflow.config new file mode 100644 index 00000000000..566f8da2d56 --- /dev/null +++ b/modules/nf-core/pairtools/sort/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: PAIRTOOLS_SORT { + ext.prefix = { "${meta.id}.sorted" } + } +} diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index b698856bbae..aae32b989eb 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1019,9 +1019,6 @@ pairtools/restrict: pairtools/select: - modules/nf-core/pairtools/select/** - tests/modules/nf-core/pairtools/select/** -pairtools/sort: - - modules/nf-core/pairtools/sort/** - - tests/modules/nf-core/pairtools/sort/** pairtools/stats: - modules/nf-core/pairtools/stats/** - tests/modules/nf-core/pairtools/stats/** diff --git a/tests/modules/nf-core/pairtools/sort/main.nf b/tests/modules/nf-core/pairtools/sort/main.nf deleted file mode 100644 index 82f61cf7f4d..00000000000 --- a/tests/modules/nf-core/pairtools/sort/main.nf +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { PAIRTOOLS_SORT } from '../../../../../modules/nf-core/pairtools/sort/main.nf' - -workflow test_pairtools_sort { - - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['generic']['pairtools']['mock_pairsam'], checkIfExists: true) ] - - PAIRTOOLS_SORT ( input ) -} diff --git a/tests/modules/nf-core/pairtools/sort/nextflow.config b/tests/modules/nf-core/pairtools/sort/nextflow.config deleted file mode 100644 index dfaf60532ce..00000000000 --- a/tests/modules/nf-core/pairtools/sort/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: PAIRTOOLS_SORT { - ext.prefix = { "${meta.id}.sorted" } - } - -} diff --git a/tests/modules/nf-core/pairtools/sort/test.yml b/tests/modules/nf-core/pairtools/sort/test.yml deleted file mode 100644 index 4d5f2d81003..00000000000 --- a/tests/modules/nf-core/pairtools/sort/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: pairtools sort test_pairtools_sort - command: nextflow run ./tests/modules/nf-core/pairtools/sort -entry test_pairtools_sort -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/pairtools/sort/nextflow.config - tags: - - pairtools/sort - - pairtools - files: - - path: output/pairtools/test.sorted.pairs.gz # Not using MD5 checksum because the file includes the run paths, which are different under Conda - contains: - - "readid08\t!\t0\t!\t0\t-\t-\tWW\treadid08"