diff --git a/modules/nf-core/picard/cleansam/meta.yml b/modules/nf-core/picard/cleansam/meta.yml index ae98e2d2249..a74fe2e100d 100644 --- a/modules/nf-core/picard/cleansam/meta.yml +++ b/modules/nf-core/picard/cleansam/meta.yml @@ -21,7 +21,7 @@ input: description: | Groovy Map containing sample information e.g. [ id:'test', single_end:false ] - - sam: + - bam: type: file description: BAM file pattern: "*.{bam}" @@ -35,7 +35,7 @@ output: type: file description: File containing software versions pattern: "versions.yml" - - sam: + - bam: type: file description: Cleaned BAM file pattern: "*.{bam}" diff --git a/modules/nf-core/picard/cleansam/tests/main.nf.test b/modules/nf-core/picard/cleansam/tests/main.nf.test new file mode 100644 index 00000000000..5d80739a472 --- /dev/null +++ b/modules/nf-core/picard/cleansam/tests/main.nf.test @@ -0,0 +1,40 @@ + +nextflow_process { + + name "Test Process PICARD_CLEANSAM" + script "../main.nf" + process "PICARD_CLEANSAM" + config "./nextflow.config" + + tag "modules" + tag "modules_nfcore" + tag "picard" + tag "picard/cleansam" + + test("test-picard-cleansam") { + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:true ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.bam', checkIfExists: true) + ] + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot( + bam(process.out.bam[0][1]).getReadsMD5(), + process.out.versions + ).match() + } + ) + } + } + +} diff --git a/modules/nf-core/picard/cleansam/tests/main.nf.test.snap b/modules/nf-core/picard/cleansam/tests/main.nf.test.snap new file mode 100644 index 00000000000..63e2927e57a --- /dev/null +++ b/modules/nf-core/picard/cleansam/tests/main.nf.test.snap @@ -0,0 +1,15 @@ +{ + "test-picard-cleansam": { + "content": [ + "798439cbd7fd81cbcc5078022dc5479d", + [ + "versions.yml:md5,f99b648dc3d150a0561094e3a142ee22" + ] + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "24.04.4" + }, + "timestamp": "2024-08-26T10:36:05.525364" + } +} \ No newline at end of file diff --git a/tests/modules/nf-core/picard/cleansam/nextflow.config b/modules/nf-core/picard/cleansam/tests/nextflow.config similarity index 50% rename from tests/modules/nf-core/picard/cleansam/nextflow.config rename to modules/nf-core/picard/cleansam/tests/nextflow.config index 7fbfaaa64f0..06a6daceb45 100644 --- a/tests/modules/nf-core/picard/cleansam/nextflow.config +++ b/modules/nf-core/picard/cleansam/tests/nextflow.config @@ -1,7 +1,4 @@ process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - withName: 'PICARD_CLEANSAM'{ ext.prefix = { "${meta.id}.cleaned"} } diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index d8890714e4b..311cb5c8fc8 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -941,9 +941,6 @@ peka: phyloflash: - modules/nf-core/phyloflash/** - tests/modules/nf-core/phyloflash/** -picard/cleansam: - - modules/nf-core/picard/cleansam/** - - tests/modules/nf-core/picard/cleansam/** picard/collectinsertsizemetrics: - modules/nf-core/picard/collectinsertsizemetrics/** - tests/modules/nf-core/picard/collectinsertsizemetrics/** diff --git a/tests/modules/nf-core/picard/cleansam/main.nf b/tests/modules/nf-core/picard/cleansam/main.nf deleted file mode 100644 index d337aca51ee..00000000000 --- a/tests/modules/nf-core/picard/cleansam/main.nf +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { PICARD_CLEANSAM } from '../../../../../modules/nf-core/picard/cleansam/main.nf' - -workflow test_picard_cleansam { - - input = [ - [ id:'test', single_end:true ], // meta map - file(params.test_data['sarscov2']['illumina']['test_single_end_bam'], checkIfExists: true) - ] - - PICARD_CLEANSAM ( input ) -} diff --git a/tests/modules/nf-core/picard/cleansam/test.yml b/tests/modules/nf-core/picard/cleansam/test.yml deleted file mode 100644 index fd80f244cae..00000000000 --- a/tests/modules/nf-core/picard/cleansam/test.yml +++ /dev/null @@ -1,18 +0,0 @@ -- name: picard cleansam test_picard_cleansam - command: nextflow run ./tests/modules/nf-core/picard/cleansam -entry test_picard_cleansam -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/picard/cleansam/nextflow.config - tags: - - picard/cleansam - - picard - files: - - path: output/picard/test.cleaned.bam - md5sum: a48f8e77a1480445efc57570c3a38a68 - - path: output/picard/versions.yml - -- name: picard cleansam test_picard_cleansam stub - command: nextflow run ./tests/modules/nf-core/picard/cleansam -entry test_picard_cleansam -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/picard/cleansam/nextflow.config -stub-run - tags: - - picard/cleansam - - picard - files: - - path: output/picard/test.cleaned.bam - - path: output/picard/versions.yml