genome_spy.LazyData

class genome_spy.LazyData(description=Undefined, lazy=Undefined, **kwds)View on GitHub

Bases: GenomeSpySchema

Generated wrapper for LazyData.

Methods

copy(*[, deep])

Return a copy with optional keyword updates.

description(value)

Return a copy with description updated.

lazy([value, addChrPrefix, axis, channel, ...])

Return a copy with a LazyDataParams lazy.

resolve_references()

Return this class schema with referenced properties merged in.

to_dict(*[, validate])

Serialize this schema wrapper to a JSON-compatible dictionary.

to_json(*[, validate])

Serialize this schema wrapper to formatted JSON.

validate(instance)

Validate an instance against this wrapper's schema.

description(value)View on GitHub

Return a copy with description updated.

lazy(value=Undefined, /, *, addChrPrefix=Undefined, axis=Undefined, channel=Undefined, channels=Undefined, columns=Undefined, count=Undefined, dataType=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, format=Undefined, indexUrl=Undefined, maxSummaryPixels=Undefined, mode=Undefined, parse=Undefined, pixelsPerBin=Undefined, sizeMode=Undefined, tags=Undefined, tracks=Undefined, type=Undefined, url=Undefined, values=Undefined, windowSize=Undefined)View on GitHub

Return a copy with a LazyDataParams lazy.

Parameters:
  • addChrPrefix (bool | str) – Add a chr (boolean) or custom (string) prefix to the chromosome names in the Tabix file. __Default value:__ false

  • axis (Axis | AxisKwds) – Optional axis properties

  • channel (PrimaryPositionalChannel_T) – Which channel’s scale domain to monitor. __Default value:__ "x"

  • channels (Sequence[Literal['x', 'y']]) – One or both positional channels, without duplicates. Each contributes xGroup, xStart, xEnd or the corresponding y fields. Two channels produce their Cartesian product. Index/locus endpoints are half-open numeric intervals. Band/point endpoints are category values at the outer edges of each group. Reversing the range swaps these categories. Use band: 0 for Start and band: 1 for End. Point groups span their centers. Guide views should share the data-bearing view’s scales and set domainInert: true.

  • columns (Sequence[str]) – Ordered list of field names for headerless tabix TSV input. If omitted, the source tries to read a commented header line from the tabix file header or the first row of a plain TSV header.

  • count (float) – Number of ticks to generate

  • dataType (Type_T) – The data type of the source channel

  • debounce (float | ExprRef | dict[str, Any]) – Debounce time for data updates, in milliseconds. Debouncing prevents excessive data updates when the user is zooming or panning around. __Default value:__ 200

  • debounceDomainChange (float | ExprRef | dict[str, Any]) – Debounce time for scale-domain driven data updates, in milliseconds. __Default value:__ 200

  • debounceMode (Literal['domain', 'window']) – The debounce mode for data updates. If set to "domain", domain change events (panning and zooming) will be debounced. If set to "window", the data fetches initiated by the changes to the visible window (or tile) will be debounced. If your data is small, the "window" is better as it will start fetching data while the user is still panning around, resulting in a shorter perceived latency. __Default value:__ "window"

  • format (str) – D3 number format specifier for tick labels

  • indexUrl (str | ExprRef | dict[str, Any] | IndexUrlTemplate) – URL of the tabix index file. When url is a template, this can be an index URL template using the same placeholder and values. __Default value:__ url + ".tbi".

  • maxSummaryPixels (float | ExprRef | dict[str, Any]) – Maximum screen width of the finest summary bin when fast mode would otherwise request finer raw bins. Must be nonnegative. Larger values keep summaries in use closer to the data, reducing reads while smoothing smaller features. Set to zero to require summaries to meet the pixelsPerBin target. Coarser requested bins still follow pixelsPerBin. Does not change exact mode or raw-data binning. __Default value:__ 4

  • mode (Literal['exact'] | Literal['fast'] | ExprRef | dict[str, Any]) – Signal query mode. "fast" favors interactive browsing by using rounded summaries when their resolution meets pixelsPerBin or the finest summary fits within maxSummaryPixels. Summary bins can be coarser than requested, smoothing narrow features. NaNs contribute zero: wholly missing bins appear as zero, and partial coverage pulls means toward zero. Values and statistics derived from summary rows, including brush summaries, are approximate and can change with zoom level. If required summaries are unavailable, loading fails without a raw-data fallback. At finer zooms, fast mode uses the same raw queries and resolution as exact mode. "exact" computes bin means from raw values while omitting NaNs. Use it when missing-aware bin means are required; broad views can transfer and decode substantial raw data. Both modes emit bins, so exact mode does not make arbitrary brush-region statistics exact. __Default value:__ "fast"

  • parse (Parse | ParseKwds | None) – Optional type parsing for TSV fields. When omitted, field types are inferred automatically. Set to null to disable spec-based type inference and rely on data inference, or provide a field-to-type map to override selected columns. __Default value:__ "auto"

  • pixelsPerBin (float | ExprRef | dict[str, Any]) – Approximate minimum bin width in pixels; must be positive. Fast mode rounds coarse bin widths up to a power-of-two multiple of the file’s tile size. Finite values, including zero, are preserved. Unwritten Figwig bases are zeros; encode gaps as NaNs to preserve missingness in exact queries. __Default value:__ 2

  • sizeMode (Literal['area', 'strokeWidth']) – Whether size entries should also include the scale output as a stroke width for stroke-based legend symbols.

  • tags (Sequence[str]) – SAM auxiliary tags to expose on each read, for example ["HP", "CB"]. Each tag is available as a field named tag_ followed by the tag name, for example tag_HP. The field is undefined when a read lacks the tag. Tags that are not listed are not decoded.

  • tracks (Sequence[str] | ExprRef | dict[str, Any]) – Track names to load, or an expression returning an array of track names. Omit to load all tracks. An empty array produces empty data.

  • type (Literal['vcf']) – Schema-defined type property.

  • url (str | Sequence[str] | ExprRef | dict[str, Any] | UrlTemplate) – URL of the bgzip-compressed file. URL templates load multiple files and attach the template field to loaded rows.

  • values (Sequence[Scalar_T]) – Explicit tick values

  • windowSize (float) – Size of each chunk when fetching the Tabix file. Data is only fetched when the length of the visible domain smaller than the window size. __Default value:__ 30000000

copy(*, deep=True, **kwds)View on GitHub

Return a copy with optional keyword updates.

classmethod resolve_references()View on GitHub

Return this class schema with referenced properties merged in.

to_dict(*, validate=True)View on GitHub

Serialize this schema wrapper to a JSON-compatible dictionary.

to_json(*, validate=True)View on GitHub

Serialize this schema wrapper to formatted JSON.

classmethod validate(instance)View on GitHub

Validate an instance against this wrapper’s schema.