Skip to content

logsdon-lab/CenPlot

Repository files navigation

CenPlot

PyPI - Version CI docs

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 Git LFS to pull test files. Create a venv, build cenplot, and install it. Also, generate the docs.

git lfs install && git lfs pull
make dev && make build && make install
pdoc ./cenplot -o docs/

Documentation

Read the documentation here.

About

Centromere plotting library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages