pycmplot
Multi-track circular and linear Manhattan plotting in Python.
Install
From PyPI
pip install pycmplot
From GitHub
git clone https://github.com/esohkevin/pycmplot.git
# or with most recent updates from development branch
# git clone -b dev https://github.com/esohkevin/pycmplot.git
cd pycmplot
pip install -e .
# or
wget https://github.com/esohkevin/pycmplot/archive/refs/tags/v0.4.2.tar.gz
tar zxvf v0.4.2.tar.gz
cd pycmplot-v0.4.2
pip install -e .
# if you get package dependency error, use
pip install -e . --break-system-packages
Python virtual environment
Use python virtual environment if local installation is not possible
python -m venv ~/envs/pycmplot
source ~/envs/pycmplot/bin/activate
pip install --upgrade pip setuptools wheel
pip install pycmplot
Test the installation
pycmplot -V
Get Help
pycmplot -h,--help
Dependencies
| Package | Purpose |
|---|---|
| pandas, numpy | Data loading & statistics |
| matplotlib | Plotting backend |
| pycirclize | Circular (Circos-style) tracks |
| natsort | Natural chromosome sorting |
| adjustText | Label collision avoidance |
| liftover | hg18/hg19 to hg38 coordinate conversion |
| Pillow | Image utilities |
| pyarrow, fastparquet | Data load and compression engine |
Command-line usage
Linear Manhattan (default)
pycmplot \
--mode lm \
--sum_stats HbF.tsv.gz,MCV.txt.gz,MCH.tsv.gz \
--labels HbF,MCV,MCH \
--logp \
--signif_line \
--highlight \
--annotate GENE \
--output_dir ./results \
--output_format png \
--dpi 300
Circular Manhattan
pycmplot \
--sum_stats HbF.tsv.gz,MCV.tsv.gz \
--labels HbF,MCV \
--mode cm \
--trim_pval 0.01 \
--logp \
--signif_threshold \
--plot_title "RBC Traits" \
--output_dir ./results
Mixed genome builds
pycmplot \
--sum_stats study_hg18.tsv.gz,study_hg19.tsv.gz,study_hg38.tsv.gz \
--labels Study_A,Study_B,Study_C \
--build hg18,hg19,hg38 \
--logp \
--annotate GENE \
--output_dir ./results
Python API
from pycmplot import prep, load, linear, circular, qq_combined, qq_overlay, qq_separate
files = ["HbF.tsv.gz"]
labels = ["HbF"]
# 1. Resolve per-file column names and delimiters
file_info = prep(
sum_stats=files,
labels=labels,
)
# 2. Load data, run liftover (if needed), extract lead SNPs,
# build the hits table, and compute merged sector sizes
result = load(
sum_stats=files,
labels=labels,
logp=True,
trim_pval=0.01,
file_info=file_info,
signif_threshold=5e-8,
)
# 3. Plot curcular
circular(
sumstats_loaded=result["dfs"],
sector_sizes=result["sectors"],
logp=True,
signif_lines=result["lines"],
hits_table=result["annot"],
annotate="GENE",
label_col="top_gene",
colors=["steelblue", "silver"],
plot_title="RBC Traits",
output_dir="./results",
)
# 4. Plot linear
linear(
sumstats_loaded=result["dfs"],
logp=True,
signif_lines=result["lines"],
hits_table=result["annot"],
annotate="GENE",
label_col="top_gene",
colors=["steelblue", "silver"],
output_dir="./results",
)
# 5. Plot QQ
# Grid of per-track QQ panels
qq_combined(
pval_dict=result["pvals"],
thin=True,
max_points=50_000,
ncols=3,
title="RBC Traits",
output_path="./results/rbc_qq",
fig_format="png",
)
# All traits overlaid on one axes, with lambda in the legend
qq_overlay(
pval_dict=result["pvals"],
thin=True,
max_points=50_000,
title="RBC Traits",
output_path="./results/rbc_qq_overlay",
fig_format="png",
)
# One file per trait
qq_separate(
pval_dict=result["pvals"],
base_name="RBC",
thin=True,
max_points=50_000,
output_path="./results/rbc_qq",
fig_format="png",
)
See docs for more.
Citation
Kevin Esoh, Fujr Osman, Cesar Fortes-Lima, Gordon A Awandare, Ambroise Wonkam, pycmplot: fast, low-memory multi-track circular and linear Manhattan plotting in Python, Bioinformatics Advances, 2026;, vbag281, https://doi.org/10.1093/bioadv/vbag281
Contributing
See how to contribute here https://github.com/esohkevin/pycmplot?tab=contributing-ov-file
Metadata
Release files for pycmplot 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycmplot-0.4.3.tar.gz | 80.0 MB | Without provenance | Details for pycmplot-0.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycmplot-0.4.3-py3-none-any.whl | Python 3 | none | any | Details for pycmplot-0.4.3-py3-none-any.whl |
Total release size: 160.0 MB
Release files / pycmplot-0.4.3.tar.gz
| Download URL | pycmplot-0.4.3.tar.gz |
|---|---|
| Size | 80.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0072b07044a37af9097850ba301e83dddca4372382a7f6baf250ab63e53dc684
|
|
BLAKE2b-256 checksum How to use checksums |
b051d03f52e07142a04fa873fb1ddab9007a5777d0243a849ff43368593ee1c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Release files / pycmplot-0.4.3-py3-none-any.whl
| Download URL | pycmplot-0.4.3-py3-none-any.whl |
|---|---|
| Size | 80.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c0ce304e85613bc45e419ec4068b0920658e7aa4fcb31b889629dd8ce18ce20
|
|
BLAKE2b-256 checksum How to use checksums |
bfd50068016a6c56c46e6f2c087f4cca12357cf7e2a6ed11a3ca8d29d53feba8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.6
|
Security for pycmplot 0.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.