diff --git a/modules/nf-core/modkit/bedmethyltobigwig/main.nf b/modules/nf-core/modkit/bedmethyltobigwig/main.nf index dd0737d7dc2f..d1aa5e07e364 100644 --- a/modules/nf-core/modkit/bedmethyltobigwig/main.nf +++ b/modules/nf-core/modkit/bedmethyltobigwig/main.nf @@ -20,16 +20,18 @@ process MODKIT_BEDMETHYLTOBIGWIG { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - def prefix = task.ext.prefix ?: "${meta.id}" - def mods = modcodes instanceof List ? modcodes.join(',') : modcodes + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + def mods = modcodes instanceof List ? modcodes.join(',') : modcodes + def input_cmd = bedmethyl.getName().endsWith('.gz') ? "gzip -cd" : "cat" """ - modkit bedmethyl tobigwig \\ + $input_cmd $bedmethyl |\\ + modkit bedmethyl tobigwig \\ $args \\ --nthreads $task.cpus \\ --sizes $chromsizes \\ --mod-codes $mods \\ - $bedmethyl \\ + - \\ ${prefix}.bw cat <<-END_VERSIONS > versions.yml diff --git a/modules/nf-core/modkit/bedmethyltobigwig/meta.yml b/modules/nf-core/modkit/bedmethyltobigwig/meta.yml index 2b0875a72b47..9dbd8334978b 100644 --- a/modules/nf-core/modkit/bedmethyltobigwig/meta.yml +++ b/modules/nf-core/modkit/bedmethyltobigwig/meta.yml @@ -23,7 +23,7 @@ input: - bedmethyl: type: file description: bedMethyl file - pattern: "*.{bed}" + pattern: "*.{bed,bed.gz}" ontologies: - edam: "http://edamontology.org/format_3003" # BED - - meta2: diff --git a/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test b/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test index 5f3499da00ef..699e3157b244 100644 --- a/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test +++ b/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test @@ -60,12 +60,12 @@ nextflow_process { } } - test("homo sapiens - bedmethyl, fai, string") { + test("homo sapiens - compressed bedmethyl, fai, string") { when { process { """ - input[0] = TABIX_BGZIP.out.output + input[0] = MODKIT_PILEUP.out.bedgz input[1] = [ [ id : 'hg38' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) diff --git a/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test.snap b/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test.snap index 48c989060696..32353c0fdddc 100644 --- a/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test.snap +++ b/modules/nf-core/modkit/bedmethyltobigwig/tests/main.nf.test.snap @@ -65,7 +65,7 @@ }, "timestamp": "2025-12-11T14:17:52.811754475" }, - "homo sapiens - bedmethyl, fai, string": { + "homo sapiens - compressed bedmethyl, fai, string": { "content": [ { "0": [ @@ -94,8 +94,8 @@ ], "meta": { "nf-test": "0.9.3", - "nextflow": "25.10.2" + "nextflow": "25.04.2" }, - "timestamp": "2025-12-11T14:18:02.079953932" + "timestamp": "2025-12-19T10:25:49.934420699" } } \ No newline at end of file