Python port of the R pheatmap package (tracks R pheatmap 1.0.13)
Project description
pheatmap-python
Python version of pheatmap that runs on a faithful port of R's native grid graphics system instead of matplotlib.
- 🎨 No matplotlib. Renders through
grid_py's Cairo backend (PNG / PDF / SVG / PS / JPEG / TIFF / BMP). - 📐 Grammar of Graphics. Built on
grid_py+gtable_py— the same primitives ggplot2 stands on. - 🧩 Abstract layout. Sizes stay as compound
Unitexpressions (1npc - rown_width - legend_width - …) and resolve at draw time. - 🎯 R is the gold standard. Behaviour almost like the
pheatmap.rand verified against R reference renders.
Install
pip install pheatmap-python
Or, for a local development checkout:
git clone https://github.com/Bio-Babel/pheatmap-python.git
cd pheatmap_py
pip install -e ".[dev]"
Quick start
import numpy as np, pandas as pd
from pheatmap import pheatmap
test = pd.DataFrame(
np.random.default_rng(1).standard_normal((20, 10)),
index=[f"Gene{i+1}" for i in range(20)],
columns=[f"Test{i+1}" for i in range(10)],
)
pheatmap(test)
See tutorials/pheatmap_tutorial.ipynb for a full walk-through.
Docs
pip install -e ".[docs]"
mkdocs serve
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
pheatmap_python-1.0.13.tar.gz
(24.6 kB
view details)
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 pheatmap_python-1.0.13.tar.gz.
File metadata
- Download URL: pheatmap_python-1.0.13.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
823a0665bf7910ad4c71cd4e238bbba504ad52c053ca396c7a0d6780fd2277ce
|
|
| MD5 |
0f662bb38c48a1b0d21c92f77d5924b3
|
|
| BLAKE2b-256 |
1ee45774502d4217f6834567ca84e9e219c6d82b148958160ae760884aec3316
|
File details
Details for the file pheatmap_python-1.0.13-py3-none-any.whl.
File metadata
- Download URL: pheatmap_python-1.0.13-py3-none-any.whl
- Upload date:
- Size: 30.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b70e97a076832817209ba7b100c889850d9a28344040953affe6ed9850de7458
|
|
| MD5 |
32808eabdb1fd5a4da8194caebe3cf58
|
|
| BLAKE2b-256 |
6f21aeae780cfcfb1a6af27afdb6da288b419a6c675c5e5cbe645c3fa78d61a3
|