Centromere plotting library.
Project description
CenPlot
A Python library for producing centromere figures.
|
|
|
Getting Started
Install the package from pypi.
pip install cenplot
CLI
Generating a split HOR tracks using the cenplot draw command and an input layout.
# examples/example_cli.sh
cenplot draw \
-t examples/tracks_hor.toml \
-c "chm13_chr10:38568472-42561808" \
-p 4 \
-d plots \
-o "plot/merged_image.png"
Python API
The same HOR track can be created with a few lines of code.
# examples/example_api.py
from cenplot import plot_tracks, read_tracks
chrom = "chm13_chr10:38568472-42561808"
track_list, settings = read_tracks("examples/tracks_hor.toml", chrom=chrom)
fig, axes, _ = plot_tracks(track_list.tracks, settings)
Development
Requires Python >= 3.12 and Git LFS to pull test files.
Create a venv, build cenplot, and install it. Also, generate the docs.
which python3.12 pip
git lfs install && git lfs pull
make dev && make build && make install
pdoc ./cenplot -o docs/
The generated venv will have the cenplot script.
# source venv/bin/activate
venv/bin/cenplot -h
To run tests.
make test
Documentation
Read the documentation here.
Cite
Gao S, Oshima KK, Chuang SC, Loftus M, Montanari A, Gordon DS, Human Genome Structural Variation Consortium, Human Pangenome Reference Consortium, Hsieh P, Konkel MK, Ventura M, Logsdon GA. A global view of human centromere variation and evolution. bioRxiv. 2025. p. 2025.12.09.693231. doi:10.64898/2025.12.09.693231
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 cenplot-0.1.6.tar.gz.
File metadata
- Download URL: cenplot-0.1.6.tar.gz
- Upload date:
- Size: 32.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf86b7e05e93acef8a8b4088bd6968fd1052dd9f38439f240c664f20a7ee2240
|
|
| MD5 |
dbedd73448e4c7def5ce52cc174d23ce
|
|
| BLAKE2b-256 |
05e7c9aed73447edcdd2fd1ec228c5ef7d0b99336173eda19970be0cf6834507
|
File details
Details for the file cenplot-0.1.6-py3-none-any.whl.
File metadata
- Download URL: cenplot-0.1.6-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c8b240dfbe4ebe283c3ff6fca5cfc392881ca02ea9449205f0e07342a9d177f
|
|
| MD5 |
020d52c65ffb992eb627d38de0b5990e
|
|
| BLAKE2b-256 |
6e07e15e091478703e705fce480c84b347009b4dea3f9d5011a79a31ef02d21e
|