genome_spy.Data

class genome_spy.Data(description=Undefined, dynamicCallbackSource=Undefined, format=Undefined, lazy=Undefined, name=Undefined, sequence=Undefined, url=Undefined, values=Undefined, **kwds)View on GitHub

Bases: GenomeSpySchema

Generated wrapper for Data.

Methods

copy(*[, deep])

Return a copy with optional keyword updates.

description(value)

Return a copy with description updated.

dynamicCallbackSource(value)

Return a copy with dynamicCallbackSource updated.

format(value)

Return a copy with format updated.

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

Return a copy with a LazyDataParams lazy.

name(value)

Return a copy with name updated.

resolve_references()

Return this class schema with referenced properties merged in.

sequence([value, as_, start, step, stop])

Return a copy with a SequenceParams sequence.

to_dict(*[, validate])

Serialize this schema wrapper to a JSON-compatible dictionary.

to_json(*[, validate])

Serialize this schema wrapper to formatted JSON.

url(value)

Return a copy with url updated.

validate(instance)

Validate an instance against this wrapper's schema.

values([value])

Return a copy with a InlineDataset values.

description(value)View on GitHub

Return a copy with description updated.

dynamicCallbackSource(value)View on GitHub

Return a copy with dynamicCallbackSource updated.

format(value)View on GitHub

Return a copy with format updated.

lazy(value=Undefined, /, *, addChrPrefix=Undefined, axis=Undefined, channel=Undefined, columns=Undefined, count=Undefined, dataType=Undefined, debounce=Undefined, debounceDomainChange=Undefined, debounceMode=Undefined, format=Undefined, indexUrl=Undefined, parse=Undefined, pixelsPerBin=Undefined, sizeMode=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"

  • 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".

  • 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]) – The approximate minimum width of each data bin, in pixels. __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.

  • 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

name(value)View on GitHub

Return a copy with name updated.

sequence(value=Undefined, /, *, as_=Undefined, start=Undefined, step=Undefined, stop=Undefined)View on GitHub

Return a copy with a SequenceParams sequence.

Parameters:
  • as_ (FieldName_T | ExprRef | dict[str, Any]) – The name of the generated sequence field. __Default value:__ "data"

  • start (float | ExprRef | dict[str, Any]) – The starting value of the sequence (inclusive).

  • step (float | ExprRef | dict[str, Any]) – The step value between sequence entries. __Default value:__ 1

  • stop (float | ExprRef | dict[str, Any]) – The ending value of the sequence (exclusive).

url(value)View on GitHub

Return a copy with url updated.

values(value=Undefined, /)View on GitHub

Return a copy with a InlineDataset values.

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.