How kwargs are routed

Track Aliases

GenomicFigure.add_track() accepts a concrete track object or a string alias. Aliases are the bridge between Python, YAML templates, and generated config.

Alias usage

from plotnado import GenomicFigure
from plotnado.examples import REGION, signal
# signal() → DataFrame(chrom, start, end, value) — replace with a BigWig path/URL or DataFrame

fig = GenomicFigure().autocolor("Set2")
fig.add_track("scalebar")
fig.add_track("axis")
fig.add_track("bigwig", data=signal(phase=0.0), title="Replicate A", style="fill")
fig.add_track("bigwig", data=signal(phase=0.9), title="Replicate B", style="fill")
fig.plot(REGION)

Alias-added tracks render the same way as helper-method tracks.
  • Track constructor fields are passed directly.
  • Aesthetics fields such as color, alpha, and style are routed to aesthetics.
  • Label fields such as title, title_color, and title_location are routed to label.
  • If shorthand and nested objects are both supplied, shorthand values win for overlapping keys.

Common aliases

Family Aliases
Structural scalebar, scale, axis, spacer
Signal bigwig, bw, signal, bedgraph, overlay, bigwig_overlay, bigwig_collection, bigwig_diff
Interval bed, annotation, unknown, narrowpeak, links, highlight, hline, vline
Genes genes, gene
Optional matrix cooler, cooler_average, capcruncher
Optional QuantNado quantnado_coverage, quantnado_stranded_coverage, quantnado_methylation, quantnado_variant

Optional matrix and QuantNado aliases require the corresponding dependencies and data formats.

Current alias map

from plotnado import GenomicFigure

aliases = GenomicFigure.available_track_aliases()
rows = ["| Alias | Track class |", "|---|---|"]
rows.extend(f"| `{alias}` | `{target}` |" for alias, target in sorted(aliases.items()))
print("\n".join(rows))
Alias Track class
annotation BedTrack
axis GenomicAxis
bed BedTrack
bedgraph BigWigTrack
bigwig BigWigTrack
bigwig_collection BigWigCollection
bigwig_diff BigWigDiff
bigwig_overlay OverlayTrack
bw BigWigTrack
capcruncher CapcruncherTrack
cooler CoolerTrack
cooler_average CoolerAverage
gene Genes
genes Genes
highlight HighlightsFromFile
hline HLineTrack
links LinksTrack
narrowpeak NarrowPeakTrack
overlay OverlayTrack
quantnado_coverage QuantNadoCoverageTrack
quantnado_methylation QuantNadoMethylationTrack
quantnado_stranded_coverage QuantNadoStrandedCoverageTrack
quantnado_variant QuantNadoVariantTrack
scale ScaleBar
scalebar ScaleBar
signal BigWigTrack
spacer Spacer
unknown BedTrack
vline VLineTrack

Use Track Catalog for choosing track families and Compact Options for field lookup.