Datasets:
File size: 15,115 Bytes
f3042bd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | # GenomeSpy 0.88.1 submission contract
Author one complete GenomeSpy 0.88.1 specification for the task. The host renders it in a fixed 900 × 620 CSS-pixel viewport with hg38 assembly metadata supplied by the host.
Submit a complete JavaScript program with the `code` tool. The program returns the complete specification as plain object literals; it does not print it or return a patch. The TypeScript declarations in the appendix are reference only: write plain JavaScript, with no type annotations. Imports, files, and network access are disabled.
Bind the task rows by name with `data: { name: "table" }`. The host replaces each such reference with exactly the rows shown in the task before validation. Do not copy the rows into the specification: inline data is rejected. Views may filter or reuse the same rows.
The program may also read the same rows, for example to compute domains:
```typescript
declare function getData(): Promise<Array<Record<string, unknown>>>;
```
The host accepts a submission only after JSON-Schema validation, native compilation, and a render without console, page, or network errors all succeed. A rejected call returns its stage and error. Repair it by submitting another complete program.
Each attempt is retained for evaluation. The latest submission, not the last accepted one, controls the final outcome: a later invalid submission makes the final outcome invalid even when an earlier accepted chart is retained for audit. Stop after acceptance.
---
# Mechanically generated role-balanced name index
Every unique schema property name appears exactly once in the complete stub section, including underscore-prefixed/internal names. `*` means required in at least one occurrence. The letter is the property's dominant declaring-definition role for navigation only: C=channels, D=data, I=interaction, L=layout-style, R=root, S=scale, M=track-mark, T=transforms, V=view-composition. Lines are alphabetized within roles and interleaved by lexical role in chunks of 12.
## Complete property-name stubs
C: band*, condition, datum, description, domainInert, empty, field*, param*, resolutionChannel, scale, test*, title
D: addChrPrefix, attach, channel*, chrom*, columns*, debounce, debounceDomainChange, debounceMode, delimiter*, dynamicCallbackSource*, indexUrl, lazy*
I: clear, filter, handler*, initial, measure, on, or*, select*, toggle
L: anchor, arcFadingDistance, arcHeightFactor, arrow, axisBottom, axisIndex, axisLeft, axisLocus, axisNominal, axisOrdinal, axisQuantitative, axisRight
R: $schema, angle, annotate, autocomplete, axes, axis, background, baseUrl, bind, chromGrid, chromGridCap, chromGridColor
S: align, assembly, backgroundFill, backgroundFillOpacity, backgroundStroke, backgroundStrokeOpacity, backgroundStrokeWidth, base, bins, bottom-left, bottom-right, clamp
M: buildIndex, clip, cullByVisibleRange, cursor, expr*, includePlotMargin, legend, minLength, strokeCap, strokeDash, strokeDashOffset, tooltip
T: as*, asChrom, asEnd, asKey, asMidpoint, asStart, asValue*, baseField, cardinality, chromLabelSpacing, chromLabelWidth, cigar
V: continuousHeight, continuousWidth, discreteHeight, discreteWidth, import*, shadowBlur, shadowColor, shadowOffsetX, shadowOffsetY, shadowOpacity, strokeZindex
C: value*
D: maxValues, onLoadError, parse, pixelsPerBin, pos*, property, template*, url*, urlsFromFile*, windowSize
L: axisTop, axisX, axisY, baseline, bottom, clampApex, cornerRadius, cornerRadiusBottomLeft, cornerRadiusBottomRight, cornerRadiusTopLeft, cornerRadiusTopRight, disabled
R: chromGridDash, chromGridDashOffset, chromGridFillEven, chromGridFillOdd, chromGridOpacity, chromGridWidth, chromLabelAlign, chromLabelColor, chromLabelFont, chromLabelFontSize, chromLabelFontStyle, chromLabelFontWeight
S: constant, disable, diverging, domainMax, domainMid, domainMin, domainTransition, exponent, fade, gradientLength, gradientOpacity, gradientStrokeColor
M: x2Offset, y2Offset
T: columnPadding, columnRegex*, copyFields, count, dataType, default, element*, ellipsis, end*, exons, extent, fields*
L: display, encodings, filled, fillGradientStrength, fitToBand, flushX, flushY, font, fontStyle, fontWeight, frame, geometricZoomBound
R: chromLabelPadding, chromLabels, chromTickColor, chromTickDash, chromTickDashOffset, chromTicks, chromTickSize, chromTickWidth, color, concat*, config, contigs*
S: gradientStrokeWidth, gradientThickness, heatmap, interpolate, interval*, layout, locus, max, metric, min, nice, nominal
T: fontSize*, from*, gamma, groupby*, ignorePeers, index, key*, labelFlushZoomExtent*, labelOffset*, labelVisible*, labelWidth*, lane
L: hatch, headAngle, headNotchAngle, headPlacement, headShape, headSpacing, headWidth, inwardStroke, left, legendTrack, link, linkShape
R: data*, datasets, direction, domain, domainCap, domainColor, domainDash, domainDashOffset, domainWidth, dx, dy, encoding
S: nominalColorScheme, numberingOffset, ordinal, ordinalColorScheme, padding, paddingInner, paddingOuter, quantitative, quantitativeColorScheme, ramp, range, reverse
T: length*, limit, md, membership, ops*, pos2, positionFactor, preference, preferredOrder, quality, regex*, rowPadding
L: logoLetters, mark*, maxChordLength, minArcHeight, minHeight, minOpacity, minPickingSize, minSize, minStemLength, minWidth, noFadingOnPointSelection, noFadingOnSecondPass
R: epsilon, extraValues, facetIndex, fill, fillOpacity, for, format, genome, genomes, grid, gridCap, gridColor
S: round, scheme, step*, symbolBaseFillColor, symbolBaseStrokeColor, symbolFillColor, symbolOpacity, symbolSize, symbolStrokeColor, symbolStrokeWidth, symbolType, titleLimit
T: score*, set*, sizeMode, skipInvalidInput, skipRegex, sort, start*, stop*, symbolOffset, type*, weight, yExtent
L: paddingX, paddingY, point, rect, reserve, right, rule, sampleFacetPadding, segments, semanticScore, semanticZoomFraction, snap
R: gridDash, gridDashOffset, gridOpacity, gridWidth, grow, halfLife, hconcat*, height, input*, labelAlign*, labelAngle*, labelBaseline*
S: titleOrient, top-left, top-right, wrap, zero, zoom
L: squeeze, startNotch, stem, subtitle, subtitleColor, subtitleFont, subtitleFontSize, subtitleFontStyle, subtitleFontWeight, subtitlePadding, text*, thickness
R: labelColor, labelFlush*, labelFlushOffset*, labelFont, labelFontSize*, labelFontStyle, labelFontWeight, labelLimit, labelOverlap*, labelPadding, labels, labelSeparation*
L: tick, top, viewportEdgeFadeDistanceBottom, viewportEdgeFadeDistanceLeft, viewportEdgeFadeDistanceRight, viewportEdgeFadeDistanceTop, viewportEdgeFadeWidthBottom, viewportEdgeFadeWidthLeft, viewportEdgeFadeWidthRight, viewportEdgeFadeWidthTop
R: layer*, legends, maxExtent, maxPx, minExtent, minPx, multiscale*, name*, offset, opacity, options*, order
R: orient, overhang, params, persist, placeholder, placement, push, px, resolve, ruler*, sample, scales
R: search, separator*, sequence*, shape, size*, source*, spacing, stops*, stroke, strokeOpacity, strokeWidth, style
R: templates, theme, tickCap, tickColor, tickCount, tickDash, tickDashOffset, tickMinStep, ticks, tickSize, tickWidth, titleColor
R: titleFit, titleFont, titleFontSize, titleFontStyle, titleFontWeight, titleOpacity, titlePadding, transform, transition*, uniqueId, unitsPerPixel*, values*
R: vconcat*, view, viewportHeight, viewportWidth, visible, width*, x, x2, xOffset, y, y2, yOffset
R: zindex
## Safe contextual contracts
The remaining budget follows the frozen 5A role-balanced order over (role, property) aliases. A contract appears only when every occurrence for that alias is byte-identical and the shared renderer preserves it safely. Ambiguous, intersected, open-constant, or oversized details remain name-only above; aggregated literal observations are never presented as exhaustive domains.
## Encoding.angle
Object role: `channels`; authored property: `angle`.
Schema pointer: `#/definitions/Encoding/properties/angle`
```typescript
type channels_angle = NumericMarkPropDef;
```
Rotation angle of point and text marks.
## VcfData.addChrPrefix
Object role: `data`; authored property: `addChrPrefix`.
Schema pointer: `#/definitions/VcfData/properties/addChrPrefix`
```typescript
type data_addChrPrefix = boolean | string;
```
Add a `chr` (boolean) or custom (string) prefix to the chromosome names in the Tabix file.
__Default value:__ `false`
---
# Contracts that earlier submissions often got wrong
Each block is the schema contract at a location where earlier submissions for other tasks were rejected. It restates the schema; it is not an example.
Schema contract for CoreRootSpec[0].assembly:
type CoreRootSpec0Assembly = string;
Schema contract for CoreRootSpec[0].genomes:
type CoreRootSpec0Genomes = Record<string, NamedGenomeConfig>;
Schema contract for Scale.domain:
type ScaleDomain = ScalarDomain | ComplexDomain | SelectionDomainRef | ViewportDomainRef | ExprRef | DomainValueArray;
type ScalarDomain = NumericDomain | string[] | boolean[];
type ComplexDomain = ChromosomalLocus[];
type SelectionDomainRef = { encoding?: "x" | "y"; initial?: ScalarDomain | ComplexDomain; param: string };
type ViewportDomainRef = { source: "viewport" };
type ExprRef = { expr: string };
type DomainValueArray = DomainValue[];
type NumericDomain = number[];
type ChromosomalLocus = { chrom: string; pos?: number };
type DomainValue = number | string | boolean | ExprRef;
Schema contract for CoreRootSpec[0].mark:
type CoreRootSpec0Mark = MarkType | MarkProps;
type MarkType = "rect" | "point" | "rule" | "tick" | "text" | "link" | "arrow";
type MarkProps = RectProps | ArrowProps | TextProps | RuleProps | TickProps | LinkProps | PointProps;
type RectProps = { buildIndex?; clip?; color?; cornerRadius?; cornerRadiusBottomLeft?; cornerRadiusBottomRight?; cornerRadiusTopLeft?; cornerRadiusTopRight?; cullByVisibleRange?; cursor?; fill?; fillOpacity?; filled?; hatch?; minHeight?; minOpacity?; minWidth?; opacity?; shadowBlur?; shadowColor?; shadowOffsetX?; shadowOffsetY?; shadowOpacity?; stroke?; strokeOpacity?; strokeWidth?; style?; tooltip?; type: "rect"; x?; x2?; x2Offset?; xOffset?; y?; y2?; y2Offset?; yOffset? };
type ArrowProps = { type: "arrow"; … };
type TextProps = { type: "text"; … };
type RuleProps = { type: "rule"; … };
type TickProps = { type: "tick"; … };
Schema contract for Tooltip:
type Tooltip = HandledTooltip | null | false;
type HandledTooltip = { handler: string; params?: Record<string, unknown> };
Schema contract for TextProps:
type TextProps = { align?; angle?; baseline?; buildIndex?; clip?; color?; cullByVisibleRange?; cursor?; dx?; dy?; fitToBand?; flushX?; flushY?; font?; fontStyle?; fontWeight?; logoLetters?; opacity?; paddingX?; paddingY?; size?; squeeze?; style?; text?; tooltip?; type: "text"; viewportEdgeFadeDistanceBottom?; viewportEdgeFadeDistanceLeft?; viewportEdgeFadeDistanceRight?; viewportEdgeFadeDistanceTop?; viewportEdgeFadeWidthBottom?; viewportEdgeFadeWidthLeft?; viewportEdgeFadeWidthRight?; viewportEdgeFadeWidthTop?; x?; x2?; x2Offset?; xOffset?; y?; y2?; y2Offset?; yOffset? };
Schema contract for Legend:
type Legend = { backgroundFill?: string; backgroundFillOpacity?: number; backgroundStroke?: string; backgroundStrokeOpacity?: number; backgroundStrokeWidth?: number; columns?: number; direction?: LegendDirection; gradientLength?: number; gradientOpacity?: number; gradientStrokeColor?: string; gradientStrokeWidth?: number; gradientThickness?: number; labelLimit?: number; offset?: number; orient?: LegendOrient | ExprRef; padding?: number; style?: string | string[] | null; symbolFillColor?: string; symbolOpacity?: number; symbolSize?: number; symbolStrokeColor?: string; symbolStrokeWidth?: number; symbolType?: string; tickCount?: number; title?: string | null; titleOrient?: LegendTitleOrient; values?: (string | number | boolean)[] };
Schema contract for TickProps:
type TickProps = { buildIndex?: boolean; clip?: boolean | "x" | "y" | "never"; color?: string | ExprRef; cullByVisibleRange?: boolean | "x" | "y"; cursor?: string | ExprRef; minLength?: number | ExprRef; opacity?: number | ExprRef; orient?: "vertical" | "horizontal"; strokeCap?: "butt" | "square" | "round" | ExprRef; strokeDash?: number[]; strokeDashOffset?: number; style?: string | string[]; thickness?: number; tooltip?: Tooltip; type: "tick"; x?: number | ExprRef; x2Offset?: number | ExprRef; xOffset?: number | ExprRef; y?: number | ExprRef; y2Offset?: number | ExprRef; yOffset?: number | ExprRef };
Schema contract for SecondaryChromPosDef:
type SecondaryChromPosDef = { axis?: GenomeAxis | null; band?: number; chrom: FieldName; description?: string; domainInert?: boolean; offset?: number; pos?: FieldName; title?: string | null };
Schema contract for RuleProps:
type RuleProps = { buildIndex?: boolean; clip?: boolean | "x" | "y" | "never"; color?: string | ExprRef; cullByVisibleRange?: boolean | "x" | "y"; cursor?: string | ExprRef; minLength?: number | ExprRef; opacity?: number | ExprRef; size?: number | ExprRef; strokeCap?: "butt" | "square" | "round" | ExprRef; strokeDash?: number[]; strokeDashOffset?: number; style?: string | string[]; tooltip?: Tooltip; type: "rule"; x?: number | ExprRef; x2?: number | ExprRef; x2Offset?: number | ExprRef; xOffset?: number | ExprRef; y?: number | ExprRef; y2?: number | ExprRef; y2Offset?: number | ExprRef; yOffset?: number | ExprRef };
Schema contract for Encoding.x[1]:
type EncodingX1 = { axis?: GenomeAxis | null; band?: number; buildIndex?: boolean; chrom: FieldName; description?: string; domainInert?: boolean; offset?: number; pos?: FieldName; resolutionChannel?: ChannelWithScale; scale?: Scale | null; title?: string | null; type: "locus" };
Schema contract for PositionFieldDef:
type PositionFieldDef = { axis?: GenomeAxis | null; band?: number; description?: string; domainInert?: boolean; field?: string; resolutionChannel?: ChannelWithScale; scale?: Scale | null; title?: string | null; type: Type };
Schema contract for CoreRootSpec[1]:
type CoreRootSpec1 = { $schema?; assembly?; axes?; background?; baseUrl?; config?; cursor?; data?; datasets?; description?; domainInert?; encoding?; genome?; genomes?; height?; layer; legends?; name?; opacity?; overhang?; padding?; params?; resolve?; scales?; templates?; theme?; title?; transform?; view?; viewportHeight?; viewportWidth?; visible?; width?; zindex? };
Schema contract for GenomeConfig:
type GenomeConfig = UrlGenomeConfig | InlineGenomeConfig | GenomeConfigBase;
type UrlGenomeConfig = { name: string; url: string };
type InlineGenomeConfig = { contigs: Contig[]; name: string };
type GenomeConfigBase = { name: string };
Schema contract for InlineGenomeConfig:
type InlineGenomeConfig = { contigs: Contig[]; name: string };
Schema contract for Type:
type Type = "quantitative" | "ordinal" | "nominal" | "index" | "locus";
Schema contract for GenomeConfigBase:
type GenomeConfigBase = { name: string };
Schema contract for ProjectParams.as:
type ProjectParamsAs = string[];
Schema contract for ViewBackground.stroke:
type ViewBackgroundStroke = string;
Schema contract for PositionFieldDef.axis:
type PositionFieldDefAxis = GenomeAxis | null; |