-
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 1 commit
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,52 @@ | ||||
| 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) | ||||
|
famosab marked this conversation as resolved.
Outdated
famosab marked this conversation as resolved.
Outdated
|
||||
|
|
||||
| output: | ||||
| tuple val(meta), path("methurator_*.yml") , emit: summary_report | ||||
| path "versions.yml" , emit: versions | ||||
|
famosab marked this conversation as resolved.
Outdated
|
||||
|
|
||||
| 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} \\ | ||||
|
famosab marked this conversation as resolved.
Outdated
|
||||
| -@ ${task.cpus} \\ | ||||
| --outdir . \\ | ||||
| --compute_ci \\ | ||||
| $args | ||||
|
|
||||
|
famosab marked this conversation as resolved.
|
||||
| cat <<-END_VERSIONS > versions.yml | ||||
| "${task.process}": | ||||
| methurator: "\$(methurator --version 2>&1 | sed -E 's/.*version[[:space:]]+([0-9.]+).*/\\1/')" | ||||
| END_VERSIONS | ||||
| """ | ||||
|
|
||||
| stub: | ||||
| def prefix = task.ext.prefix ?: "methurator_summary_${meta.id}" | ||||
|
famosab marked this conversation as resolved.
Outdated
|
||||
| """ | ||||
| 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
|
||||
| cat <<-END_VERSIONS > versions.yml | ||||
| "${task.process}": | ||||
| methurator: "\$(methurator --version 2>&1 | sed -E 's/.*version[[:space:]]+([0-9.]+).*/\\1/')" | ||||
| END_VERSIONS | ||||
| """ | ||||
| } | ||||
|
famosab marked this conversation as resolved.
famosab marked this conversation as 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,71 @@ | ||
| name: methurator_gtestimator | ||
| description: | | ||
| Methurator is a Python package designed to estimate CpGs saturation | ||
| for DNA methylation sequencing data. | ||
|
famosab marked this conversation as resolved.
Outdated
|
||
| 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 | ||
|
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 be more specific, is only one bam allowed or can it be multiple?
Author
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. 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.
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. 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?
Author
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. 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.
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. ok maybe we can add this info to the meta map then but then its ok we leave it as is |
||
| pattern: "*.{bam,cram}" | ||
| - - 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}" | ||
| - - 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}" | ||
| output: | ||
| summary_report: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. [ id:'test', single_end:false ] | ||
| - "methurator_*.yml": | ||
| type: file | ||
| description: | | ||
| YAML file summarizing the saturation analysis results. | ||
| pattern: "methurator_*.yml" | ||
| versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: | | ||
| File containing software versions | ||
| pattern: "versions.yml" | ||
| authors: | ||
| - "@edogiuili" | ||
| maintainers: | ||
| - "@edogiuili" | ||
| 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 process.out.summary_report.size() == 1 }, | ||
| { assert snapshot(process.out.versions).match("versions") } | ||
|
famosab marked this conversation as resolved.
Outdated
|
||
| ) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| 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 process.out.summary_report.size() == 1 }, | ||
| { assert snapshot(process.out.versions).match("versions_stub") } | ||
|
famosab marked this conversation as resolved.
Outdated
|
||
| ) | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "versions_stub": { | ||
| "content": [ | ||
| [ | ||
| "versions.yml:md5,22b8f66df736ae7c456269f537532688" | ||
| ] | ||
| ], | ||
| "timestamp": "2026-04-01T18:22:15.772095", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.10.0" | ||
| } | ||
| }, | ||
| "versions": { | ||
| "content": [ | ||
| [ | ||
| "versions.yml:md5,22b8f66df736ae7c456269f537532688" | ||
| ] | ||
| ], | ||
| "timestamp": "2026-04-01T18:17:57.637285", | ||
| "meta": { | ||
| "nf-test": "0.9.5", | ||
| "nextflow": "25.10.0" | ||
| } | ||
| } | ||
| } |
| 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.
|
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||
| 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 | ||||
|
famosab marked this conversation as resolved.
Outdated
|
||||
| path "versions.yml" , emit: versions | ||||
|
famosab marked this conversation as resolved.
Outdated
|
||||
|
|
||||
| when: | ||||
| task.ext.when == null || task.ext.when | ||||
|
|
||||
| script: | ||||
| """ | ||||
| methurator plot \\ | ||||
|
famosab marked this conversation as 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
|
||||
| cat <<-END_VERSIONS > versions.yml | ||||
| "${task.process}": | ||||
| methurator: "\$(methurator --version 2>&1 | sed -E 's/.*version[[:space:]]+([0-9.]+).*/\\1/')" | ||||
| END_VERSIONS | ||||
| """ | ||||
|
|
||||
| stub: | ||||
| def prefix = task.ext.prefix ?: "plots/${meta.id}.html" | ||||
| """ | ||||
| mkdir plots/ | ||||
| touch ${prefix} | ||||
|
famosab marked this conversation as resolved.
Outdated
|
||||
|
|
||||
|
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
|
||||
| cat <<-END_VERSIONS > versions.yml | ||||
| "${task.process}": | ||||
| methurator: "\$(methurator --version 2>&1 | sed -E 's/.*version[[:space:]]+([0-9.]+).*/\\1/')" | ||||
| END_VERSIONS | ||||
| """ | ||||
| } | ||||
|
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,53 @@ | ||
| name: methurator_plot | ||
| description: Plots results produced by methurator. | ||
| 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" | ||
| 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" | ||
| versions: | ||
| - versions.yml: | ||
| type: file | ||
| description: | | ||
| File containing software versions | ||
| pattern: "versions.yml" | ||
| authors: | ||
| - "@edogiuili" | ||
| maintainers: | ||
| - "@edogiuili" |
Uh oh!
There was an error while loading. Please reload this page.