Metadata-Version: 2.4
Name: pheatmap-python
Version: 1.0.13
Summary: Python port of the R pheatmap package (tracks R pheatmap 1.0.13)
Project-URL: Homepage, https://github.com/Bio-Babel/pheatmap-python
Project-URL: Repository, https://github.com/Bio-Babel/pheatmap-python
Project-URL: Issues, https://github.com/Bio-Babel/pheatmap-python/issues
Project-URL: Documentation, https://github.com/Bio-Babel/pheatmap-python#readme
Author-email: Jeffery Liu <jeffliu.lucky@gmail.com>
License-Expression: GPL-2.0-or-later
License-File: LICENSE
Keywords: R-port,bioinformatics,clustering,dendrograms,heatmap,pheatmap,visualization
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: gtable-python>=0.3.6
Requires-Dist: matplotlib>=3.8
Requires-Dist: numpy>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: rgrid-python>=4.5.3
Requires-Dist: scales-python>=1.4.0
Requires-Dist: scipy>=1.11
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs; extra == 'docs'
Requires-Dist: mkdocs-jupyter; extra == 'docs'
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocstrings[python]; extra == 'docs'
Description-Content-Type: text/markdown

# 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 `Unit` expressions
  (`1npc - rown_width - legend_width - …`) and resolve at draw time.
- 🎯 **R is the gold standard.** Behaviour almost like the `pheatmap.r` and verified against R reference renders.

## Install

```bash
pip install pheatmap-python
```

Or, for a local development checkout:

```bash
git clone https://github.com/Bio-Babel/pheatmap-python.git
cd pheatmap_py
pip install -e ".[dev]"
```

## Quick start

```python
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

```bash
pip install -e ".[docs]"
mkdocs serve
```
