Skip to content

New module: modkit/entropy#11283

Open
sahuno wants to merge 1 commit intonf-core:masterfrom
sahuno:add-modkit-entropy
Open

New module: modkit/entropy#11283
sahuno wants to merge 1 commit intonf-core:masterfrom
sahuno:add-modkit-entropy

Conversation

@sahuno
Copy link
Copy Markdown

@sahuno sahuno commented Apr 24, 2026

PR checklist

  • This comment contains a description of changes (with reason).
  • Tests added (stub + real, both --cpg mode).
  • New tool follows module conventions.
  • Versions broadcast via topic: versions.
  • Naming/parameter/I-O conventions followed.
  • Resource label set (process_high).
  • BioConda + BioContainers used.
  • `nf-core modules lint modkit/entropy` — 50/0/0.
  • `nf-test test --profile conda` — 2/2 passed.

Summary

Adds a new nf-core module wrapping `modkit entropy`, which computes methylation entropy over genomic windows from one or more mod-BAMs. Entropy is a per-window measure of the diversity of methylation patterns across reads covering the window and is complementary to mean methylation.

The module supports modkit's file-vs-directory output dichotomy: when `--regions` is supplied (either via `ext.args` or the third input channel), modkit writes per-region BED / bedgraph / TSV into a directory (emitted via `regions_bed`, `bedgraph`, `tsv` outputs); otherwise a single genome-wide BED is produced (emitted via `bed`).

Accepts multiple input BAMs (passed as repeated `--in-bam`) for multi-sample entropy.

Why

`modkit entropy` is the canonical tool for quantifying methylation heterogeneity in ONT methylation data and is not currently in nf-core/modules. It complements the existing `modkit/pileup` (mean methylation) for heterogeneity-aware analyses.

Test data

Uses the existing `test.sorted.phased.bam` from nf-core/test-datasets (modules branch, `genomics/homo_sapiens/nanopore/bam/`). No new test data required.

🤖 Generated with Claude Code

@sahuno sahuno force-pushed the add-modkit-entropy branch from cc8a7f2 to e0004d3 Compare April 24, 2026 02:44
@sahuno sahuno requested review from a team as code owners April 24, 2026 02:44
@sahuno sahuno force-pushed the add-modkit-entropy branch from e0004d3 to d95d97b Compare April 24, 2026 02:44
Add new nf-core module wrapping `modkit entropy`, which computes
methylation entropy over genomic windows from one or more mod-BAMs.
Supports an optional BED of regions for per-region descriptive
statistics; emits a genome-wide BED otherwise.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sahuno sahuno force-pushed the add-modkit-entropy branch from d95d97b to 0978565 Compare April 24, 2026 03:02
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.

1 participant