Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
16568e1
add methurator gtestimator and plot modules
edogiuili Apr 1, 2026
d1089a4
add sanitizeOutput and snapshot on summary_report content
edogiuili Apr 2, 2026
c8cf29c
add sanitizeOutput and snapshot on summary_report content
edogiuili Apr 2, 2026
0234675
update versions output to utilize topics and chanuniform name summary…
edogiuili Apr 2, 2026
df43d78
add ontologies, make the description more specific, add topics
edogiuili Apr 2, 2026
8885684
add snapshots on the file name and sanitizeOutput
edogiuili Apr 2, 2026
6a27790
add snapshots on the file name and sanitizeOutput
edogiuili Apr 2, 2026
622022f
add topics, lint the process
edogiuili Apr 2, 2026
670437c
add topics, update output, update description, add ontologies
edogiuili Apr 2, 2026
c992f4a
update snaps
edogiuili Apr 2, 2026
083231d
change the expression in eval to output just version number
edogiuili Apr 4, 2026
2d1c6db
add .join().md5 as suggested
edogiuili Apr 7, 2026
74ecd84
update test
edogiuili Apr 7, 2026
236a062
Merge branch 'master' into methurator
famosab Apr 7, 2026
26b2bca
Update main.nf
edogiuili Apr 7, 2026
60ab893
Update main.nf
edogiuili Apr 7, 2026
4e1d5ee
put all the inputs into one tuple and add ontologies
edogiuili Apr 7, 2026
b8218c0
put inputs into one tuple and minor changes
edogiuili Apr 7, 2026
e800259
Merge branch 'master' into methurator
edogiuili Apr 7, 2026
e75b482
move args and params to the task.ext.args and make a nextflow.config …
edogiuili Apr 10, 2026
e286e6c
Merge branch 'master' into methurator
edogiuili Apr 10, 2026
9c83260
move args into module_args param
edogiuili Apr 10, 2026
5c6f0d2
Merge branch 'master' into methurator
edogiuili Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/nf-core/methurator/gtestimator/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::methurator=2.1.1"
45 changes: 45 additions & 0 deletions modules/nf-core/methurator/gtestimator/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
process METHURATOR_GTESTIMATOR {
tag "${meta.id}"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/methurator:2.1.1--pyhdfd78af_0'
: 'biocontainers/methurator:2.1.1--pyhdfd78af_0'}"

input:
tuple val(meta), path(bam)
tuple val(meta2), path(bai)
tuple val(meta3), path(fasta)

output:
tuple val(meta), path("methurator_summary.yml"), emit: summary_report
tuple val("${task.process}"), val('methurator'), eval("methurator --version | sed 's/.* //'"), emit: versions_methurator, topic: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
if (params.rrbs) {
args += '--rrbs'
}
"""
methurator gt-estimator \\
${bam} \\
--fasta ${fasta} \\
--minimum-coverage ${params.minimum_coverage} \\
--t-max ${params.t_max} \\
-@ ${task.cpus} \\
--outdir . \\
--compute_ci \\
${args}

"""

stub:
"""
touch methurator_summary.yml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

"""
}
89 changes: 89 additions & 0 deletions modules/nf-core/methurator/gtestimator/meta.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add ontologies to the meta map? :)

Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: methurator_gtestimator
description: |
Run estimator for DNA methylation sequencing saturation.
keywords:
- rrbs
- BS-seq
- methylation
- 5mC
- methylseq
- bisulphite
- bam
tools:
- methurator:
description: |
Methurator is a Python package designed to estimate CpGs saturation
for DNA methylation sequencing data.
homepage: https://github.com/VIBTOBIlab/methurator
documentation: https://github.com/VIBTOBIlab/methurator/README.md
licence:
- "MIT"
identifier: ""
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bam:
type: file
description: BAM/CRAM file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you be more specific, is only one bam allowed or can it be multiple?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tool supports one or multiple BAM files, but within a Nextflow workflow I would only use 1 file at the time to enable parallel execution.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok that would mean that via nextflow only one plot would be created downstream right? then we can maybe handle it differently in the plot module aswell?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends. If the --minimum-coverage parameter specified in the gtestimator module contains only 1 character (e.g. "3"), then yes. However, the users can specify more than 1 minimum coverage value (e.g. "1,3,5"), in which case one plot per minimum coverage value specified will be dumped in the plots/ folder.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok maybe we can add this info to the meta map then but then its ok we leave it as is

