-
Notifications
You must be signed in to change notification settings - Fork 1k
add methurator gtestimator and plot modules #11110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
16568e1
d1089a4
c8cf29c
0234675
df43d78
8885684
6a27790
622022f
670437c
c992f4a
083231d
2d1c6db
74ecd84
236a062
26b2bca
60ab893
4e1d5ee
b8218c0
e800259
e75b482
e286e6c
9c83260
5c6f0d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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" |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,40 @@ | ||||
| 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), path(bai), path(fasta) | ||||
|
|
||||
| output: | ||||
| tuple val(meta), path("${prefix}.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 ?: '' | ||||
| prefix = task.ext.prefix ?: "${meta.id}" | ||||
| """ | ||||
| methurator gt-estimator \\ | ||||
| ${bam} \\ | ||||
| --fasta ${fasta} \\ | ||||
| -@ ${task.cpus} \\ | ||||
| --outdir . \\ | ||||
| ${args} | ||||
|
|
||||
famosab marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| mv methurator_summary.yml ${prefix}.yml | ||||
| """ | ||||
|
|
||||
| stub: | ||||
| prefix = task.ext.prefix?: "${meta.id}" | ||||
| """ | ||||
| touch ${prefix}.yml | ||||
|
|
||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| """ | ||||
| } | ||||
famosab marked this conversation as resolved.
Show resolved
Hide resolved
famosab marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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,82 @@ | ||
| 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 ] | ||
| ontologies: [] | ||
| - bam: | ||
| type: file | ||
| description: Single BAM file | ||
| pattern: "*.{bam,cram}" | ||
| ontologies: [] | ||
| - bai: | ||
| type: file | ||
| description: Single BAM/CRAM index file | ||
| pattern: "*.{bai,crai}" | ||
| ontologies: [] | ||
| - 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 ] | ||
| ontologies: [] | ||
| - "${prefix}.yml": | ||
| type: file | ||
| description: | | ||
| YAML file summarizing the saturation analysis results. | ||
| pattern: "${prefix}.yml" | ||
| 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" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| nextflow_process { | ||
|
|
||
| name "Test Process METHURATOR_GTESTIMATOR" | ||
| script "../main.nf" | ||
| process "METHURATOR_GTESTIMATOR" | ||
| config './nextflow.config' | ||
|
|
||
| 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 { | ||
| module_args = '--t-max 10 --minimum-coverage 1 --compute_ci' | ||
| } | ||
|
|
||
| process { | ||
| """ | ||
| input[0] = [ [ id:'test', single_end:false ], | ||
| 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), | ||
| 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].join('\n').md5(), | ||
| 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 { | ||
| module_args = '--t-max 10 --minimum-coverage 1 --compute_ci' | ||
| } | ||
| process { | ||
| """ | ||
| input[0] = [ [ id:'test', single_end:false ], | ||
| 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), | ||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
| ] | ||
| """ | ||
| } | ||
| } | ||
|
|
||
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| { | ||
| "Run methurator gt-estimator on paired-end methylated [bam] | sarscov2 genome [fasta] - stub": { | ||
| "content": [ | ||
| { | ||
| "summary_report": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": false | ||
| }, | ||
| "test.yml:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions_methurator": [ | ||
| [ | ||
| "METHURATOR_GTESTIMATOR", | ||
| "methurator", | ||
| "2.1.1" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-04-07T22:41:16.975667", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.10.0" | ||
| } | ||
| }, | ||
| "Run methurator gt-estimator on paired-end methylated [bam] | sarscov2 genome [fasta]": { | ||
| "content": [ | ||
| "983d27e4d62f86d15a779820758af458", | ||
| { | ||
| "versions_methurator": [ | ||
| [ | ||
| "METHURATOR_GTESTIMATOR", | ||
| "methurator", | ||
| "2.1.1" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-04-07T14:33:27.127158", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.10.0" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| process { | ||
| withName: METHURATOR_GTESTIMATOR { | ||
| ext.args = params.module_args | ||
| } | ||
| } |
| 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" |
famosab marked this conversation as resolved.
Show resolved
Hide resolved
|
| 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 \\ | ||||
famosab marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| --summary ${summary_report} \\ | ||||
| --outdir . | ||||
|
|
||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| """ | ||||
|
|
||||
| stub: | ||||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||||
| """ | ||||
| mkdir plots/ | ||||
| touch plots/${prefix}.html | ||||
|
|
||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
| """ | ||||
| } | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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,74 @@ | ||
| 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 ] | ||
| ontologies: [] | ||
| - 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 ] | ||
| ontologies: [] | ||
| - plots/*.html: | ||
| type: file | ||
| description: | | ||
| HTML plots generated from the saturation analysis. | ||
| pattern: "plots/*.html" | ||
| ontologies: [] | ||
famosab marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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" | ||
Uh oh!
There was an error while loading. Please reload this page.