Plot methylation profiles from haplotype-phased BED files
Project description
methylplotter
Plot methylation from haplotype-phased BED files.
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_sizeis a number of rows/points, not base pairs- By default, methylation percent column is auto-detected per input file (
ontprefers index10,pbprefers index3) - Use
--percent_col <index>to force one column across all input files --verboseprints per-sample row counts, smoothed point counts, and the chosen percent column- If
--outputhas no extension, bothPNGandSVGare written
Test Data
Synthetic test data is bundled in tests/data/:
ont_sample_a.bedont_sample_b.bedpb_sample_a.bed
These are minimal fixtures for parser/smoother/plot tests, not biological reference datasets.
Run Tests
PYTHONPATH=src pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file methylplotter-0.3.0.tar.gz.
File metadata
- Download URL: methylplotter-0.3.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8c0c5daa3ef298b6005b6f84fb49bbd5df0600ea580b1d78366176ee73d56f6
|
|
| MD5 |
0fb0c18c12d3f22590bb48894116e5bb
|
|
| BLAKE2b-256 |
c1e5f57a35c392c79a25ca32fce39216adfc2722207ba7f6652fb606fbc296e1
|
File details
Details for the file methylplotter-0.3.0-py3-none-any.whl.
File metadata
- Download URL: methylplotter-0.3.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
671fd18b7dea0eaed98dc144f4548ea7fea73100a56634837a77b8971adcef12
|
|
| MD5 |
f67ec46162ad3dccd63fccb60362f0a5
|
|
| BLAKE2b-256 |
b2e337c917813b585c83c83145e898f0c944213100372be5834fcd20af8b2e92
|