genome_spy.ScaleConfig¶
- class genome_spy.ScaleConfig(align=Undefined, assembly=Undefined, base=Undefined, bins=Undefined, clamp=Undefined, constant=Undefined, domain=Undefined, domainMax=Undefined, domainMid=Undefined, domainMin=Undefined, domainTransition=Undefined, exponent=Undefined, gapPositions=Undefined, gapWidth=Undefined, index=Undefined, interpolate=Undefined, locus=Undefined, name=Undefined, nice=Undefined, nominal=Undefined, nominalColorScheme=Undefined, numberingOffset=Undefined, ordinal=Undefined, ordinalColorScheme=Undefined, padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined, quantitative=Undefined, quantitativeColorScheme=Undefined, range=Undefined, reverse=Undefined, round=Undefined, scheme=Undefined, type=Undefined, viewport=Undefined, zero=Undefined, zoom=Undefined, **kwds)View on GitHub¶
Bases:
GenomeSpySchemaGenerated wrapper for
ScaleConfig.Methods
align(value)Return a copy with
alignupdated.assembly([value, contigs, url])Return a copy with
assemblyupdated.base(value)Return a copy with
baseupdated.bins(value)Return a copy with
binsupdated.clamp(value)Return a copy with
clampupdated.constant(value)Return a copy with
constantupdated.copy(*[, deep])Return a copy with optional keyword updates.
domain([value, encoding, expr, initial, ...])Return a copy with
domainupdated.domainMax(value)Return a copy with
domainMaxupdated.domainMid(value)Return a copy with
domainMidupdated.domainMin(value)Return a copy with
domainMinupdated.domainTransition(value)Return a copy with
domainTransitionupdated.exponent(value)Return a copy with
exponentupdated.gapPositions([value, expr])Return a copy with a
ExprRefgapPositions.gapWidth([value, expr])Return a copy with a
ExprRefgapWidth.index([value, align, assembly, base, bins, ...])Return a copy with
indexupdated.interpolate([value, gamma, type])Return a copy with
interpolateupdated.locus([value, align, assembly, base, bins, ...])Return a copy with
locusupdated.name(value)Return a copy with
nameupdated.nice([value, interval, step])Return a copy with
niceupdated.nominal([value, align, assembly, base, ...])Return a copy with
nominalupdated.nominalColorScheme([value, count, extent, name])Return a copy with
nominalColorSchemeupdated.numberingOffset(value)Return a copy with
numberingOffsetupdated.ordinal([value, align, assembly, base, ...])Return a copy with
ordinalupdated.ordinalColorScheme([value, count, extent, name])Return a copy with
ordinalColorSchemeupdated.padding(value)Return a copy with
paddingupdated.paddingInner(value)Return a copy with
paddingInnerupdated.paddingOuter(value)Return a copy with
paddingOuterupdated.quantitative([value, align, assembly, base, ...])Return a copy with
quantitativeupdated.quantitativeColorScheme([value, count, ...])Return a copy with
quantitativeColorSchemeupdated.range(value)Return a copy with
rangeupdated.Return this class schema with referenced properties merged in.
reverse(value)Return a copy with
reverseupdated.round(value)Return a copy with
roundupdated.scheme([value, count, extent, name])Return a copy with a
SchemeParamsscheme.to_dict(*[, validate])Serialize this schema wrapper to a JSON-compatible dictionary.
to_json(*[, validate])Serialize this schema wrapper to formatted JSON.
type(value)Return a copy with
typeupdated.validate(instance)Validate an instance against this wrapper's schema.
viewport(value)Return a copy with
viewportupdated.zero(value)Return a copy with
zeroupdated.zoom([value, extent])Return a copy with a
ZoomParamszoom.- align(value)View on GitHub¶
Return a copy with
alignupdated.
- assembly(value=Undefined, /, *, contigs=Undefined, url=Undefined)View on GitHub¶
Return a copy with
assemblyupdated.- Parameters:
contigs (Sequence[Contig | dict[str, Any]]) – An array of contigs/sequences in the genome assembly.
url (str) – A URL to a
chrom.sizesfile, which is a tab-separated file with two columns: the sequence name and its size. You may want to strip alternative loci, haplotypes, and other non-canonical contigs from the file. Example:"https://genomespy.app/data/genomes/hg19/chrom.sizes"
- base(value)View on GitHub¶
Return a copy with
baseupdated.
- bins(value)View on GitHub¶
Return a copy with
binsupdated.
- clamp(value)View on GitHub¶
Return a copy with
clampupdated.
- constant(value)View on GitHub¶
Return a copy with
constantupdated.
- domain(value=Undefined, /, *, encoding=Undefined, expr=Undefined, initial=Undefined, mode=Undefined, param=Undefined, source=Undefined)View on GitHub¶
Return a copy with
domainupdated.- Parameters:
encoding (Literal['x', 'y']) – Selection interval channel to use. If omitted, GenomeSpy infers the channel from the scale channel when possible (e.g.,
x->x,x2->x,y->y,y2->y).expr (str) – The expression string.
initial (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]]) – Initial configured domain for the linked scale when the linked interval selection is empty. Only supported when the linked scale is zoomable. Clearing the linked interval selection resets the domain to the normal default/data-derived domain instead of restoring
initial.mode (Literal['intersect', 'contain']) – Determines which positional values contribute to the domain.
"intersect"includes intervals that overlap the viewport."contain"requires both endpoints to be inside it, including its boundaries. Points use inclusive boundaries in either mode. Encoded values are tested before applying band placement or pixel offsets. __Default value:__"intersect".param (str) – Name of an interval selection parameter that provides the domain. The name resolves from the view that owns the scale resolution.
source (Literal['viewport']) – Derives the domain from data in the current positional viewport. The domain is updated shortly after navigation pauses. Normal data-derived domain options, such as
zeroandnice, still apply.
- domainMax(value)View on GitHub¶
Return a copy with
domainMaxupdated.
- domainMid(value)View on GitHub¶
Return a copy with
domainMidupdated.
- domainMin(value)View on GitHub¶
Return a copy with
domainMinupdated.
- domainTransition(value)View on GitHub¶
Return a copy with
domainTransitionupdated.
- exponent(value)View on GitHub¶
Return a copy with
exponentupdated.
- gapPositions(value=Undefined, /, *, expr=Undefined)View on GitHub¶
Return a copy with a
ExprRefgapPositions.- Parameters:
expr (str) – The expression string.
- gapWidth(value=Undefined, /, *, expr=Undefined)View on GitHub¶
Return a copy with a
ExprRefgapWidth.- Parameters:
expr (str) – The expression string.
- index(value=Undefined, /, *, align=Undefined, assembly=Undefined, base=Undefined, bins=Undefined, clamp=Undefined, constant=Undefined, domain=Undefined, domainMax=Undefined, domainMid=Undefined, domainMin=Undefined, domainTransition=Undefined, exponent=Undefined, gapPositions=Undefined, gapWidth=Undefined, interpolate=Undefined, name=Undefined, nice=Undefined, numberingOffset=Undefined, padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined, range=Undefined, reverse=Undefined, round=Undefined, scheme=Undefined, type=Undefined, viewport=Undefined, zero=Undefined, zoom=Undefined)View on GitHub¶
Return a copy with
indexupdated.- Parameters:
align (float) – The alignment of the steps within the scale range. This value must lie in the range
[0,1]. A value of0.5indicates that the steps should be centered within the range. A value of0or1may be used to shift the bands to one side, say to position them adjacent to an axis. __Default value:__0.5assembly (str | UrlGenomeDefinition | dict[str, Any] | InlineGenomeDefinition) – Genome assembly definition for locus scales. This can be: - A string reference to a named assembly (built-in or root-configured). - An inline anonymous assembly that defines either
contigsorurl. If undefined, the default genome from the genome store is used.base (float) – The logarithm base of the
logscale (default10).bins (Sequence[float]) – An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.
clamp (bool) – If
true, values that exceed the data domain are clamped to either the minimum or maximum range value __Default value:__ derived from the Vega-Lite scale config’sclamp(trueby default).constant (float) – A constant determining the slope of the symlog function around zero. Only used for
symlogscales. __Default value:__1domain (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]] | SelectionDomainRef | dict[str, Any] | ViewportDomainRef | ExprRef | Sequence[float | str | bool | ExprRef | dict[str, Any]]) – Customized domain values. For quantitative fields,
domaincan take the form of a two-element array with minimum and maximum values. Vega-Lite piecewise scales can be created by providing adomainwith more than two entries. For ordinal and nominal fields,domaincan be an array that lists valid input values. The domain can also be defined by an expression reference that evaluates to the domain array. Array elements may also be expression references. All parameter names referenced by a scale, including selection-domain parameters, resolve from the view that owns the scale resolution. For a shared scale, declare controlling parameters on that owning composed view or an ancestor.domainMax (float) – Sets the maximum value in the scale domain, overriding the
domainproperty. This property is only intended for use with scales having continuous domains.domainMid (float) – Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for Vega-Lite diverging color scales. The domainMid property is only intended for use with scales supporting continuous, piecewise domains.
domainMin (float) – Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.
domainTransition (bool) – Controls whether domain updates are applied immediately or with a smooth transition. Set this to
falseto apply domain updates immediately. The default istrue, except for domains that includeExprRef``s, which default to ``falseunless overridden. __Default value:__true, exceptfalseforExprRef-driven domains.exponent (float) – The exponent of the
powscale.gapPositions (Sequence[str | float | bool] | Literal['chromosomes'] | ExprRef | dict[str, Any] | None) – Boundaries before which to insert grouping gaps on positional band, point, index, or locus scales. For band/point scales, list domain category values; numeric categories are values, not ranks. Missing or first categories add no gap. Index/locus cuts use numeric coordinates: 10 separates bands 9 and 10.
"chromosomes"inserts gaps between the assembly’s chromosomes. Positions are deduplicated in domain order. An expression may return an array or null. Constant null or an empty array completely disables grouping gaps. __Default value:__ null.gapWidth (float | ExprRef | dict[str, Any] | None) – Grouping gap width in CSS pixels, independent of zoom and device pixel ratio. An expression may return a nonnegative number or null. Constant zero or null completely disables grouping gaps. With step-based sizing, gaps add to plot size while the base step stays fixed. Band/point gaps do not support
round: true. Nested categorical offsets under a gapped band require an explicit offset range. On a step-sized axis, gap expressions must be independent of the resulting plot width or height. __Default value:__ 6 when gapPositions is supplied, otherwise 0.interpolate (ScaleInterpolate_T | ScaleInterpolateParams | ScaleInterpolateParamsKwds) – The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include
rgb,hsl,hsl-long,lab,hcl,hcl-long,cubehelixandcubehelix-long(‘-long’ variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued type property and an optional numeric gamma property applicable to rgb and cubehelix interpolators. For more, see the d3-interpolate documentation. __Default value:__hclname (str) – The name of the scale. Names are optional but allow the scales to be referenced and found with the API.
nice (bool | float | dict[str, Any]) – Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. For quantitative scales such as linear,
nicecan be either a boolean flag or a number. Ifniceis a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain. __Default value:__truefor unbinned quantitative fields;falseotherwise.numberingOffset (float) – The offset added to data values when formatting tick labels on index and locus scales. This property does not transform data values. __Default value:__
0padding (float) – For Vega-Lite continuous scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the
zero,nice,domainMin, anddomainMaxproperties. For Vega-Lite band scales, shortcut for settingpaddingInnerandpaddingOuterto the same value. For Vega-Lite point scales, alias forpaddingOuter. __Default value:__ For continuous scales, derived from the Vega-Lite scale config’scontinuousPadding. For band and point scales, seepaddingInnerandpaddingOuter. By default, Vega-Lite sets padding such that width/height = number of unique values * step.paddingInner (float) – The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1]. For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands). __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingInner.paddingOuter (float) – The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1]. __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingOuterfor band scales andpointPaddingfor point scales. By default, Vega-Lite sets outer padding such that width/height = number of unique values * step.range (Sequence[float | str | ExprRef | dict[str, Any]] | str) – The range of the scale. One of: - A string indicating a pre-defined named scale range from Vega-Lite (e.g., example,
"symbol", or"diverging"). - For Vega-Lite continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a Vega-Lite piecewise scale. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. - For Vega-Lite discrete and Vega-Lite discretizing scales, an array of desired output values. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. __Notes:__ 1) For color scales you can also specify a colorschemeinstead ofrange. 2) Any directly specifiedrangeforxandychannels will be ignored. Range can be customized via the view’s corresponding Vega-Lite size (widthandheight).reverse (bool) – If true, reverses the order of the scale range. __Default value:__
false.round (bool) – If
true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. __Default value:__false.scheme (str | SchemeParams | SchemeParamsKwds) – A string indicating a color Vega-Lite scheme name (e.g.,
"category10"or"blues") or a Vega-Lite scheme parameter object. Discrete color schemes may be used with Vega-Lite discrete or Vega-Lite discretizing scales. Continuous color schemes are intended for use with color scales. For the full list of supported schemes, please refer to the Vega Scheme reference.type (ScaleType_T) – The type of scale. GenomeSpy follows the Vega-Lite scale model; the links below refer to the Vega-Lite documentation: 1) Continuous Scales – mapping continuous domains to continuous output ranges (
"linear","pow","sqrt","symlog","log","time","utc"). 2) Discrete Scales – mapping discrete domains to discrete ("ordinal") or continuous ("band"and"point") output ranges. 3) Discretizing Scales – mapping continuous domains to discrete output ranges"bin-ordinal","quantile","quantize"and"threshold". GenomeSpy also provides index and locus scales for sequence and genomic coordinates. __Default value:__ please see the Vega-Lite scale type table.viewport (Sequence[float] | None) – Initial and reset scale viewport for positional band or point scales, expressed as a half-open rank interval. Fractional endpoints allow smooth navigation. Intervals narrower than one category expand around their midpoint to span one category. The categorical domain retains its membership and order. Categorical zoom uses boolean
zoomand is bounded by the full domain. This scale viewport differs from a layout viewport, which scrolls already-laid-out content usingviewportWidthorviewportHeight. __Default value:__null, fitting all categories.zero (bool) – If
true, ensures that a zero baseline value is included in the scale domain. __Default value:__truefor x and y channels if the quantitative field is not binned and no customdomainis provided;falseotherwise. __Note:__ Log scales do not supportzero.zoom (bool | ZoomParams | ZoomParamsKwds) – Enable interactive zooming and panning on a positional scale. Band and point scales accept a boolean and navigate their scale viewport while retaining the full categorical domain. Continuous scales also accept zoom extent options. __Default value:__
truefor index and locus scales;falseotherwise.
- interpolate(value=Undefined, /, *, gamma=Undefined, type=Undefined)View on GitHub¶
Return a copy with
interpolateupdated.- Parameters:
gamma (float) – Schema-defined
gammaproperty.type (Literal['rgb', 'cubehelix', 'cubehelix-long']) – Schema-defined
typeproperty.
- locus(value=Undefined, /, *, align=Undefined, assembly=Undefined, base=Undefined, bins=Undefined, clamp=Undefined, constant=Undefined, domain=Undefined, domainMax=Undefined, domainMid=Undefined, domainMin=Undefined, domainTransition=Undefined, exponent=Undefined, gapPositions=Undefined, gapWidth=Undefined, interpolate=Undefined, name=Undefined, nice=Undefined, numberingOffset=Undefined, padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined, range=Undefined, reverse=Undefined, round=Undefined, scheme=Undefined, type=Undefined, viewport=Undefined, zero=Undefined, zoom=Undefined)View on GitHub¶
Return a copy with
locusupdated.- Parameters:
align (float) – The alignment of the steps within the scale range. This value must lie in the range
[0,1]. A value of0.5indicates that the steps should be centered within the range. A value of0or1may be used to shift the bands to one side, say to position them adjacent to an axis. __Default value:__0.5assembly (str | UrlGenomeDefinition | dict[str, Any] | InlineGenomeDefinition) – Genome assembly definition for locus scales. This can be: - A string reference to a named assembly (built-in or root-configured). - An inline anonymous assembly that defines either
contigsorurl. If undefined, the default genome from the genome store is used.base (float) – The logarithm base of the
logscale (default10).bins (Sequence[float]) – An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.
clamp (bool) – If
true, values that exceed the data domain are clamped to either the minimum or maximum range value __Default value:__ derived from the Vega-Lite scale config’sclamp(trueby default).constant (float) – A constant determining the slope of the symlog function around zero. Only used for
symlogscales. __Default value:__1domain (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]] | SelectionDomainRef | dict[str, Any] | ViewportDomainRef | ExprRef | Sequence[float | str | bool | ExprRef | dict[str, Any]]) – Customized domain values. For quantitative fields,
domaincan take the form of a two-element array with minimum and maximum values. Vega-Lite piecewise scales can be created by providing adomainwith more than two entries. For ordinal and nominal fields,domaincan be an array that lists valid input values. The domain can also be defined by an expression reference that evaluates to the domain array. Array elements may also be expression references. All parameter names referenced by a scale, including selection-domain parameters, resolve from the view that owns the scale resolution. For a shared scale, declare controlling parameters on that owning composed view or an ancestor.domainMax (float) – Sets the maximum value in the scale domain, overriding the
domainproperty. This property is only intended for use with scales having continuous domains.domainMid (float) – Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for Vega-Lite diverging color scales. The domainMid property is only intended for use with scales supporting continuous, piecewise domains.
domainMin (float) – Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.
domainTransition (bool) – Controls whether domain updates are applied immediately or with a smooth transition. Set this to
falseto apply domain updates immediately. The default istrue, except for domains that includeExprRef``s, which default to ``falseunless overridden. __Default value:__true, exceptfalseforExprRef-driven domains.exponent (float) – The exponent of the
powscale.gapPositions (Sequence[str | float | bool] | Literal['chromosomes'] | ExprRef | dict[str, Any] | None) – Boundaries before which to insert grouping gaps on positional band, point, index, or locus scales. For band/point scales, list domain category values; numeric categories are values, not ranks. Missing or first categories add no gap. Index/locus cuts use numeric coordinates: 10 separates bands 9 and 10.
"chromosomes"inserts gaps between the assembly’s chromosomes. Positions are deduplicated in domain order. An expression may return an array or null. Constant null or an empty array completely disables grouping gaps. __Default value:__ null.gapWidth (float | ExprRef | dict[str, Any] | None) – Grouping gap width in CSS pixels, independent of zoom and device pixel ratio. An expression may return a nonnegative number or null. Constant zero or null completely disables grouping gaps. With step-based sizing, gaps add to plot size while the base step stays fixed. Band/point gaps do not support
round: true. Nested categorical offsets under a gapped band require an explicit offset range. On a step-sized axis, gap expressions must be independent of the resulting plot width or height. __Default value:__ 6 when gapPositions is supplied, otherwise 0.interpolate (ScaleInterpolate_T | ScaleInterpolateParams | ScaleInterpolateParamsKwds) – The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include
rgb,hsl,hsl-long,lab,hcl,hcl-long,cubehelixandcubehelix-long(‘-long’ variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued type property and an optional numeric gamma property applicable to rgb and cubehelix interpolators. For more, see the d3-interpolate documentation. __Default value:__hclname (str) – The name of the scale. Names are optional but allow the scales to be referenced and found with the API.
nice (bool | float | dict[str, Any]) – Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. For quantitative scales such as linear,
nicecan be either a boolean flag or a number. Ifniceis a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain. __Default value:__truefor unbinned quantitative fields;falseotherwise.numberingOffset (float) – The offset added to data values when formatting tick labels on index and locus scales. This property does not transform data values. __Default value:__
0padding (float) – For Vega-Lite continuous scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the
zero,nice,domainMin, anddomainMaxproperties. For Vega-Lite band scales, shortcut for settingpaddingInnerandpaddingOuterto the same value. For Vega-Lite point scales, alias forpaddingOuter. __Default value:__ For continuous scales, derived from the Vega-Lite scale config’scontinuousPadding. For band and point scales, seepaddingInnerandpaddingOuter. By default, Vega-Lite sets padding such that width/height = number of unique values * step.paddingInner (float) – The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1]. For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands). __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingInner.paddingOuter (float) – The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1]. __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingOuterfor band scales andpointPaddingfor point scales. By default, Vega-Lite sets outer padding such that width/height = number of unique values * step.range (Sequence[float | str | ExprRef | dict[str, Any]] | str) – The range of the scale. One of: - A string indicating a pre-defined named scale range from Vega-Lite (e.g., example,
"symbol", or"diverging"). - For Vega-Lite continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a Vega-Lite piecewise scale. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. - For Vega-Lite discrete and Vega-Lite discretizing scales, an array of desired output values. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. __Notes:__ 1) For color scales you can also specify a colorschemeinstead ofrange. 2) Any directly specifiedrangeforxandychannels will be ignored. Range can be customized via the view’s corresponding Vega-Lite size (widthandheight).reverse (bool) – If true, reverses the order of the scale range. __Default value:__
false.round (bool) – If
true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. __Default value:__false.scheme (str | SchemeParams | SchemeParamsKwds) – A string indicating a color Vega-Lite scheme name (e.g.,
"category10"or"blues") or a Vega-Lite scheme parameter object. Discrete color schemes may be used with Vega-Lite discrete or Vega-Lite discretizing scales. Continuous color schemes are intended for use with color scales. For the full list of supported schemes, please refer to the Vega Scheme reference.type (ScaleType_T) – The type of scale. GenomeSpy follows the Vega-Lite scale model; the links below refer to the Vega-Lite documentation: 1) Continuous Scales – mapping continuous domains to continuous output ranges (
"linear","pow","sqrt","symlog","log","time","utc"). 2) Discrete Scales – mapping discrete domains to discrete ("ordinal") or continuous ("band"and"point") output ranges. 3) Discretizing Scales – mapping continuous domains to discrete output ranges"bin-ordinal","quantile","quantize"and"threshold". GenomeSpy also provides index and locus scales for sequence and genomic coordinates. __Default value:__ please see the Vega-Lite scale type table.viewport (Sequence[float] | None) – Initial and reset scale viewport for positional band or point scales, expressed as a half-open rank interval. Fractional endpoints allow smooth navigation. Intervals narrower than one category expand around their midpoint to span one category. The categorical domain retains its membership and order. Categorical zoom uses boolean
zoomand is bounded by the full domain. This scale viewport differs from a layout viewport, which scrolls already-laid-out content usingviewportWidthorviewportHeight. __Default value:__null, fitting all categories.zero (bool) – If
true, ensures that a zero baseline value is included in the scale domain. __Default value:__truefor x and y channels if the quantitative field is not binned and no customdomainis provided;falseotherwise. __Note:__ Log scales do not supportzero.zoom (bool | ZoomParams | ZoomParamsKwds) – Enable interactive zooming and panning on a positional scale. Band and point scales accept a boolean and navigate their scale viewport while retaining the full categorical domain. Continuous scales also accept zoom extent options. __Default value:__
truefor index and locus scales;falseotherwise.
- name(value)View on GitHub¶
Return a copy with
nameupdated.
- nice(value=Undefined, /, *, interval=Undefined, step=Undefined)View on GitHub¶
Return a copy with
niceupdated.
- nominal(value=Undefined, /, *, align=Undefined, assembly=Undefined, base=Undefined, bins=Undefined, clamp=Undefined, constant=Undefined, domain=Undefined, domainMax=Undefined, domainMid=Undefined, domainMin=Undefined, domainTransition=Undefined, exponent=Undefined, gapPositions=Undefined, gapWidth=Undefined, interpolate=Undefined, name=Undefined, nice=Undefined, numberingOffset=Undefined, padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined, range=Undefined, reverse=Undefined, round=Undefined, scheme=Undefined, type=Undefined, viewport=Undefined, zero=Undefined, zoom=Undefined)View on GitHub¶
Return a copy with
nominalupdated.- Parameters:
align (float) – The alignment of the steps within the scale range. This value must lie in the range
[0,1]. A value of0.5indicates that the steps should be centered within the range. A value of0or1may be used to shift the bands to one side, say to position them adjacent to an axis. __Default value:__0.5assembly (str | UrlGenomeDefinition | dict[str, Any] | InlineGenomeDefinition) – Genome assembly definition for locus scales. This can be: - A string reference to a named assembly (built-in or root-configured). - An inline anonymous assembly that defines either
contigsorurl. If undefined, the default genome from the genome store is used.base (float) – The logarithm base of the
logscale (default10).bins (Sequence[float]) – An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.
clamp (bool) – If
true, values that exceed the data domain are clamped to either the minimum or maximum range value __Default value:__ derived from the Vega-Lite scale config’sclamp(trueby default).constant (float) – A constant determining the slope of the symlog function around zero. Only used for
symlogscales. __Default value:__1domain (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]] | SelectionDomainRef | dict[str, Any] | ViewportDomainRef | ExprRef | Sequence[float | str | bool | ExprRef | dict[str, Any]]) – Customized domain values. For quantitative fields,
domaincan take the form of a two-element array with minimum and maximum values. Vega-Lite piecewise scales can be created by providing adomainwith more than two entries. For ordinal and nominal fields,domaincan be an array that lists valid input values. The domain can also be defined by an expression reference that evaluates to the domain array. Array elements may also be expression references. All parameter names referenced by a scale, including selection-domain parameters, resolve from the view that owns the scale resolution. For a shared scale, declare controlling parameters on that owning composed view or an ancestor.domainMax (float) – Sets the maximum value in the scale domain, overriding the
domainproperty. This property is only intended for use with scales having continuous domains.domainMid (float) – Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for Vega-Lite diverging color scales. The domainMid property is only intended for use with scales supporting continuous, piecewise domains.
domainMin (float) – Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.
domainTransition (bool) – Controls whether domain updates are applied immediately or with a smooth transition. Set this to
falseto apply domain updates immediately. The default istrue, except for domains that includeExprRef``s, which default to ``falseunless overridden. __Default value:__true, exceptfalseforExprRef-driven domains.exponent (float) – The exponent of the
powscale.gapPositions (Sequence[str | float | bool] | Literal['chromosomes'] | ExprRef | dict[str, Any] | None) – Boundaries before which to insert grouping gaps on positional band, point, index, or locus scales. For band/point scales, list domain category values; numeric categories are values, not ranks. Missing or first categories add no gap. Index/locus cuts use numeric coordinates: 10 separates bands 9 and 10.
"chromosomes"inserts gaps between the assembly’s chromosomes. Positions are deduplicated in domain order. An expression may return an array or null. Constant null or an empty array completely disables grouping gaps. __Default value:__ null.gapWidth (float | ExprRef | dict[str, Any] | None) – Grouping gap width in CSS pixels, independent of zoom and device pixel ratio. An expression may return a nonnegative number or null. Constant zero or null completely disables grouping gaps. With step-based sizing, gaps add to plot size while the base step stays fixed. Band/point gaps do not support
round: true. Nested categorical offsets under a gapped band require an explicit offset range. On a step-sized axis, gap expressions must be independent of the resulting plot width or height. __Default value:__ 6 when gapPositions is supplied, otherwise 0.interpolate (ScaleInterpolate_T | ScaleInterpolateParams | ScaleInterpolateParamsKwds) – The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include
rgb,hsl,hsl-long,lab,hcl,hcl-long,cubehelixandcubehelix-long(‘-long’ variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued type property and an optional numeric gamma property applicable to rgb and cubehelix interpolators. For more, see the d3-interpolate documentation. __Default value:__hclname (str) – The name of the scale. Names are optional but allow the scales to be referenced and found with the API.
nice (bool | float | dict[str, Any]) – Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. For quantitative scales such as linear,
nicecan be either a boolean flag or a number. Ifniceis a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain. __Default value:__truefor unbinned quantitative fields;falseotherwise.numberingOffset (float) – The offset added to data values when formatting tick labels on index and locus scales. This property does not transform data values. __Default value:__
0padding (float) – For Vega-Lite continuous scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the
zero,nice,domainMin, anddomainMaxproperties. For Vega-Lite band scales, shortcut for settingpaddingInnerandpaddingOuterto the same value. For Vega-Lite point scales, alias forpaddingOuter. __Default value:__ For continuous scales, derived from the Vega-Lite scale config’scontinuousPadding. For band and point scales, seepaddingInnerandpaddingOuter. By default, Vega-Lite sets padding such that width/height = number of unique values * step.paddingInner (float) – The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1]. For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands). __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingInner.paddingOuter (float) – The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1]. __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingOuterfor band scales andpointPaddingfor point scales. By default, Vega-Lite sets outer padding such that width/height = number of unique values * step.range (Sequence[float | str | ExprRef | dict[str, Any]] | str) – The range of the scale. One of: - A string indicating a pre-defined named scale range from Vega-Lite (e.g., example,
"symbol", or"diverging"). - For Vega-Lite continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a Vega-Lite piecewise scale. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. - For Vega-Lite discrete and Vega-Lite discretizing scales, an array of desired output values. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. __Notes:__ 1) For color scales you can also specify a colorschemeinstead ofrange. 2) Any directly specifiedrangeforxandychannels will be ignored. Range can be customized via the view’s corresponding Vega-Lite size (widthandheight).reverse (bool) – If true, reverses the order of the scale range. __Default value:__
false.round (bool) – If
true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. __Default value:__false.scheme (str | SchemeParams | SchemeParamsKwds) – A string indicating a color Vega-Lite scheme name (e.g.,
"category10"or"blues") or a Vega-Lite scheme parameter object. Discrete color schemes may be used with Vega-Lite discrete or Vega-Lite discretizing scales. Continuous color schemes are intended for use with color scales. For the full list of supported schemes, please refer to the Vega Scheme reference.type (ScaleType_T) – The type of scale. GenomeSpy follows the Vega-Lite scale model; the links below refer to the Vega-Lite documentation: 1) Continuous Scales – mapping continuous domains to continuous output ranges (
"linear","pow","sqrt","symlog","log","time","utc"). 2) Discrete Scales – mapping discrete domains to discrete ("ordinal") or continuous ("band"and"point") output ranges. 3) Discretizing Scales – mapping continuous domains to discrete output ranges"bin-ordinal","quantile","quantize"and"threshold". GenomeSpy also provides index and locus scales for sequence and genomic coordinates. __Default value:__ please see the Vega-Lite scale type table.viewport (Sequence[float] | None) – Initial and reset scale viewport for positional band or point scales, expressed as a half-open rank interval. Fractional endpoints allow smooth navigation. Intervals narrower than one category expand around their midpoint to span one category. The categorical domain retains its membership and order. Categorical zoom uses boolean
zoomand is bounded by the full domain. This scale viewport differs from a layout viewport, which scrolls already-laid-out content usingviewportWidthorviewportHeight. __Default value:__null, fitting all categories.zero (bool) – If
true, ensures that a zero baseline value is included in the scale domain. __Default value:__truefor x and y channels if the quantitative field is not binned and no customdomainis provided;falseotherwise. __Note:__ Log scales do not supportzero.zoom (bool | ZoomParams | ZoomParamsKwds) – Enable interactive zooming and panning on a positional scale. Band and point scales accept a boolean and navigate their scale viewport while retaining the full categorical domain. Continuous scales also accept zoom extent options. __Default value:__
truefor index and locus scales;falseotherwise.
- nominalColorScheme(value=Undefined, /, *, count=Undefined, extent=Undefined, name=Undefined)View on GitHub¶
Return a copy with
nominalColorSchemeupdated.- Parameters:
count (float) – The number of colors to use in the scheme. This can be useful for scale types such as
"quantize", which use the length of the scale range to determine the number of discrete bins for the scale domain.extent (Sequence[float]) – The extent of the color range to use. For example
[0.2, 1]will rescale the color scheme such that color values in the range [0, 0.2) are excluded from the scheme.name (str) – A color scheme name for ordinal scales (e.g.,
"category10"or"blues"). For the full list of supported schemes, please refer to the Vega Scheme reference.
- numberingOffset(value)View on GitHub¶
Return a copy with
numberingOffsetupdated.
- ordinal(value=Undefined, /, *, align=Undefined, assembly=Undefined, base=Undefined, bins=Undefined, clamp=Undefined, constant=Undefined, domain=Undefined, domainMax=Undefined, domainMid=Undefined, domainMin=Undefined, domainTransition=Undefined, exponent=Undefined, gapPositions=Undefined, gapWidth=Undefined, interpolate=Undefined, name=Undefined, nice=Undefined, numberingOffset=Undefined, padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined, range=Undefined, reverse=Undefined, round=Undefined, scheme=Undefined, type=Undefined, viewport=Undefined, zero=Undefined, zoom=Undefined)View on GitHub¶
Return a copy with
ordinalupdated.- Parameters:
align (float) – The alignment of the steps within the scale range. This value must lie in the range
[0,1]. A value of0.5indicates that the steps should be centered within the range. A value of0or1may be used to shift the bands to one side, say to position them adjacent to an axis. __Default value:__0.5assembly (str | UrlGenomeDefinition | dict[str, Any] | InlineGenomeDefinition) – Genome assembly definition for locus scales. This can be: - A string reference to a named assembly (built-in or root-configured). - An inline anonymous assembly that defines either
contigsorurl. If undefined, the default genome from the genome store is used.base (float) – The logarithm base of the
logscale (default10).bins (Sequence[float]) – An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.
clamp (bool) – If
true, values that exceed the data domain are clamped to either the minimum or maximum range value __Default value:__ derived from the Vega-Lite scale config’sclamp(trueby default).constant (float) – A constant determining the slope of the symlog function around zero. Only used for
symlogscales. __Default value:__1domain (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]] | SelectionDomainRef | dict[str, Any] | ViewportDomainRef | ExprRef | Sequence[float | str | bool | ExprRef | dict[str, Any]]) – Customized domain values. For quantitative fields,
domaincan take the form of a two-element array with minimum and maximum values. Vega-Lite piecewise scales can be created by providing adomainwith more than two entries. For ordinal and nominal fields,domaincan be an array that lists valid input values. The domain can also be defined by an expression reference that evaluates to the domain array. Array elements may also be expression references. All parameter names referenced by a scale, including selection-domain parameters, resolve from the view that owns the scale resolution. For a shared scale, declare controlling parameters on that owning composed view or an ancestor.domainMax (float) – Sets the maximum value in the scale domain, overriding the
domainproperty. This property is only intended for use with scales having continuous domains.domainMid (float) – Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for Vega-Lite diverging color scales. The domainMid property is only intended for use with scales supporting continuous, piecewise domains.
domainMin (float) – Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.
domainTransition (bool) – Controls whether domain updates are applied immediately or with a smooth transition. Set this to
falseto apply domain updates immediately. The default istrue, except for domains that includeExprRef``s, which default to ``falseunless overridden. __Default value:__true, exceptfalseforExprRef-driven domains.exponent (float) – The exponent of the
powscale.gapPositions (Sequence[str | float | bool] | Literal['chromosomes'] | ExprRef | dict[str, Any] | None) – Boundaries before which to insert grouping gaps on positional band, point, index, or locus scales. For band/point scales, list domain category values; numeric categories are values, not ranks. Missing or first categories add no gap. Index/locus cuts use numeric coordinates: 10 separates bands 9 and 10.
"chromosomes"inserts gaps between the assembly’s chromosomes. Positions are deduplicated in domain order. An expression may return an array or null. Constant null or an empty array completely disables grouping gaps. __Default value:__ null.gapWidth (float | ExprRef | dict[str, Any] | None) – Grouping gap width in CSS pixels, independent of zoom and device pixel ratio. An expression may return a nonnegative number or null. Constant zero or null completely disables grouping gaps. With step-based sizing, gaps add to plot size while the base step stays fixed. Band/point gaps do not support
round: true. Nested categorical offsets under a gapped band require an explicit offset range. On a step-sized axis, gap expressions must be independent of the resulting plot width or height. __Default value:__ 6 when gapPositions is supplied, otherwise 0.interpolate (ScaleInterpolate_T | ScaleInterpolateParams | ScaleInterpolateParamsKwds) – The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include
rgb,hsl,hsl-long,lab,hcl,hcl-long,cubehelixandcubehelix-long(‘-long’ variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued type property and an optional numeric gamma property applicable to rgb and cubehelix interpolators. For more, see the d3-interpolate documentation. __Default value:__hclname (str) – The name of the scale. Names are optional but allow the scales to be referenced and found with the API.
nice (bool | float | dict[str, Any]) – Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. For quantitative scales such as linear,
nicecan be either a boolean flag or a number. Ifniceis a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain. __Default value:__truefor unbinned quantitative fields;falseotherwise.numberingOffset (float) – The offset added to data values when formatting tick labels on index and locus scales. This property does not transform data values. __Default value:__
0padding (float) – For Vega-Lite continuous scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the
zero,nice,domainMin, anddomainMaxproperties. For Vega-Lite band scales, shortcut for settingpaddingInnerandpaddingOuterto the same value. For Vega-Lite point scales, alias forpaddingOuter. __Default value:__ For continuous scales, derived from the Vega-Lite scale config’scontinuousPadding. For band and point scales, seepaddingInnerandpaddingOuter. By default, Vega-Lite sets padding such that width/height = number of unique values * step.paddingInner (float) – The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1]. For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands). __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingInner.paddingOuter (float) – The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1]. __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingOuterfor band scales andpointPaddingfor point scales. By default, Vega-Lite sets outer padding such that width/height = number of unique values * step.range (Sequence[float | str | ExprRef | dict[str, Any]] | str) – The range of the scale. One of: - A string indicating a pre-defined named scale range from Vega-Lite (e.g., example,
"symbol", or"diverging"). - For Vega-Lite continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a Vega-Lite piecewise scale. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. - For Vega-Lite discrete and Vega-Lite discretizing scales, an array of desired output values. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. __Notes:__ 1) For color scales you can also specify a colorschemeinstead ofrange. 2) Any directly specifiedrangeforxandychannels will be ignored. Range can be customized via the view’s corresponding Vega-Lite size (widthandheight).reverse (bool) – If true, reverses the order of the scale range. __Default value:__
false.round (bool) – If
true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. __Default value:__false.scheme (str | SchemeParams | SchemeParamsKwds) – A string indicating a color Vega-Lite scheme name (e.g.,
"category10"or"blues") or a Vega-Lite scheme parameter object. Discrete color schemes may be used with Vega-Lite discrete or Vega-Lite discretizing scales. Continuous color schemes are intended for use with color scales. For the full list of supported schemes, please refer to the Vega Scheme reference.type (ScaleType_T) – The type of scale. GenomeSpy follows the Vega-Lite scale model; the links below refer to the Vega-Lite documentation: 1) Continuous Scales – mapping continuous domains to continuous output ranges (
"linear","pow","sqrt","symlog","log","time","utc"). 2) Discrete Scales – mapping discrete domains to discrete ("ordinal") or continuous ("band"and"point") output ranges. 3) Discretizing Scales – mapping continuous domains to discrete output ranges"bin-ordinal","quantile","quantize"and"threshold". GenomeSpy also provides index and locus scales for sequence and genomic coordinates. __Default value:__ please see the Vega-Lite scale type table.viewport (Sequence[float] | None) – Initial and reset scale viewport for positional band or point scales, expressed as a half-open rank interval. Fractional endpoints allow smooth navigation. Intervals narrower than one category expand around their midpoint to span one category. The categorical domain retains its membership and order. Categorical zoom uses boolean
zoomand is bounded by the full domain. This scale viewport differs from a layout viewport, which scrolls already-laid-out content usingviewportWidthorviewportHeight. __Default value:__null, fitting all categories.zero (bool) – If
true, ensures that a zero baseline value is included in the scale domain. __Default value:__truefor x and y channels if the quantitative field is not binned and no customdomainis provided;falseotherwise. __Note:__ Log scales do not supportzero.zoom (bool | ZoomParams | ZoomParamsKwds) – Enable interactive zooming and panning on a positional scale. Band and point scales accept a boolean and navigate their scale viewport while retaining the full categorical domain. Continuous scales also accept zoom extent options. __Default value:__
truefor index and locus scales;falseotherwise.
- ordinalColorScheme(value=Undefined, /, *, count=Undefined, extent=Undefined, name=Undefined)View on GitHub¶
Return a copy with
ordinalColorSchemeupdated.- Parameters:
count (float) – The number of colors to use in the scheme. This can be useful for scale types such as
"quantize", which use the length of the scale range to determine the number of discrete bins for the scale domain.extent (Sequence[float]) – The extent of the color range to use. For example
[0.2, 1]will rescale the color scheme such that color values in the range [0, 0.2) are excluded from the scheme.name (str) – A color scheme name for ordinal scales (e.g.,
"category10"or"blues"). For the full list of supported schemes, please refer to the Vega Scheme reference.
- padding(value)View on GitHub¶
Return a copy with
paddingupdated.
- paddingInner(value)View on GitHub¶
Return a copy with
paddingInnerupdated.
- paddingOuter(value)View on GitHub¶
Return a copy with
paddingOuterupdated.
- quantitative(value=Undefined, /, *, align=Undefined, assembly=Undefined, base=Undefined, bins=Undefined, clamp=Undefined, constant=Undefined, domain=Undefined, domainMax=Undefined, domainMid=Undefined, domainMin=Undefined, domainTransition=Undefined, exponent=Undefined, gapPositions=Undefined, gapWidth=Undefined, interpolate=Undefined, name=Undefined, nice=Undefined, numberingOffset=Undefined, padding=Undefined, paddingInner=Undefined, paddingOuter=Undefined, range=Undefined, reverse=Undefined, round=Undefined, scheme=Undefined, type=Undefined, viewport=Undefined, zero=Undefined, zoom=Undefined)View on GitHub¶
Return a copy with
quantitativeupdated.- Parameters:
align (float) – The alignment of the steps within the scale range. This value must lie in the range
[0,1]. A value of0.5indicates that the steps should be centered within the range. A value of0or1may be used to shift the bands to one side, say to position them adjacent to an axis. __Default value:__0.5assembly (str | UrlGenomeDefinition | dict[str, Any] | InlineGenomeDefinition) – Genome assembly definition for locus scales. This can be: - A string reference to a named assembly (built-in or root-configured). - An inline anonymous assembly that defines either
contigsorurl. If undefined, the default genome from the genome store is used.base (float) – The logarithm base of the
logscale (default10).bins (Sequence[float]) – An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.
clamp (bool) – If
true, values that exceed the data domain are clamped to either the minimum or maximum range value __Default value:__ derived from the Vega-Lite scale config’sclamp(trueby default).constant (float) – A constant determining the slope of the symlog function around zero. Only used for
symlogscales. __Default value:__1domain (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]] | SelectionDomainRef | dict[str, Any] | ViewportDomainRef | ExprRef | Sequence[float | str | bool | ExprRef | dict[str, Any]]) – Customized domain values. For quantitative fields,
domaincan take the form of a two-element array with minimum and maximum values. Vega-Lite piecewise scales can be created by providing adomainwith more than two entries. For ordinal and nominal fields,domaincan be an array that lists valid input values. The domain can also be defined by an expression reference that evaluates to the domain array. Array elements may also be expression references. All parameter names referenced by a scale, including selection-domain parameters, resolve from the view that owns the scale resolution. For a shared scale, declare controlling parameters on that owning composed view or an ancestor.domainMax (float) – Sets the maximum value in the scale domain, overriding the
domainproperty. This property is only intended for use with scales having continuous domains.domainMid (float) – Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for Vega-Lite diverging color scales. The domainMid property is only intended for use with scales supporting continuous, piecewise domains.
domainMin (float) – Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.
domainTransition (bool) – Controls whether domain updates are applied immediately or with a smooth transition. Set this to
falseto apply domain updates immediately. The default istrue, except for domains that includeExprRef``s, which default to ``falseunless overridden. __Default value:__true, exceptfalseforExprRef-driven domains.exponent (float) – The exponent of the
powscale.gapPositions (Sequence[str | float | bool] | Literal['chromosomes'] | ExprRef | dict[str, Any] | None) – Boundaries before which to insert grouping gaps on positional band, point, index, or locus scales. For band/point scales, list domain category values; numeric categories are values, not ranks. Missing or first categories add no gap. Index/locus cuts use numeric coordinates: 10 separates bands 9 and 10.
"chromosomes"inserts gaps between the assembly’s chromosomes. Positions are deduplicated in domain order. An expression may return an array or null. Constant null or an empty array completely disables grouping gaps. __Default value:__ null.gapWidth (float | ExprRef | dict[str, Any] | None) – Grouping gap width in CSS pixels, independent of zoom and device pixel ratio. An expression may return a nonnegative number or null. Constant zero or null completely disables grouping gaps. With step-based sizing, gaps add to plot size while the base step stays fixed. Band/point gaps do not support
round: true. Nested categorical offsets under a gapped band require an explicit offset range. On a step-sized axis, gap expressions must be independent of the resulting plot width or height. __Default value:__ 6 when gapPositions is supplied, otherwise 0.interpolate (ScaleInterpolate_T | ScaleInterpolateParams | ScaleInterpolateParamsKwds) – The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include
rgb,hsl,hsl-long,lab,hcl,hcl-long,cubehelixandcubehelix-long(‘-long’ variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued type property and an optional numeric gamma property applicable to rgb and cubehelix interpolators. For more, see the d3-interpolate documentation. __Default value:__hclname (str) – The name of the scale. Names are optional but allow the scales to be referenced and found with the API.
nice (bool | float | dict[str, Any]) – Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. For quantitative scales such as linear,
nicecan be either a boolean flag or a number. Ifniceis a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain. __Default value:__truefor unbinned quantitative fields;falseotherwise.numberingOffset (float) – The offset added to data values when formatting tick labels on index and locus scales. This property does not transform data values. __Default value:__
0padding (float) – For Vega-Lite continuous scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the
zero,nice,domainMin, anddomainMaxproperties. For Vega-Lite band scales, shortcut for settingpaddingInnerandpaddingOuterto the same value. For Vega-Lite point scales, alias forpaddingOuter. __Default value:__ For continuous scales, derived from the Vega-Lite scale config’scontinuousPadding. For band and point scales, seepaddingInnerandpaddingOuter. By default, Vega-Lite sets padding such that width/height = number of unique values * step.paddingInner (float) – The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1]. For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands). __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingInner.paddingOuter (float) – The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1]. __Default value:__ derived from the Vega-Lite scale config’s
bandPaddingOuterfor band scales andpointPaddingfor point scales. By default, Vega-Lite sets outer padding such that width/height = number of unique values * step.range (Sequence[float | str | ExprRef | dict[str, Any]] | str) – The range of the scale. One of: - A string indicating a pre-defined named scale range from Vega-Lite (e.g., example,
"symbol", or"diverging"). - For Vega-Lite continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a Vega-Lite piecewise scale. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. - For Vega-Lite discrete and Vega-Lite discretizing scales, an array of desired output values. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. __Notes:__ 1) For color scales you can also specify a colorschemeinstead ofrange. 2) Any directly specifiedrangeforxandychannels will be ignored. Range can be customized via the view’s corresponding Vega-Lite size (widthandheight).reverse (bool) – If true, reverses the order of the scale range. __Default value:__
false.round (bool) – If
true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. __Default value:__false.scheme (str | SchemeParams | SchemeParamsKwds) – A string indicating a color Vega-Lite scheme name (e.g.,
"category10"or"blues") or a Vega-Lite scheme parameter object. Discrete color schemes may be used with Vega-Lite discrete or Vega-Lite discretizing scales. Continuous color schemes are intended for use with color scales. For the full list of supported schemes, please refer to the Vega Scheme reference.type (ScaleType_T) – The type of scale. GenomeSpy follows the Vega-Lite scale model; the links below refer to the Vega-Lite documentation: 1) Continuous Scales – mapping continuous domains to continuous output ranges (
"linear","pow","sqrt","symlog","log","time","utc"). 2) Discrete Scales – mapping discrete domains to discrete ("ordinal") or continuous ("band"and"point") output ranges. 3) Discretizing Scales – mapping continuous domains to discrete output ranges"bin-ordinal","quantile","quantize"and"threshold". GenomeSpy also provides index and locus scales for sequence and genomic coordinates. __Default value:__ please see the Vega-Lite scale type table.viewport (Sequence[float] | None) – Initial and reset scale viewport for positional band or point scales, expressed as a half-open rank interval. Fractional endpoints allow smooth navigation. Intervals narrower than one category expand around their midpoint to span one category. The categorical domain retains its membership and order. Categorical zoom uses boolean
zoomand is bounded by the full domain. This scale viewport differs from a layout viewport, which scrolls already-laid-out content usingviewportWidthorviewportHeight. __Default value:__null, fitting all categories.zero (bool) – If
true, ensures that a zero baseline value is included in the scale domain. __Default value:__truefor x and y channels if the quantitative field is not binned and no customdomainis provided;falseotherwise. __Note:__ Log scales do not supportzero.zoom (bool | ZoomParams | ZoomParamsKwds) – Enable interactive zooming and panning on a positional scale. Band and point scales accept a boolean and navigate their scale viewport while retaining the full categorical domain. Continuous scales also accept zoom extent options. __Default value:__
truefor index and locus scales;falseotherwise.
- quantitativeColorScheme(value=Undefined, /, *, count=Undefined, extent=Undefined, name=Undefined)View on GitHub¶
Return a copy with
quantitativeColorSchemeupdated.- Parameters:
count (float) – The number of colors to use in the scheme. This can be useful for scale types such as
"quantize", which use the length of the scale range to determine the number of discrete bins for the scale domain.extent (Sequence[float]) – The extent of the color range to use. For example
[0.2, 1]will rescale the color scheme such that color values in the range [0, 0.2) are excluded from the scheme.name (str) – A color scheme name for ordinal scales (e.g.,
"category10"or"blues"). For the full list of supported schemes, please refer to the Vega Scheme reference.
- range(value)View on GitHub¶
Return a copy with
rangeupdated.
- reverse(value)View on GitHub¶
Return a copy with
reverseupdated.
- round(value)View on GitHub¶
Return a copy with
roundupdated.
- scheme(value=Undefined, /, *, count=Undefined, extent=Undefined, name=Undefined)View on GitHub¶
Return a copy with a
SchemeParamsscheme.- Parameters:
count (float) – The number of colors to use in the scheme. This can be useful for scale types such as
"quantize", which use the length of the scale range to determine the number of discrete bins for the scale domain.extent (Sequence[float]) – The extent of the color range to use. For example
[0.2, 1]will rescale the color scheme such that color values in the range [0, 0.2) are excluded from the scheme.name (str) – A color scheme name for ordinal scales (e.g.,
"category10"or"blues"). For the full list of supported schemes, please refer to the Vega Scheme reference.
- type(value)View on GitHub¶
Return a copy with
typeupdated.
- viewport(value)View on GitHub¶
Return a copy with
viewportupdated.
- zero(value)View on GitHub¶
Return a copy with
zeroupdated.
- zoom(value=Undefined, /, *, extent=Undefined)View on GitHub¶
Return a copy with a
ZoomParamszoom.- Parameters:
extent (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]] | Literal['data'] | Literal['unbounded']) – The boundaries that limit zoom and pan interactions on continuous scales. Band and point scales use the full categorical domain as their bounds and accept only a boolean
zoomproperty. A domain array sets explicit boundaries."data"derives the boundaries from the data that contributes to the scale domain. For index and quantitative scales,"unbounded"allows zooming and panning without fixed boundaries. Locus scales do not support unbounded zoom. With an unbounded extent, the initial scale domain is used as the reference for thezoomLevel()expression helper and its channel-specific form, such aszoomLevel("x"). __Default value:__ The initial scale domain, except the whole genome for locus scales.
- 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.