Skip to main content

Centromere plotting library.

Project description

CenPlot

PyPI - Version CI docs

A Python library for producing centromere figures.

CDR plot.
HOR plot.
Combined plot.
Identity plots.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cenplot-0.1.6.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cenplot-0.1.6-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

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

Hashes for cenplot-0.1.6.tar.gz
Algorithm Hash digest
SHA256 cf86b7e05e93acef8a8b4088bd6968fd1052dd9f38439f240c664f20a7ee2240
MD5 dbedd73448e4c7def5ce52cc174d23ce
BLAKE2b-256 05e7c9aed73447edcdd2fd1ec228c5ef7d0b99336173eda19970be0cf6834507

See more details on using hashes here.

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

Hashes for cenplot-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6c8b240dfbe4ebe283c3ff6fca5cfc392881ca02ea9449205f0e07342a9d177f
MD5 020d52c65ffb992eb627d38de0b5990e
BLAKE2b-256 6e07e15e091478703e705fce480c84b347009b4dea3f9d5011a79a31ef02d21e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page