pattern: "*.{bam,cram}"
ontologies: []
- - meta2:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bai:
type: file
description: BAM/CRAM index file
pattern: "*.{bai,crai}"
ontologies: []
- - meta3:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fasta:
type: file
description: Input genome fasta file
pattern: "*.{fasta,fa}"
ontologies: []
output:
summary_report:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- methurator_summary.yml:
type: file
description: |
methurator gtestimator summary report in YAML format
ontologies: []
versions_methurator:
- - ${task.process}:
type: string
description: methurator gtestimator
- methurator:
type: string
description: The name of the tool
- methurator --version | sed 's/.* //':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: methurator gtestimator
- methurator:
type: string
description: The name of the tool
- methurator --version | sed 's/.* //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@edogiuili"
maintainers:
- "@edogiuili"
78 changes: 78 additions & 0 deletions modules/nf-core/methurator/gtestimator/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
nextflow_process {

name "Test Process METHURATOR_GTESTIMATOR"
script "../main.nf"
process "METHURATOR_GTESTIMATOR"

tag "modules"
tag "modules_nfcore"
tag "methurator"
tag "methurator/gtestimator"

test("Run methurator gt-estimator on paired-end methylated [bam] | sarscov2 genome [fasta]") {

when {
params {
t_max = 10
minimum_coverage = 1
rrbs = false
}
process {
"""
input[0] = [ [ id:'test_bam' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam', checkIfExists: true)
]
input[1] = [ [ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam.bai')
]
input[2] = [ [ id: 'test_fasta' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
// Avoid first 3 lines of the summary report as they contain the date and time of the run
file(process.out.summary_report[0][1]).readLines()[3..10],
process.out.findAll { key, val -> key.startsWith('versions') }
).match()}
)
}
}
test("Run methurator gt-estimator on paired-end methylated [bam] | sarscov2 genome [fasta] - stub") {

options "-stub"

when {
params {
minimum_coverage = 1
t_max = 10
rrbs = false
}
process {
"""
input[0] = [ [ id:'test_bam' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam', checkIfExists: true)
]
input[1] = [ [ id:'test', single_end:false ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam.bai')
]
input[2] = [ [ id: 'test_fasta' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
}
56 changes: 56 additions & 0 deletions modules/nf-core/methurator/gtestimator/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"Run methurator gt-estimator on paired-end methylated [bam] | sarscov2 genome [fasta] - stub": {
"content": [
{
"summary_report": [
[
{
"id": "test_bam"
},
"methurator_summary.yml:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions_methurator": [
[
"METHURATOR_GTESTIMATOR",
"methurator",
"2.1.1"
]
]
}
],
"timestamp": "2026-04-04T17:56:55.555845",
"meta": {
"nf-test": "0.9.5",
"nextflow": "25.10.0"
}
},
"Run methurator gt-estimator on paired-end methylated [bam] | sarscov2 genome [fasta]": {
"content": [
[
" methurator_version: 2.1.1",
" command: methurator gt_estimator",
" options:",
" cov_files:",
" - ./covs/test.paired_end.methylated.sorted_CpG.bedGraph.gz",
" outdir: .",
" minimum_coverage: '1'",
" t_step: 0.05"
],
{
"versions_methurator": [
[
"METHURATOR_GTESTIMATOR",
"methurator",
"2.1.1"
]
]
}
],
"timestamp": "2026-04-04T17:56:48.448736",
"meta": {
"nf-test": "0.9.5",
"nextflow": "25.10.0"
}
}
}
7 changes: 7 additions & 0 deletions modules/nf-core/methurator/plot/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::methurator=2.1.1"
35 changes: 35 additions & 0 deletions modules/nf-core/methurator/plot/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
process METHURATOR_PLOT {
tag "${meta.id}"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/methurator:2.1.1--pyhdfd78af_0'
: 'biocontainers/methurator:2.1.1--pyhdfd78af_0'}"

input:
tuple val(meta), path(summary_report)

output:
tuple val(meta), path("plots/*.html"), emit: plots
tuple val("${task.process}"), val('methurator'), eval("methurator --version | sed 's/.* //'"), emit: versions_methurator, topic: versions

when:
task.ext.when == null || task.ext.when

script:
"""
methurator plot \\
--summary ${summary_report} \\
--outdir .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}.html"
"""
mkdir plots/
touch plots/${prefix}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

"""
}
72 changes: 72 additions & 0 deletions modules/nf-core/methurator/plot/meta.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add ontologies to the meta map?

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: methurator_plot
description: Plots results produced by methurator gtestimator.
keywords:
- rrbs
- BS-seq
- methylation
- 5mC
- methylseq
- bisulphite
- bisulfite
- bam
tools:
- methurator:
description: |
methurator is a Python package designed to estimate sequencing saturation
for DNA methylation sequencing data.
homepage: https://github.com/VIBTOBIlab/methurator
documentation: https://github.com/VIBTOBIlab/methurator/README.md
licence:
- "MIT"
identifier: ""
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- summary_report:
type: file
description: |
YAML file summarizing the saturation analysis results.
pattern: "methurator_*.yml"
ontologies:
- edam: http://edamontology.org/format_3750
output:
plots:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- plots/*.html:
type: file
description: |
HTML plots generated from the saturation analysis.
pattern: "plots/*.html"
ontologies: []
versions_methurator:
- - ${task.process}:
type: string
description: methurator plot
- methurator:
type: string
description: The name of the tool
- methurator --version | sed 's/.* //':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: methurator plot
- methurator:
type: string
description: The name of the tool
- methurator --version | sed 's/.* //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@edogiuili"
maintainers:
- "@edogiuili"
Loading
Loading