@genome-spy/app 1.1.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{SharedReadCache-Ey5QIiPM.js → SharedReadCache-9sT2aIxW.js} +6 -12
- package/dist/__vite-browser-external-Dgu_Ldik.js +7 -0
- package/dist/{agentApi-sPuuT0KS.js → agentApi-BclFF9zB.js} +9981 -8914
- package/dist/agentApi.es.js +6783 -5135
- package/dist/agentShared.es.js +433 -460
- package/dist/arrayUtils-Bm7QnzhN.js +1306 -0
- package/dist/{blosc-JROzDOnd.js → blosc-C-W97QwH.js} +3 -3
- package/dist/{canvas2d-iDK4BC5j.js → canvas2d-8MSf70d4.js} +141 -134
- package/dist/{canvas2d-MXaFeZnP.js → canvas2d-BwGNI_Rx.js} +147 -141
- package/dist/clipOptions-SrrxeAEU.js +4316 -0
- package/dist/clipOptions-clBEbkjv.js +4326 -0
- package/dist/{layoutResult-D50MSHXR.js → color-jETn8xK_.js} +29 -10
- package/dist/color-uTRRsy8i.js +116 -0
- package/dist/{componentStyles-DGtQXvwc.js → componentStyles-C7FbjS-a.js} +1 -1
- package/dist/{viewIdentityRegistry-BIYd4TE0.js → containerView-BItRtKqu.js} +28 -31
- package/dist/{viewIdentityRegistry-BDKkEjXl.js → containerView-CWa6ZIJW.js} +28 -31
- package/dist/{debug-DbigmdrK.js → debug-23s-jja_.js} +10 -9
- package/dist/{debug-BlqDxTw3.js → debug-CWRxvAss.js} +9 -10
- package/dist/dialog.es.js +1 -1
- package/dist/dist-CmY6iewb.js +1501 -0
- package/dist/dist-D6xbz5Ks.js +1501 -0
- package/dist/{esm-CjkeZi__.js → esm-BFwBAnbO.js} +25 -25
- package/dist/esm-BUkWqSr2.js +299 -0
- package/dist/{esm-C-6g-SkZ.js → esm-C0xXMLsR.js} +37 -41
- package/dist/{esm-CJeszW-t.js → esm-C2xhhXs0.js} +7 -7
- package/dist/esm-C6erfjPM.js +252 -0
- package/dist/{esm-DFHFX1sH.js → esm-CVjC7qA4.js} +34 -38
- package/dist/esm-CqY5ezGz.js +1249 -0
- package/dist/esm-DfMIJ_N2.js +1522 -0
- package/dist/esm-Dls41IbZ.js +787 -0
- package/dist/{esm-Bv7Frz7C.js → esm-DzQDfrsZ.js} +7 -10
- package/dist/esm-aGLCvYRP.js +238 -0
- package/dist/{esm-VFJeyk9i.js → esm-nzwgJFGz.js} +40 -36
- package/dist/figWigMetadataSourceAdapter-8Kf_vZRf.js +36 -0
- package/dist/figWigMetadataSourceAdapter-DdDMZpYO.js +36 -0
- package/dist/flowNode-BSjy0Wz3.js +1306 -0
- package/dist/flowOutput-D5qpxWe0.js +183 -0
- package/dist/index.es.js +4766 -5522
- package/dist/index.js +1089 -685
- package/dist/inflate-BdC5KvHn.js +886 -0
- package/dist/{lz4-CUYSbVey.js → lz4-BLPgBOlE.js} +1 -1
- package/dist/markUtils-RaatLEa-.js +78 -0
- package/dist/{metadataChannels-DV62inJh.js → metadataChannels-DLSmx7kU.js} +6 -3
- package/dist/metadataUtils-DxEPe0vj.js +879 -0
- package/dist/order-BnKzKjt4.js +1151 -0
- package/dist/order-BpJnq_nV.js +1150 -0
- package/dist/{parquetRead-0hFIa3Cc.js → parquetRead-D-yY8njE.js} +3 -11
- package/dist/{rasterExport-B62RmAK1.js → rasterExport-B-WrX1pa.js} +5 -5
- package/dist/{rasterExport-DQH3hVg_.js → rasterExport-C_vx4Jwd.js} +4 -4
- package/dist/{rasterization-B05bDo5e.js → rasterization-QktH8Sn2.js} +26 -19
- package/dist/rectangle-BAdoDPXu.js +194 -0
- package/dist/{rectangle-DE98gIxF.js → rectangle-DZTR6NFQ.js} +10 -1
- package/dist/renderCanvas2D-CsRO78Pq.js +291 -0
- package/dist/{renderCanvas2D-Bdv-B4wj.js → renderCanvas2D-Y7pkRzbC.js} +98 -92
- package/dist/{rolldown-runtime-DF993M8W.js → rolldown-runtime-DeIk2rA4.js} +1 -1
- package/dist/{indexer-DbFTKGlm.js → scaleNull-CVzag4z8.js} +2 -12
- package/dist/{indexer-En7gpvLN.js → scaleNull-Pbz7QGnl.js} +2 -12
- package/dist/{scalePosition-ByvlXaML.js → scalePosition-CRXa0rCC.js} +8 -1
- package/dist/schema.json +33403 -16929
- package/dist/style.css +1 -1
- package/dist/{svg-N3tj05-e.js → svg-BBMtLgtM.js} +445 -362
- package/dist/{svg-DHsq1RpV.js → svg-JjWL6U-T.js} +464 -381
- package/dist/{svgRasterizer-CYVDlt5z.js → svgRasterizer-6OcftuoI.js} +3 -3
- package/dist/{svgRasterizer-CvCBlxLj.js → svgRasterizer-DkNRaCPs.js} +4 -4
- package/dist/tableMetadataSourceAdapter-CUNwLsdi.js +291 -0
- package/dist/tableMetadataSourceAdapter-DQrEXCo6.js +1283 -0
- package/dist/url-DeOdSRrv.js +183 -0
- package/dist/viewError-B0TMfOpB.js +33 -0
- package/dist/viewError-D9aO90cI.js +33 -0
- package/dist/{viewSelectors-DDLW-byr.js → viewSelectors-DkFvo33d.js} +914 -752
- package/dist/{viewSelectors-j-F9XwsE.js → viewSelectors-lM93fHAq.js} +942 -780
- package/dist/viewUtils-0SJOewM6.js +6195 -0
- package/dist/webgl-CXIO3OQz.js +5782 -0
- package/dist/webgl-Pdvfhio5.js +5783 -0
- package/package.json +7 -5
- package/src/agentApi/index.d.ts +3 -2
- package/src/agentShared/index.d.ts +2 -0
- package/src/appTypes.d.ts +1 -6
- package/src/embedTypes.d.ts +36 -1
- package/src/index.d.ts +6 -0
- package/src/spec/sampleView.d.ts +68 -13
- package/src/spec/view.d.ts +44 -5
- package/src/state/paramProvenanceTypes.d.ts +25 -2
- package/src/state.d.ts +14 -52
- package/dist/clipOptions-B5PibDq3.js +0 -2923
- package/dist/clipOptions-Cba4I0AO.js +0 -2903
- package/dist/esm-Dndm-NaA.js +0 -1193
- package/dist/order-B4uR9Q04.js +0 -1062
- package/dist/order-BSPy5DI8.js +0 -1062
- package/dist/renderCanvas2D-ChdoHGrU.js +0 -285
- package/dist/vega-scale-Byaw1K8O.js +0 -2446
- package/dist/vega-scale-Ctz_wa3z.js +0 -2443
- package/dist/viewError-BiR9VCgL.js +0 -29
- package/dist/viewUtils-JX6CMEYH.js +0 -6664
- package/dist/webgl-DdmOwEH0.js +0 -5544
- package/dist/webgl-Dw8xqZpX.js +0 -5544
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"contributors": [],
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"homepage": "https://genomespy.app/",
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.3.0",
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"module": "dist/index.es.js",
|
|
14
14
|
"type": "module",
|
|
@@ -58,9 +58,10 @@
|
|
|
58
58
|
"dev": "node dev-server.mjs",
|
|
59
59
|
"build": "rm -rf dist && mkdir -p dist && vite build && vite build --config vite.agent-subpaths.config.js && npm run build:schema && node scripts/verifyProductionBundle.mjs",
|
|
60
60
|
"build:schema": "mkdir -p dist && ts-json-schema-generator --path 'src/spec/*.d.ts' --type AppRootSpec > dist/schema.json",
|
|
61
|
-
"test:tsc": "npm run test:tsc:src && npm run test:tsc:tests",
|
|
61
|
+
"test:tsc": "npm run test:tsc:src && npm run test:tsc:tests && npm run test:tsc:public",
|
|
62
62
|
"test:tsc:src": "tsc -p tsconfig.json --noEmit",
|
|
63
63
|
"test:tsc:tests": "tsc -p tsconfig.tests.json --noEmit",
|
|
64
|
+
"test:tsc:public": "tsc -p tsconfig.public.json --noEmit",
|
|
64
65
|
"smoke:examples:webgpu": "node ../core/scripts/runWebGpuExamples.mjs --scope app --all --compare-webgl",
|
|
65
66
|
"storybook": "storybook dev -p 6006",
|
|
66
67
|
"build-storybook": "storybook build"
|
|
@@ -70,7 +71,8 @@
|
|
|
70
71
|
"@fortawesome/fontawesome-free": "^6.4.2",
|
|
71
72
|
"@fortawesome/fontawesome-svg-core": "^6.4.2",
|
|
72
73
|
"@fortawesome/free-solid-svg-icons": "^6.4.2",
|
|
73
|
-
"@genome-spy/core": "^1.
|
|
74
|
+
"@genome-spy/core": "^1.3.0",
|
|
75
|
+
"@genome-spy/figwig": "^0.3.0",
|
|
74
76
|
"@reduxjs/toolkit": "^2.11.0",
|
|
75
77
|
"d3-color": "^3.1.0",
|
|
76
78
|
"idb": "^7.1.1",
|
|
@@ -83,7 +85,7 @@
|
|
|
83
85
|
"zarrita": "^0.6.1"
|
|
84
86
|
},
|
|
85
87
|
"devDependencies": {
|
|
86
|
-
"@genome-spy/app-agent": "^1.
|
|
87
|
-
"@genome-spy/inspector": "^1.
|
|
88
|
+
"@genome-spy/app-agent": "^1.3.0",
|
|
89
|
+
"@genome-spy/inspector": "^1.3.0"
|
|
88
90
|
}
|
|
89
91
|
}
|
package/src/agentApi/index.d.ts
CHANGED
|
@@ -73,6 +73,8 @@ export interface AgentApi {
|
|
|
73
73
|
paramName: string
|
|
74
74
|
): { description?: string } | undefined;
|
|
75
75
|
|
|
76
|
+
getDatumSearch(): import("@genome-spy/core/types/search.js").DatumSearch;
|
|
77
|
+
getViewApi(): import("@genome-spy/core/types/embedApi.js").ViewApi;
|
|
76
78
|
getSearchableViews(): UnitView[];
|
|
77
79
|
|
|
78
80
|
getViewRoot(): import("@genome-spy/core/view/view.js").default | undefined;
|
|
@@ -82,8 +84,7 @@ export interface AgentApi {
|
|
|
82
84
|
* This is typically the current sample view.
|
|
83
85
|
*/
|
|
84
86
|
getFocusedView():
|
|
85
|
-
|
|
86
|
-
| undefined;
|
|
87
|
+
import("@genome-spy/core/view/view.js").default | undefined;
|
|
87
88
|
|
|
88
89
|
/**
|
|
89
90
|
* Returns the root spec used to summarize the top-level visualization.
|
package/src/appTypes.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BookmarkEntry } from "./bookmark/databaseSchema.js";
|
|
2
|
-
import { EmbedResult } from "@genome-spy/core/types/embedApi.js";
|
|
3
2
|
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
4
3
|
|
|
5
4
|
export type UrlHash = Partial<BookmarkEntry>;
|
|
@@ -70,11 +69,7 @@ export interface AppUiRegistry extends AppUiHost, EventTarget {
|
|
|
70
69
|
registerSidePanel(panel: SidePanelSpec): SidePanelHandle;
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
export type AppEmbedFunction = (
|
|
74
|
-
el: HTMLElement | string,
|
|
75
|
-
spec: import("./spec/appSpec.js").AppRootSpec | string,
|
|
76
|
-
options?: AppEmbedOptions
|
|
77
|
-
) => EmbedResult;
|
|
72
|
+
export type AppEmbedFunction = import("./embedTypes.js").AppEmbedFunction;
|
|
78
73
|
|
|
79
74
|
export interface DependencyQueryDetails {
|
|
80
75
|
/** Name of the queried dependency */
|
package/src/embedTypes.d.ts
CHANGED
|
@@ -1,4 +1,39 @@
|
|
|
1
1
|
import { EmbedResult } from "@genome-spy/core/types/embedApi.js";
|
|
2
|
+
import type {
|
|
3
|
+
ViewApi,
|
|
4
|
+
ViewAddress,
|
|
5
|
+
ViewHandle,
|
|
6
|
+
InsertViewOptions,
|
|
7
|
+
} from "@genome-spy/core/types/embedApi.js";
|
|
8
|
+
import type { AppViewSpec } from "./spec/view.js";
|
|
9
|
+
import type { ImportSpec } from "@genome-spy/core/spec/view.js";
|
|
10
|
+
|
|
11
|
+
/** View mutations available in GenomeSpy App, including SampleSpec insertion. */
|
|
12
|
+
export interface AppViewApi extends Omit<ViewApi, "insert" | "transaction"> {
|
|
13
|
+
insert(
|
|
14
|
+
parent: ViewAddress,
|
|
15
|
+
spec: AppViewSpec | ImportSpec,
|
|
16
|
+
options?: InsertViewOptions
|
|
17
|
+
): Promise<ViewHandle>;
|
|
18
|
+
transaction<T>(callback: (views: AppViewApi) => T | Promise<T>): Promise<T>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface AppEmbedResult extends Omit<EmbedResult, "views"> {
|
|
22
|
+
views: AppViewApi;
|
|
23
|
+
/** Switch bookmark identity/configuration without replacing the App or cohort. */
|
|
24
|
+
setPersistenceContext(context: AppPersistenceContext | null): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Source bookmark configuration; dynamic changes do not start a bookmark tour. */
|
|
28
|
+
export interface AppPersistenceContext {
|
|
29
|
+
specId?: string;
|
|
30
|
+
baseUrl?: string;
|
|
31
|
+
/** Absolute URL, or a relative URL accompanied by baseUrl. */
|
|
32
|
+
remoteBookmarks?: Pick<
|
|
33
|
+
import("./spec/appSpec.js").RemoteBookmarkConfig,
|
|
34
|
+
"url"
|
|
35
|
+
>;
|
|
36
|
+
}
|
|
2
37
|
|
|
3
38
|
export type AppEmbedOptions = import("./appTypes.js").AppEmbedOptions;
|
|
4
39
|
|
|
@@ -6,4 +41,4 @@ export type AppEmbedFunction = (
|
|
|
6
41
|
el: HTMLElement | string,
|
|
7
42
|
spec: import("./spec/appSpec.js").AppRootSpec | string,
|
|
8
43
|
options?: AppEmbedOptions
|
|
9
|
-
) => Promise<
|
|
44
|
+
) => Promise<AppEmbedResult>;
|
package/src/index.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export * from "./agentShared/index.js";
|
|
|
6
6
|
export { BaseDialog, showDialog, showMessageDialog } from "./dialog/index.js";
|
|
7
7
|
|
|
8
8
|
export declare const embed: AppEmbedFunction;
|
|
9
|
+
export type {
|
|
10
|
+
AppViewApi,
|
|
11
|
+
AppEmbedResult,
|
|
12
|
+
AppPersistenceContext,
|
|
13
|
+
} from "./embedTypes.d.ts";
|
|
9
14
|
export type * from "./appTypes.d.ts";
|
|
10
15
|
export type * from "./sampleView/types.d.ts";
|
|
11
16
|
export type * from "./sampleView/state/sampleState.d.ts";
|
|
@@ -13,4 +18,5 @@ export type * from "./sampleView/state/payloadTypes.d.ts";
|
|
|
13
18
|
export type {
|
|
14
19
|
SampleAttributeDef,
|
|
15
20
|
SampleAttributeType,
|
|
21
|
+
SampleSpec,
|
|
16
22
|
} from "./spec/sampleView.d.ts";
|
package/src/spec/sampleView.d.ts
CHANGED
|
@@ -2,7 +2,12 @@ import { Data, InlineData, UrlData } from "@genome-spy/core/spec/data.js";
|
|
|
2
2
|
import { Align, FontStyle, FontWeight } from "@genome-spy/core/spec/font.js";
|
|
3
3
|
import { Scale } from "@genome-spy/core/spec/scale.js";
|
|
4
4
|
import { Title } from "@genome-spy/core/spec/title.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ExprRef } from "@genome-spy/core/spec/parameter.js";
|
|
6
|
+
import {
|
|
7
|
+
ViewSpecBase,
|
|
8
|
+
ViewBackground,
|
|
9
|
+
SizeDef,
|
|
10
|
+
} from "@genome-spy/core/spec/view.js";
|
|
6
11
|
import {
|
|
7
12
|
AppConfigurableVisibilitySpec,
|
|
8
13
|
AppLayerSpec,
|
|
@@ -13,7 +18,16 @@ import {
|
|
|
13
18
|
/**
|
|
14
19
|
* A view specification for a SampleView.
|
|
15
20
|
*/
|
|
16
|
-
export interface SampleSpec extends Omit<
|
|
21
|
+
export interface SampleSpec extends Omit<
|
|
22
|
+
ViewSpecBase,
|
|
23
|
+
"templates" | "viewportWidth" | "viewportHeight"
|
|
24
|
+
> {
|
|
25
|
+
/** Visible width. Sample views do not support viewport anchors. */
|
|
26
|
+
viewportWidth?: SizeDef | number | ExprRef | "container";
|
|
27
|
+
|
|
28
|
+
/** Visible height. Sample views do not support viewport anchors. */
|
|
29
|
+
viewportHeight?: SizeDef | number | ExprRef | "container";
|
|
30
|
+
|
|
17
31
|
/**
|
|
18
32
|
* Is the SampleView visibility configurable from the GenomeSpy App toolbar.
|
|
19
33
|
*
|
|
@@ -95,11 +109,7 @@ export interface SampleYAxisDef {
|
|
|
95
109
|
export type SampleAttributeType = "nominal" | "ordinal" | "quantitative";
|
|
96
110
|
|
|
97
111
|
export type SampleAttributeSemanticType =
|
|
98
|
-
| "
|
|
99
|
-
| "modelSystemId"
|
|
100
|
-
| "timeToEvent"
|
|
101
|
-
| "eventStatus"
|
|
102
|
-
| "category";
|
|
112
|
+
"subjectId" | "modelSystemId" | "timeToEvent" | "eventStatus" | "category";
|
|
103
113
|
|
|
104
114
|
export interface SampleAttributeDef {
|
|
105
115
|
/**
|
|
@@ -155,7 +165,15 @@ export interface SampleAttributeDef {
|
|
|
155
165
|
title?: string;
|
|
156
166
|
}
|
|
157
167
|
|
|
158
|
-
|
|
168
|
+
/**
|
|
169
|
+
* The authoritative sample collection. Use `"metadata"` to select the sole
|
|
170
|
+
* metadata source, or reference a specific source with `metadataSource`.
|
|
171
|
+
* Explicit data remains available for a separate cohort or ordering.
|
|
172
|
+
*/
|
|
173
|
+
export type SampleIdentityDef =
|
|
174
|
+
DataSampleIdentityDef | MetadataSampleIdentityDef | "metadata";
|
|
175
|
+
|
|
176
|
+
export interface DataSampleIdentityDef {
|
|
159
177
|
/**
|
|
160
178
|
* Data source that defines the sample set for the view.
|
|
161
179
|
*
|
|
@@ -179,6 +197,26 @@ export interface SampleIdentityDef {
|
|
|
179
197
|
displayNameField?: string;
|
|
180
198
|
}
|
|
181
199
|
|
|
200
|
+
export interface MetadataSampleIdentityDef {
|
|
201
|
+
/**
|
|
202
|
+
* Id of the configured metadata source that defines the sample set and
|
|
203
|
+
* ordering. Canonical sample ids come from that backend, independently of
|
|
204
|
+
* which metadata columns are imported. For Figwig, ids are track names.
|
|
205
|
+
*
|
|
206
|
+
* @minLength 1
|
|
207
|
+
*/
|
|
208
|
+
metadataSource: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Field in the source containing user-visible sample labels. It may be
|
|
212
|
+
* excluded from displayed metadata columns. Missing labels fall back to ids.
|
|
213
|
+
* The backend must support reading the configured label field.
|
|
214
|
+
*
|
|
215
|
+
* If omitted, canonical sample ids are used.
|
|
216
|
+
*/
|
|
217
|
+
displayNameField?: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
182
220
|
export interface ColumnIdentifierField {
|
|
183
221
|
/**
|
|
184
222
|
* Name of the identifier field shown in UI and diagnostics.
|
|
@@ -231,6 +269,19 @@ export interface DataBackendDef {
|
|
|
231
269
|
sampleIdField?: string;
|
|
232
270
|
}
|
|
233
271
|
|
|
272
|
+
export interface FigWigBackendDef {
|
|
273
|
+
backend: "figwig";
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* URL to a Figwig file containing per-track metadata. Track names must
|
|
277
|
+
* match the sample ids in the view. Custom track attributes become metadata
|
|
278
|
+
* columns. Reserved `name`, `dtype`, and `group` fields, and the App's
|
|
279
|
+
* canonical identifier field `sample`, are excluded.
|
|
280
|
+
* Only file metadata is read, without decoding genomic signal.
|
|
281
|
+
*/
|
|
282
|
+
url: string;
|
|
283
|
+
}
|
|
284
|
+
|
|
234
285
|
export interface ZarrMatrixLayoutDef {
|
|
235
286
|
/**
|
|
236
287
|
* Path to matrix values, arranged as sample rows by metadata columns.
|
|
@@ -309,6 +360,7 @@ export interface ArrowBackendDef {
|
|
|
309
360
|
|
|
310
361
|
export type MetadataBackendDef =
|
|
311
362
|
| DataBackendDef
|
|
363
|
+
| FigWigBackendDef
|
|
312
364
|
| ZarrBackendDef
|
|
313
365
|
| ParquetBackendDef
|
|
314
366
|
| ArrowBackendDef;
|
|
@@ -352,9 +404,9 @@ export interface MetadataSourceDef {
|
|
|
352
404
|
/**
|
|
353
405
|
* Column ids that must never be imported from this source.
|
|
354
406
|
*
|
|
355
|
-
* The data backend
|
|
356
|
-
*
|
|
357
|
-
* labels.
|
|
407
|
+
* The data backend excludes its `sampleIdField`, and the Figwig backend
|
|
408
|
+
* excludes reserved track fields and `sample` automatically. Use this
|
|
409
|
+
* property for other helper columns such as display labels.
|
|
358
410
|
*/
|
|
359
411
|
excludeColumns?: string[];
|
|
360
412
|
|
|
@@ -405,8 +457,7 @@ export interface MetadataSourceImportDef {
|
|
|
405
457
|
}
|
|
406
458
|
|
|
407
459
|
export type MetadataSourceEntry =
|
|
408
|
-
|
|
|
409
|
-
| { import: MetadataSourceImportDef };
|
|
460
|
+
MetadataSourceDef | { import: MetadataSourceImportDef };
|
|
410
461
|
|
|
411
462
|
export interface MetadataDef {
|
|
412
463
|
/**
|
|
@@ -501,6 +552,10 @@ export interface MetadataDef {
|
|
|
501
552
|
export interface SampleDef {
|
|
502
553
|
/**
|
|
503
554
|
* Defines the sample ids and optional display names for the sample view.
|
|
555
|
+
* Use `"metadata"` for the sole metadata source, or
|
|
556
|
+
* `{"metadataSource": "source-id", "displayNameField": "label"}` to
|
|
557
|
+
* select a source and its labels. Identity is read even when that source's
|
|
558
|
+
* metadata columns have `initialLoad: false`.
|
|
504
559
|
*
|
|
505
560
|
* If omitted, sample ids are inferred from the `sample` channel in the view
|
|
506
561
|
* data.
|
package/src/spec/view.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConcatSpec as CoreConcatSpec,
|
|
3
|
+
FacetSpec as CoreFacetSpec,
|
|
3
4
|
HConcatSpec as CoreHConcatSpec,
|
|
4
5
|
ImportSpec,
|
|
5
6
|
LayerSpec as CoreLayerSpec,
|
|
6
7
|
MultiscaleSpec as CoreMultiscaleSpec,
|
|
7
8
|
UnitSpec as CoreUnitSpec,
|
|
8
9
|
VConcatSpec as CoreVConcatSpec,
|
|
10
|
+
SurroundSpec as CoreSurroundSpec,
|
|
11
|
+
SurroundSideSpec as CoreSurroundSideSpec,
|
|
12
|
+
Side,
|
|
9
13
|
} from "@genome-spy/core/spec/view.js";
|
|
10
14
|
import { SampleSpec } from "./sampleView.js";
|
|
11
15
|
|
|
@@ -84,10 +88,7 @@ export type AppMultiscaleSpec = Omit<
|
|
|
84
88
|
templates?: Record<string, AppNestedViewSpec>;
|
|
85
89
|
|
|
86
90
|
multiscale: (
|
|
87
|
-
|
|
|
88
|
-
| AppUnitSpec
|
|
89
|
-
| AppMultiscaleSpec
|
|
90
|
-
| ImportSpec
|
|
91
|
+
AppLayerSpec | AppUnitSpec | AppMultiscaleSpec | ImportSpec
|
|
91
92
|
)[];
|
|
92
93
|
};
|
|
93
94
|
|
|
@@ -98,6 +99,13 @@ export type AppVConcatSpec = Omit<CoreVConcatSpec, "templates" | "vconcat"> &
|
|
|
98
99
|
vconcat: (AppViewSpec | ImportSpec)[];
|
|
99
100
|
};
|
|
100
101
|
|
|
102
|
+
export type AppFacetSpec = Omit<CoreFacetSpec, "templates" | "spec"> &
|
|
103
|
+
AppConfigurableVisibilitySpec & {
|
|
104
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
105
|
+
|
|
106
|
+
spec: AppLayerSpec | AppUnitSpec | ImportSpec;
|
|
107
|
+
};
|
|
108
|
+
|
|
101
109
|
export type AppHConcatSpec = Omit<CoreHConcatSpec, "templates" | "hconcat"> &
|
|
102
110
|
AppConfigurableVisibilitySpec & {
|
|
103
111
|
templates?: Record<string, AppNestedViewSpec>;
|
|
@@ -112,13 +120,44 @@ export type AppConcatSpec = Omit<CoreConcatSpec, "templates" | "concat"> &
|
|
|
112
120
|
concat: (AppViewSpec | ImportSpec)[];
|
|
113
121
|
};
|
|
114
122
|
|
|
123
|
+
export type AppSurroundPlotSpec =
|
|
124
|
+
AppUnitSpec | AppLayerSpec | AppMultiscaleSpec | ImportSpec;
|
|
125
|
+
|
|
126
|
+
export type AppSurroundSideSpec = Omit<
|
|
127
|
+
CoreSurroundSideSpec,
|
|
128
|
+
"templates" | "views"
|
|
129
|
+
> &
|
|
130
|
+
AppConfigurableVisibilitySpec & {
|
|
131
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
132
|
+
views: (AppSurroundPlotSpec | AppSurroundSpec)[];
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export type AppSurroundSides = Partial<
|
|
136
|
+
Record<
|
|
137
|
+
Side,
|
|
138
|
+
AppSurroundSideSpec | (AppSurroundPlotSpec | AppSurroundSpec)[]
|
|
139
|
+
>
|
|
140
|
+
>;
|
|
141
|
+
|
|
142
|
+
export type AppSurroundSpec = Omit<
|
|
143
|
+
CoreSurroundSpec,
|
|
144
|
+
"templates" | "spec" | "surround"
|
|
145
|
+
> &
|
|
146
|
+
AppConfigurableVisibilitySpec & {
|
|
147
|
+
templates?: Record<string, AppNestedViewSpec>;
|
|
148
|
+
spec: AppSurroundPlotSpec;
|
|
149
|
+
surround: AppSurroundSides;
|
|
150
|
+
};
|
|
151
|
+
|
|
115
152
|
export type AppNestedViewSpec =
|
|
116
153
|
| AppUnitSpec
|
|
117
154
|
| AppLayerSpec
|
|
118
155
|
| AppMultiscaleSpec
|
|
156
|
+
| AppFacetSpec
|
|
119
157
|
| AppVConcatSpec
|
|
120
158
|
| AppHConcatSpec
|
|
121
|
-
| AppConcatSpec
|
|
159
|
+
| AppConcatSpec
|
|
160
|
+
| AppSurroundSpec;
|
|
122
161
|
|
|
123
162
|
// App root may contain SampleSpec, but recursive descendants cannot.
|
|
124
163
|
export type AppViewSpec = AppNestedViewSpec | SampleSpec;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { Scalar } from "@genome-spy/core/spec/channel.js";
|
|
2
2
|
import type { ChromosomalLocus } from "@genome-spy/core/spec/genome.js";
|
|
3
|
+
import type {
|
|
4
|
+
CategorySelectionChannel,
|
|
5
|
+
GradientSelectionChannel,
|
|
6
|
+
} from "@genome-spy/core/spec/parameter.js";
|
|
3
7
|
import type {
|
|
4
8
|
ParamSelector,
|
|
5
9
|
ViewSelector,
|
|
@@ -41,15 +45,24 @@ export type ParamValueInterval = {
|
|
|
41
45
|
"x" | "y",
|
|
42
46
|
[number, number] | [ChromosomalLocus, ChromosomalLocus] | null
|
|
43
47
|
>
|
|
44
|
-
|
|
48
|
+
> &
|
|
49
|
+
Partial<
|
|
50
|
+
Record<
|
|
51
|
+
GradientSelectionChannel,
|
|
52
|
+
[number, number | "Infinity"] | null
|
|
53
|
+
>
|
|
54
|
+
>;
|
|
45
55
|
};
|
|
46
56
|
|
|
47
|
-
export type
|
|
57
|
+
export type ParamValueRecordPoint = {
|
|
48
58
|
/**
|
|
49
59
|
* Point selection value.
|
|
50
60
|
*/
|
|
51
61
|
type: "point";
|
|
52
62
|
|
|
63
|
+
/** Omitted by existing record bookmarks. */
|
|
64
|
+
membership?: "records";
|
|
65
|
+
|
|
53
66
|
/**
|
|
54
67
|
* Fields used to identify selected points.
|
|
55
68
|
*/
|
|
@@ -61,6 +74,16 @@ export type ParamValuePoint = {
|
|
|
61
74
|
keys: Scalar[][];
|
|
62
75
|
};
|
|
63
76
|
|
|
77
|
+
/** Raw categorical membership, independent of source rows and scale domains. */
|
|
78
|
+
export type ParamValueCategoryPoint = {
|
|
79
|
+
type: "point";
|
|
80
|
+
membership: "categories";
|
|
81
|
+
encodings: [CategorySelectionChannel];
|
|
82
|
+
values: [Scalar][];
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export type ParamValuePoint = ParamValueRecordPoint | ParamValueCategoryPoint;
|
|
86
|
+
|
|
64
87
|
/**
|
|
65
88
|
* Origin of a param value derived from a datum or interval lookup.
|
|
66
89
|
*/
|
package/src/state.d.ts
CHANGED
|
@@ -1,55 +1,18 @@
|
|
|
1
1
|
import { StateWithHistory } from "redux-undo";
|
|
2
2
|
import { SampleHierarchy } from "./sampleView/state/sampleState.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type: "interval";
|
|
17
|
-
intervals: Partial<
|
|
18
|
-
Record<
|
|
19
|
-
"x" | "y",
|
|
20
|
-
[number, number] | [ChromosomalLocus, ChromosomalLocus] | null
|
|
21
|
-
>
|
|
22
|
-
>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface ParamValuePoint {
|
|
26
|
-
type: "point";
|
|
27
|
-
keyFields: string[];
|
|
28
|
-
keys: Scalar[][];
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type ParamValue =
|
|
32
|
-
| ParamValueLiteral
|
|
33
|
-
| ParamValueInterval
|
|
34
|
-
| ParamValuePoint;
|
|
35
|
-
|
|
36
|
-
export interface ParamOrigin {
|
|
37
|
-
type: "datum";
|
|
38
|
-
view: ViewSelector;
|
|
39
|
-
keyField: string;
|
|
40
|
-
key: Scalar;
|
|
41
|
-
intervalSources?: Record<string, { start?: string; end?: string }>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface ParamProvenanceEntry {
|
|
45
|
-
selector: ParamSelector;
|
|
46
|
-
value: ParamValue;
|
|
47
|
-
origin?: ParamOrigin;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface ParamProvenanceState {
|
|
51
|
-
entries: Record<string, ParamProvenanceEntry>;
|
|
52
|
-
}
|
|
3
|
+
import type { ParamProvenanceState } from "./state/paramProvenanceTypes.d.ts";
|
|
4
|
+
|
|
5
|
+
export type {
|
|
6
|
+
ParamValueLiteral,
|
|
7
|
+
ParamValueInterval,
|
|
8
|
+
ParamValuePoint,
|
|
9
|
+
ParamValueRecordPoint,
|
|
10
|
+
ParamValueCategoryPoint,
|
|
11
|
+
ParamValue,
|
|
12
|
+
ParamOrigin,
|
|
13
|
+
ParamProvenanceEntry,
|
|
14
|
+
ParamProvenanceState,
|
|
15
|
+
} from "./state/paramProvenanceTypes.d.ts";
|
|
53
16
|
|
|
54
17
|
export interface ViewSettings {
|
|
55
18
|
/**
|
|
@@ -66,8 +29,7 @@ export interface ViewVisibilityEntry {
|
|
|
66
29
|
}
|
|
67
30
|
|
|
68
31
|
export type ViewVisibilityWire =
|
|
69
|
-
|
|
70
|
-
| Record<string, boolean>;
|
|
32
|
+
ViewVisibilityEntry[] | Record<string, boolean>;
|
|
71
33
|
|
|
72
34
|
export interface ViewSettingsPayload {
|
|
73
35
|
visibilities?: ViewVisibilityWire;
|