A simple plotting library for making genomic tracks
Project description
PlotNado
PlotNado creates genome browser-style figures from Python or YAML templates. It is designed for reproducible genomic plots in scripts, notebooks, Quarto docs, and CLI workflows. Use it when you want compact tracks for BigWig-like signals, BED/narrowPeak intervals, links, genes, and optional matrix/QuantNado data.
Start
Install for day-to-day use:
uv tool install plotnado
plotnado --help
Work from source:
git clone https://github.com/alsmith151/plotnado
cd plotnado
uv sync --extra dev --extra docs
uv run pytest tests/
Python API
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()
.scalebar()
.axis()
.bigwig(signal, title="Synthetic signal", style="fill", color="#1f77b4")
)
fig.save("quickstart.png", region="chr1:1,010,000-1,080,000")
CLI + YAML
uv run plotnado init sample1.bw sample2.bw peaks.narrowpeak --auto --output template.yaml
uv run plotnado validate template.yaml
uv run plotnado plot template.yaml --region chr1:1,000,000-1,100,000 --output browser_view.png
Templates are editable YAML:
genome: hg38
guides:
genes: true
tracks:
- path: sample1.bw
type: bigwig
title: sample1
- path: peaks.narrowpeak
type: narrowpeak
title: peaks
The same template can be loaded from Python:
from plotnado import GenomicFigure
fig = GenomicFigure.from_template("template.yaml")
fig.save("browser_view.png", region="chr1:1,000,000-1,100,000")
What It Covers
- Chainable
GenomicFigureAPI for programmatic plotting. plotnado init,plotnado validate, andplotnado plotfor YAML workflows.- In-memory tabular examples for reproducible docs and notebooks.
- Runtime alias and option lookup through
GenomicFigure.available_track_aliases()andGenomicFigure.track_options(...). - Optional cooler, CapCruncher, and QuantNado tracks when their dependencies and input datasets are installed.
Documentation
Troubleshooting
If a plot is empty, first check that the region overlaps your data and that chromosome names match (chr1 versus 1).
If Quarto uses the wrong Python, render with QUARTO_PYTHON=.venv/bin/python quarto render.
For option names, use GenomicFigure.track_options("bigwig").
Development
uv sync --extra dev --extra docs
uv run pytest tests/
uv run python examples/run_examples.py
uv run plotnado --help
QUARTO_PYTHON=.venv/bin/python quarto render
Docs are Quarto pages with executable Python cells. Prefer deterministic in-memory data in docs examples and keep generated option tables secondary to plotted examples.
Contributions should start with a source install, the test suite, the example runner, and a Quarto render. The main branch is protected, so open a pull request for review.
License
PlotNado is licensed under GPL-3.0-or-later. See LICENSE.
Project details
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.3.1.tar.gz.
File metadata
- Download URL: plotnado-0.3.1.tar.gz
- Upload date:
- Size: 7.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f21241afdedd8a74e347fd6ac238661ceee5c397ec90f314235ce221b7518e5d
|
|
| MD5 |
300275cad6f941fb91a82e24302e2f4c
|
|
| BLAKE2b-256 |
5f9e025c511a17552bf68dc4206ec762ae7dc8f81c0a52b95d5a51efad320315
|
Provenance
The following attestation bundles were made for plotnado-0.3.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.3.1.tar.gz -
Subject digest:
f21241afdedd8a74e347fd6ac238661ceee5c397ec90f314235ce221b7518e5d - Sigstore transparency entry: 1644430527
- Sigstore integration time:
-
Permalink:
alsmith151/plotnado@bcac49ae7e955a8ea80e6c284143f54aa9dbcbe9 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/alsmith151
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bcac49ae7e955a8ea80e6c284143f54aa9dbcbe9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file plotnado-0.3.1-py3-none-any.whl.
File metadata
- Download URL: plotnado-0.3.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.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36f4502cfb1dbb5ee37153529cd3165bb4ae4c3ce23a3f206737f17900d51b88
|
|
| MD5 |
16c3a11567e7d7481214f9bdb4f2e84f
|
|
| BLAKE2b-256 |
999ee5f6f458de802cef09445c43e1e4f53911292eb30956d613a5cd9e74a125
|
Provenance
The following attestation bundles were made for plotnado-0.3.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.3.1-py3-none-any.whl -
Subject digest:
36f4502cfb1dbb5ee37153529cd3165bb4ae4c3ce23a3f206737f17900d51b88 - Sigstore transparency entry: 1644430554
- Sigstore integration time:
-
Permalink:
alsmith151/plotnado@bcac49ae7e955a8ea80e6c284143f54aa9dbcbe9 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/alsmith151
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bcac49ae7e955a8ea80e6c284143f54aa9dbcbe9 -
Trigger Event:
push
-
Statement type: