A simple plotting library for making genomic tracks
Project description
PlotNado
PlotNado is a lightweight Python package for building genome browser-style figures with a modern, chainable API.
[!NOTE] This version of PlotNado is independent and does not require CoolBox.
Install
pip install plotnado
For development from source:
git clone https://github.com/alsmith151/plotnado
cd plotnado
pip install -e .[dev,docs]
# required developer setup: run local quality hooks before every commit
pip install pre-commit
pre-commit install
Developer workflow (important)
- Do not edit autogenerated typing surfaces directly:
plotnado/figure.pyi- auto-generated overload blocks in
plotnado/figure.py(# BEGIN/END AUTO-GENERATED OVERLOAD)
- Make API changes in the source Pydantic models first (track models/aesthetics/labels), then regenerate artifacts:
python scripts/generate_figure_overloads.py
python scripts/generate_figure_stub.py
- Always run pre-commit before pushing:
pre-commit run --all-files
Quick Start
from plotnado import GenomicFigure
import numpy as np
import pandas as pd
bins = np.arange(1_000_000, 1_100_000, 1_000)
signal = pd.DataFrame({
"chrom": "chr1",
"start": bins,
"end": bins + 1_000,
"value": 5 + 2 * np.sin(np.linspace(0, 6, len(bins))),
})
fig = GenomicFigure()
fig.scalebar()
fig.axis()
fig.genes("hg38")
fig.bigwig(signal, title="Synthetic signal", style="fill", color="#1f77b4")
fig.save("quickstart.png", "chr1:1,010,000-1,080,000")
GenomicFigure() now uses publication-style defaults automatically. Use GenomicFigure(theme=None) to opt out.
Examples
- Start with
python examples/basic_figure.py - Then run
python examples/advanced_features.py - Full curated suite:
python examples/run_examples.py - Additional focused examples live in:
examples/quickstart/examples/tracks/examples/recipes/
All scripts write outputs to examples/output/.
Key Features
- Chainable
GenomicFigureAPI for fast composition. - Alias-based track creation (
fig.add_track("bigwig", ...)). - Track option introspection at runtime.
- Built-in themes, autocolor, autoscale, and highlight overlays.
- Broad track support: BigWig, BED, narrowPeak, genes, axis, scalebar, links,
OverlayTrack, cooler-based matrix tracks.
Discover Track Options
from plotnado import GenomicFigure, BigWigTrack
GenomicFigure.available_track_aliases()
GenomicFigure.track_options("bigwig")
GenomicFigure.track_options_markdown("bigwig")
BigWigTrack.options_markdown()
Documentation
- Docs home:
docs/index.md - Quick start:
docs/quickstart.md - Track catalog + options:
docs/track_catalog.md - API and generated references:
docs/api_reference.md
Build docs locally:
pip install -e .[docs]
mkdocs build --strict
mkdocs serve
CLI
plotnado plot chr1:1,000,000-1,100,000 -o browser_view.png
plotnado track-options bigwig
plotnado track-options --all --output-format json
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
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 plotnado-0.1.tar.gz.
File metadata
- Download URL: plotnado-0.1.tar.gz
- Upload date:
- Size: 8.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee5bfbfa5ea7a2ca703aca81909efcd34a654c4da8428b57c9ce07e5ff269fcb
|
|
| MD5 |
e427d73f9eb081c026c121afb25ef01c
|
|
| BLAKE2b-256 |
d771c75c678c6134f5e3fcb86b338ddfdb241c577b91d8a16a10ecf2510680d2
|
Provenance
The following attestation bundles were made for plotnado-0.1.tar.gz:
Publisher:
publish.yml on alsmith151/plotnado
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plotnado-0.1.tar.gz -
Subject digest:
ee5bfbfa5ea7a2ca703aca81909efcd34a654c4da8428b57c9ce07e5ff269fcb - Sigstore transparency entry: 1076206377
- Sigstore integration time:
-
Permalink:
alsmith151/plotnado@47d00a71fc5f8a682ca5f4e2652a59f180e8e31d -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/alsmith151
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47d00a71fc5f8a682ca5f4e2652a59f180e8e31d -
Trigger Event:
push
-
Statement type:
File details
Details for the file plotnado-0.1-py3-none-any.whl.
File metadata
- Download URL: plotnado-0.1-py3-none-any.whl
- Upload date:
- Size: 7.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0d8505c1e42d1a9824feb310b06c2e757ab58b0da575c6a7ec3f30e40e11b40
|
|
| MD5 |
6cc245e5fb488e83a38e0c51f04d8dbd
|
|
| BLAKE2b-256 |
068aa968a8be55f00234f3d182e092a9bf0ba3a1ad06b514241cb6d19186f9bd
|
Provenance
The following attestation bundles were made for plotnado-0.1-py3-none-any.whl:
Publisher:
publish.yml on alsmith151/plotnado
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
plotnado-0.1-py3-none-any.whl -
Subject digest:
a0d8505c1e42d1a9824feb310b06c2e757ab58b0da575c6a7ec3f30e40e11b40 - Sigstore transparency entry: 1076206387
- Sigstore integration time:
-
Permalink:
alsmith151/plotnado@47d00a71fc5f8a682ca5f4e2652a59f180e8e31d -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/alsmith151
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47d00a71fc5f8a682ca5f4e2652a59f180e8e31d -
Trigger Event:
push
-
Statement type: