Skip to content

add methurator gtestimator and plot modules#11110

Open
edogiuili wants to merge 23 commits intonf-core:masterfrom
edogiuili:methurator
Open

add methurator gtestimator and plot modules#11110
edogiuili wants to merge 23 commits intonf-core:masterfrom
edogiuili:methurator

Conversation

@edogiuili
Copy link
Copy Markdown

In this PR, I add methurator gtestimator and plot modules.

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution to nf-core! We really appreciate it. I added a few comments to your PR.

@edogiuili
Copy link
Copy Markdown
Author

Thanks for your suggestions Famke! I've addressed them all, apart from:

  • the inputs of methurator/gtestimator (for now)
  • the plots/ dir being created in the methurator/plot stub (find my answer here)

For the additional snapshots, instead of capturing the full files—which are unstable—I extracted a snapshot of the content from lines 3 to 9 for the methurator/gtestimator summary reports, and a snapshot of the HTML filename for the methurator plots. What do you think?

@edogiuili
Copy link
Copy Markdown
Author

A small fix in the eval() expression to extract the software version. I changed the expression from methurator --version to methurator --version | sed 's/.* //' to only extract the version number (e.g. 2.1.1) and not the entire output (e.g. methurator, 2.1.1)

@edogiuili
Copy link
Copy Markdown
Author

Hey Famke, I fixed the last suggestion you made, however, the nf-test seem to have run on files that are not related to this module, but rather to other modules. I do not know why this would happen 😕

@famosab
Copy link
Copy Markdown
Contributor

famosab commented Apr 7, 2026

Hey Famke, I fixed the last suggestion you made, however, the nf-test seem to have run on files that are not related to this module, but rather to other modules. I do not know why this would happen 😕

Happens because github -> you just need to merge the master branch then it only runs yours

edogiuili and others added 2 commits April 7, 2026 18:18
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
Co-authored-by: Famke Bäuerle <45968370+famosab@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

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

I added a few more comments :)

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

@edogiuili
Copy link
Copy Markdown
Author

Addressed them. Let me know if there are other things you want me to change :)

Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

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

I think we are good after this last round of revisions :) thanks for sticking around with patience!

prefix = task.ext.prefix?: "${meta.id}"
"""
touch ${prefix}.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

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? :)

Comment on lines +16 to +20
params {
t_max = 10
minimum_coverage = 1
rrbs = false
}
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.

I think we need to supply this with ext.args as well and you probably need to add a nextflow.config file to this test as well to have this properly used :)

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

"""
mkdir plots/
touch plots/${prefix}.html

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

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?

@edogiuili
Copy link
Copy Markdown
Author

Thanks a lot to you for the support! :)

@edogiuili edogiuili enabled auto-merge April 13, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants