diff --git a/modules/nf-core/methyldackel/extract/environment.yml b/modules/nf-core/methyldackel/extract/environment.yml index 03f1b0201f2..02a77db1355 100644 --- a/modules/nf-core/methyldackel/extract/environment.yml +++ b/modules/nf-core/methyldackel/extract/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::methyldackel=0.6.0 + - bioconda::methyldackel=0.6.1 diff --git a/modules/nf-core/methyldackel/extract/main.nf b/modules/nf-core/methyldackel/extract/main.nf index c824b6b18d2..66b2745a68d 100644 --- a/modules/nf-core/methyldackel/extract/main.nf +++ b/modules/nf-core/methyldackel/extract/main.nf @@ -4,8 +4,8 @@ process METHYLDACKEL_EXTRACT { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/methyldackel:0.6.0--h22771d5_0' : - 'biocontainers/methyldackel:0.6.0--h22771d5_0' }" + 'https://depot.galaxyproject.org/singularity/methyldackel:0.6.1--he4a0461_7' : + 'biocontainers/methyldackel:0.6.1--he4a0461_7' }" input: tuple val(meta), path(bam), path(bai) @@ -33,4 +33,16 @@ process METHYLDACKEL_EXTRACT { methyldackel: \$(MethylDackel --version 2>&1 | cut -f1 -d" ") END_VERSIONS """ + + stub: + def args = task.ext.args ?: '' + def out_extension = args.contains('--methylKit') ? 'methylKit' : 'bedGraph' + """ + touch ${bam.baseName}_CpG.${out_extension} + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + methyldackel: \$(MethylDackel --version 2>&1 | cut -f1 -d" ") + END_VERSIONS + """ } diff --git a/modules/nf-core/methyldackel/extract/tests/main.nf.test b/modules/nf-core/methyldackel/extract/tests/main.nf.test new file mode 100644 index 00000000000..562f5c2e368 --- /dev/null +++ b/modules/nf-core/methyldackel/extract/tests/main.nf.test @@ -0,0 +1,90 @@ + +nextflow_process { + + name "Test Process METHYLDACKEL_EXTRACT" + script "../main.nf" + process "METHYLDACKEL_EXTRACT" + + tag "modules" + tag "modules_nfcore" + tag "methyldackel" + tag "methyldackel/extract" + + test("test-methyldackel-extract") { + + when { + process { + """ + input[0] = [ [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.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) + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-methyldackel-extract-methyl-kit") { + config "./nextflow.config" + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.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) + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + + test("test-methyldackel-extract-methyl-kit-stub") { + config "./nextflow.config" + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'test', single_end:false ], // meta map + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam', checkIfExists: true), + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.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) + + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + +} diff --git a/modules/nf-core/methyldackel/extract/tests/main.nf.test.snap b/modules/nf-core/methyldackel/extract/tests/main.nf.test.snap new file mode 100644 index 00000000000..64cbd76bd8c --- /dev/null +++ b/modules/nf-core/methyldackel/extract/tests/main.nf.test.snap @@ -0,0 +1,125 @@ +{ + "test-methyldackel-extract-methyl-kit": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.sorted_CpG.methylKit:md5,b1dc217909cd5f8174058c7af785f51c" + ] + ], + "2": [ + "versions.yml:md5,9e23b0c31bf0f98e9348321fe9226498" + ], + "bedgraph": [ + + ], + "methylkit": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.sorted_CpG.methylKit:md5,b1dc217909cd5f8174058c7af785f51c" + ] + ], + "versions": [ + "versions.yml:md5,9e23b0c31bf0f98e9348321fe9226498" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T20:34:17.513866" + }, + "test-methyldackel-extract-methyl-kit-stub": { + "content": [ + { + "0": [ + + ], + "1": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.sorted_CpG.methylKit:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,9e23b0c31bf0f98e9348321fe9226498" + ], + "bedgraph": [ + + ], + "methylkit": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.sorted_CpG.methylKit:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,9e23b0c31bf0f98e9348321fe9226498" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T20:34:22.343382" + }, + "test-methyldackel-extract": { + "content": [ + { + "0": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.sorted_CpG.bedGraph:md5,abcc9d1db6e48d5aced567c337b563d4" + ] + ], + "1": [ + + ], + "2": [ + "versions.yml:md5,9e23b0c31bf0f98e9348321fe9226498" + ], + "bedgraph": [ + [ + { + "id": "test", + "single_end": false + }, + "test.paired_end.methylated.sorted_CpG.bedGraph:md5,abcc9d1db6e48d5aced567c337b563d4" + ] + ], + "methylkit": [ + + ], + "versions": [ + "versions.yml:md5,9e23b0c31bf0f98e9348321fe9226498" + ] + } + ], + "meta": { + "nf-test": "0.9.0", + "nextflow": "24.04.4" + }, + "timestamp": "2024-09-04T20:34:12.605013" + } +} \ No newline at end of file diff --git a/modules/nf-core/methyldackel/extract/tests/nextflow.config b/modules/nf-core/methyldackel/extract/tests/nextflow.config new file mode 100644 index 00000000000..4f7caeb4fc4 --- /dev/null +++ b/modules/nf-core/methyldackel/extract/tests/nextflow.config @@ -0,0 +1,5 @@ +process { + withName: METHYLDACKEL_EXTRACT { + ext.args = "--methylKit" + } +} diff --git a/modules/nf-core/methyldackel/mbias/environment.yml b/modules/nf-core/methyldackel/mbias/environment.yml index f7cebb6fa69..4fe69016b33 100644 --- a/modules/nf-core/methyldackel/mbias/environment.yml +++ b/modules/nf-core/methyldackel/mbias/environment.yml @@ -4,4 +4,4 @@ channels: - bioconda - defaults dependencies: - - bioconda::methyldackel=0.6.0 + - bioconda::methyldackel=0.6.1 diff --git a/modules/nf-core/methyldackel/mbias/main.nf b/modules/nf-core/methyldackel/mbias/main.nf index 6292c3e9d8a..f0c48a34acf 100644 --- a/modules/nf-core/methyldackel/mbias/main.nf +++ b/modules/nf-core/methyldackel/mbias/main.nf @@ -4,8 +4,8 @@ process METHYLDACKEL_MBIAS { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/methyldackel:0.6.0--h22771d5_0' : - 'biocontainers/methyldackel:0.6.0--h22771d5_0' }" + 'https://depot.galaxyproject.org/singularity/methyldackel:0.6.1--he4a0461_7' : + 'biocontainers/methyldackel:0.6.1--he4a0461_7' }" input: tuple val(meta), path(bam), path(bai) diff --git a/modules/nf-core/methyldackel/mbias/tests/main.nf.test.snap b/modules/nf-core/methyldackel/mbias/tests/main.nf.test.snap index 006ed74773c..2dc4fde75cd 100644 --- a/modules/nf-core/methyldackel/mbias/tests/main.nf.test.snap +++ b/modules/nf-core/methyldackel/mbias/tests/main.nf.test.snap @@ -12,7 +12,7 @@ ] ], "1": [ - "versions.yml:md5,08cbfd1c80fd6a7c1f0c46831f70bb1c" + "versions.yml:md5,0d6cea2918112948708bd1c2f5309398" ], "txt": [ [ @@ -24,15 +24,15 @@ ] ], "versions": [ - "versions.yml:md5,08cbfd1c80fd6a7c1f0c46831f70bb1c" + "versions.yml:md5,0d6cea2918112948708bd1c2f5309398" ] } ], "meta": { - "nf-test": "0.8.4", + "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-30T13:53:24.630766" + "timestamp": "2024-09-04T20:35:24.956573" }, "test-methyldackel-mbias": { "content": [ @@ -44,13 +44,13 @@ "OT\t1\t4\t52\t3" ], [ - "versions.yml:md5,08cbfd1c80fd6a7c1f0c46831f70bb1c" + "versions.yml:md5,0d6cea2918112948708bd1c2f5309398" ] ], "meta": { - "nf-test": "0.8.4", + "nf-test": "0.9.0", "nextflow": "24.04.4" }, - "timestamp": "2024-08-30T13:53:19.7992" + "timestamp": "2024-09-04T20:35:20.084046" } } \ No newline at end of file diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index dcbe523c6ae..38426529bd6 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -503,9 +503,6 @@ metaphlan3/mergemetaphlantables: metaphlan3/metaphlan3: - modules/nf-core/metaphlan3/metaphlan3/** - tests/modules/nf-core/metaphlan3/metaphlan3/** -methyldackel/extract: - - modules/nf-core/methyldackel/extract/** - - tests/modules/nf-core/methyldackel/extract/** midas/run: - modules/nf-core/midas/run/** - tests/modules/nf-core/midas/run/** diff --git a/tests/modules/nf-core/methyldackel/extract/main.nf b/tests/modules/nf-core/methyldackel/extract/main.nf deleted file mode 100644 index b9d29b85f01..00000000000 --- a/tests/modules/nf-core/methyldackel/extract/main.nf +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { METHYLDACKEL_EXTRACT } from '../../../../../modules/nf-core/methyldackel/extract/main.nf' - -// -// Test with defaults -// -workflow test_methyldackel_extract { - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_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) - - METHYLDACKEL_EXTRACT ( input, fasta, fai ) -} - -// -// Test with --methylkit option (see config) -// -workflow test_methyldackel_extract_methyl_kit { - input = [ [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'], checkIfExists: true), - file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_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) - - METHYLDACKEL_EXTRACT ( input, fasta, fai ) -} diff --git a/tests/modules/nf-core/methyldackel/extract/nextflow.config b/tests/modules/nf-core/methyldackel/extract/nextflow.config deleted file mode 100644 index 6c290dbd29b..00000000000 --- a/tests/modules/nf-core/methyldackel/extract/nextflow.config +++ /dev/null @@ -1,9 +0,0 @@ -process { - - publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } - - withName: test_methyldackel_extract_methyl_kit { - ext.args = "--methylKit" - } -} - diff --git a/tests/modules/nf-core/methyldackel/extract/test.yml b/tests/modules/nf-core/methyldackel/extract/test.yml deleted file mode 100644 index 6a3a66692ea..00000000000 --- a/tests/modules/nf-core/methyldackel/extract/test.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: methyldackel extract - command: nextflow run ./tests/modules/nf-core/methyldackel/extract -entry test_methyldackel_extract -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/methyldackel/extract/nextflow.config - tags: - - methyldackel - - methyldackel/extract - files: - - path: output/methyldackel/test.paired_end.methylated.sorted_CpG.bedGraph - md5sum: abcc9d1db6e48d5aced567c337b563d4