Skip to main content

methylplotter

Plot methylation from haplotype-phased BED files.

Methylation plot

What It Does

  • Parses ONT/PacBio BED-like methylation files
  • Filters records to a genomic region
  • Applies sliding-window smoothing to % modified (point-based window)
  • Draws publication-ready line plots for one or more samples
  • Annotates genes and optional vertical marker lines
  • Auto-detects methylation percent column per file by platform, with manual override

Installation

python -m pip install methylplotter

Install from the local checkout instead:

python -m pip install .

For development with tests:

python -m pip install -e '.[test]'

CLI Usage

methylplotter \
  --platform ont \
  --bed sampleA.bed --bed sampleB.bed \
  --sample sampleA --sample sampleB \
  --gene chr15:80143550-80197576:FAH \
  --region chr15:80150000-80200000 \
  --line breakpoint,80170000 \
  --window_size 20 \
  --min_points_for_smooth 3 \
  --verbose \
  --output methylation_plot

Equivalent module invocation:

python -m methylplotter --platform ont ...

Notes:

  • --window_size is a number of rows/points, not base pairs
  • By default, methylation percent column is auto-detected per input file (ont prefers index 10, pb prefers index 3)
  • Use --percent_col <index> to force one column across all input files
  • --verbose prints per-sample row counts, smoothed point counts, and the chosen percent column
  • If --output has no extension, both PNG and SVG are written

Test Data

Synthetic test data is bundled in tests/data/:

  • ont_sample_a.bed
  • ont_sample_b.bed
  • pb_sample_a.bed

These are minimal fixtures for parser/smoother/plot tests, not biological reference datasets.

Run Tests

PYTHONPATH=src pytest

Metadata

Release files for methylplotter 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for methylplotter 0.3.0
File Size Uploaded
methylplotter-0.3.0.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for methylplotter 0.3.0
File Interpreter ABI Platform
methylplotter-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.4 kB

Release files / methylplotter-0.3.0.tar.gz

Download URL methylplotter-0.3.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b8c0c5daa3ef298b6005b6f84fb49bbd5df0600ea580b1d78366176ee73d56f6
BLAKE2b-256 checksum
How to use checksums
c1e5f57a35c392c79a25ca32fce39216adfc2722207ba7f6652fb606fbc296e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / methylplotter-0.3.0-py3-none-any.whl

Download URL methylplotter-0.3.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
671fd18b7dea0eaed98dc144f4548ea7fea73100a56634837a77b8971adcef12
BLAKE2b-256 checksum
How to use checksums
b2e337c917813b585c83c83145e898f0c944213100372be5834fcd20af8b2e92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page