API reference

Every public object has its own page. Each class page opens with a summary table of its methods and attributes, followed by the full description of each one.

Most classes here are generated from the GenomeSpy JSON schema and keep their upstream names and property names, so types used in the grammar documents the same objects.

Chart and composition

Charts and composed views. Their methods return new objects, so a chart can be extended without mutating the original.

Chart

An immutable-style builder backed by generated UnitSpec state.

ConcatChart

A grid-concatenated GenomeSpy specification.

HConcatChart

A horizontally concatenated GenomeSpy specification.

ImportedView

A child-view import that can participate in chart composition.

LayerChart

A layered GenomeSpy specification.

MultiscaleChart

A semantic-zoom composition backed by generated schema state.

TopLevelSpec

Shared behavior for top-level GenomeSpy specifications.

VConcatChart

A vertically concatenated GenomeSpy specification.

Encoding channels

One class per encoding channel. Pass them to encode(), or use the field/type shorthand such as "score:Q" for simple cases.

Angle

Generated wrapper for the angle encoding channel.

Color

Generated wrapper for the color encoding channel.

Direction

Generated wrapper for the direction encoding channel.

Dx

Generated wrapper for the dx encoding channel.

Dy

Generated wrapper for the dy encoding channel.

FacetIndex

Generated wrapper for the facetIndex encoding channel.

Fill

Generated wrapper for the fill encoding channel.

FillOpacity

Generated wrapper for the fillOpacity encoding channel.

Key

Generated wrapper for the key encoding channel.

Locus

Create a GenomeSpy chromosomal locus channel definition.

Opacity

Generated wrapper for the opacity encoding channel.

Sample

Generated wrapper for the sample encoding channel.

Search

Generated wrapper for the search encoding channel.

SemanticScore

Generated wrapper for the semanticScore encoding channel.

Shape

Generated wrapper for the shape encoding channel.

Size

Generated wrapper for the size encoding channel.

Stroke

Generated wrapper for the stroke encoding channel.

StrokeOpacity

Generated wrapper for the strokeOpacity encoding channel.

StrokeWidth

Generated wrapper for the strokeWidth encoding channel.

Text

Generated wrapper for the text encoding channel.

Tooltip

Generated wrapper for the tooltip encoding channel.

UniqueId

Generated wrapper for the uniqueId encoding channel.

X

Generated wrapper for the x encoding channel.

X2

Generated wrapper for the x2 encoding channel.

XOffset

Generated wrapper for the xOffset encoding channel.

Y

Generated wrapper for the y encoding channel.

Y2

Generated wrapper for the y2 encoding channel.

YOffset

Generated wrapper for the yOffset encoding channel.

API functions

Constructors and helpers for composition, encoding definitions, parameters, and schema objects.

axes

Create top-level shared axis configuration.

binding

Create a generic input binding.

binding_checkbox

Create a checkbox input binding.

binding_radio

Create a radio input binding.

binding_range

Create a range input binding.

binding_select

Create a select input binding.

compare

Create a sort/compare definition.

concat

Return a concat composition of the given charts.

condition

Create a parameter predicate for a conditional encoding value.

config

Create a top-level GenomeSpy config object.

data_format

Create a data-format wrapper.

datum

Build datum expressions or constant-datum channels.

dynamic_opacity

Create a zoom-dependent opacity definition.

expr

Build expression references, constants, and function calls.

hconcat

Return a hconcat composition of the given charts.

import_view

Create an imported child view from a URL or template.

layer

Return a layer composition of the given charts.

locus

Create a GenomeSpy chromosomal locus channel definition.

multiscale

Return a multiscale composition of the given charts.

param

Create a reusable GenomeSpy parameter handle.

parse

Create a parse mapping for a data format.

ruler

Create a GenomeSpy ruler parameter.

scales

Create top-level shared scale configuration.

selection_interval

Create a GenomeSpy selection_interval parameter.

selection_point

Create a GenomeSpy selection_point parameter.

step

Create a step-sized dimension wrapper.

title

Create a chart title object.

to_arrow_ipc

Serialize a DataFrame-like object as uncompressed Arrow IPC bytes.

value

Create a constant-value encoding channel.

vconcat

Return a vconcat composition of the given charts.

view

Create a view background configuration.

view_config

Create a top-level view config object.

when

Start an Altair-style selection condition.

Schema objects

Schema-backed configuration objects accepted by charts, channels, and helpers.

AxisGenomeData

Generated wrapper for AxisGenomeData.

BrushConfig

Generated wrapper for BrushConfig.

Data

Generated wrapper for Data.

DataFormat

Generated wrapper for DataFormat.

DynamicOpacity

Generated wrapper for DynamicOpacity.

ExprRef

Generated wrapper for ExprRef.

Expression

A composable GenomeSpy expression string.

GenomeAxis

Generated wrapper for GenomeAxis.

HandledTooltip

Generated wrapper for HandledTooltip.

Legend

Generated wrapper for Legend.

Paddings

Generated wrapper for Paddings.

Parameter

Represent a declared GenomeSpy parameter in Python expressions.

Parse

Generated wrapper for Parse.

RulerMarkConfig

Generated wrapper for RulerMarkConfig.

Scale

Generated wrapper for Scale.

SelectionDomainRef

Generated wrapper for SelectionDomainRef.

SizeDef

Generated wrapper for SizeDef.

Step

Generated wrapper for Step.

Title

Generated wrapper for Title.

Data sources

gs.lazy is a ready-made LazyNamespace instance, so a lazy source is created with gs.lazy.bigwig(url) rather than by constructing the namespace.

LazyNamespace

Convenience builders for GenomeSpy lazy data sources.

Data preparation settings

gs.data_transformers controls automatic sharing of inline tables during serialization. It supports consolidate_datasets and temporary overrides with enable(). It does not provide a transformer plugin registry.

DataTransformerSettings

Control whether exported charts share repeated inline tables.

Example datasets

Packaged tables used by the gallery examples. See example datasets for their contents and sources.

available_datasets

Packaged dataset names.

load_dataset

Load a packaged example dataset by name.

DatasetNotFoundError

Dataset name lookup failed.

Notebook rendering

JupyterChart

A lightweight anywidget wrapper around GenomeSpy's embed API.