@vitessce/comparative 4.1.3 → 4.2.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/{GeometryAndMeshXR-CqZrKpgj.js → GeometryAndMeshXR-CYO2tqUV.js} +1 -1
- package/dist/ReactNeuroglancer-pk3hhe45.js +68657 -0
- package/dist/{XREnterButton-CSyePMXM.js → XREnterButton-BdEVWrV7.js} +1 -1
- package/dist/{XRSceneComponents-lFaSg5aj.js → XRSceneComponents-DYeS3CwE.js} +1 -1
- package/dist/{XRWrapper-CVhBuEjL.js → XRWrapper-DbheKuSQ.js} +2 -2
- package/dist/{deflate-BXZYC1-Y.js → deflate-D76idIbp.js} +1 -1
- package/dist/{higlass-DE1ZWzP3.js → higlass-HE5ijNPv.js} +1 -1
- package/dist/{index-BW8y8e2T.js → index-CSfNzXQa.js} +125915 -124333
- package/dist/index-DOITJzp5.js +30089 -0
- package/dist/{index-DzznGedr.js → index-DeGz6Kci.js} +1 -1
- package/dist/{index-BeGaR3Mx.js → index-YJLqH5aL.js} +4 -4
- package/dist/index.min.js +20 -20
- package/dist/{jpeg-sFJJnIsn.js → jpeg-CtV9axAi.js} +1 -1
- package/dist/{lerc-BtLFACSi.js → lerc-C2iyBV3P.js} +1 -1
- package/dist/{lzw-_ihEMKTy.js → lzw-BDK3wuTu.js} +1 -1
- package/dist/{packbits-CJ9ZtM9C.js → packbits-BmhmFJpE.js} +1 -1
- package/dist/{raw-FSjtk0dS.js → raw-AV6N1HZT.js} +1 -1
- package/dist/{webimage-BmQdgUV0.js → webimage-D8fd9G2X.js} +1 -1
- package/dist/{xrStore-C-wbuI_U.js → xrStore-B_SjnbWm.js} +1 -1
- package/dist-tsc/BiomarkerSelect.d.ts +19 -1
- package/dist-tsc/BiomarkerSelect.d.ts.map +1 -1
- package/dist-tsc/BiomarkerSelect.js +46 -39
- package/dist-tsc/BiomarkerSelect.js.map +1 -1
- package/dist-tsc/ComparativeConfig.d.ts +112 -3
- package/dist-tsc/ComparativeConfig.d.ts.map +1 -1
- package/dist-tsc/ComparativeConfig.js +255 -13
- package/dist-tsc/ComparativeConfig.js.map +1 -1
- package/dist-tsc/ComparativeConfig.test.d.ts +2 -0
- package/dist-tsc/ComparativeConfig.test.d.ts.map +1 -0
- package/dist-tsc/ComparativeConfig.test.js +119 -0
- package/dist-tsc/ComparativeConfig.test.js.map +1 -0
- package/dist-tsc/ControlledComparative.d.ts +13 -3
- package/dist-tsc/ControlledComparative.d.ts.map +1 -1
- package/dist-tsc/ControlledComparative.js +32 -14
- package/dist-tsc/ControlledComparative.js.map +1 -1
- package/dist-tsc/UncontrolledComparative.d.ts.map +1 -1
- package/dist-tsc/UncontrolledComparative.js +39 -12
- package/dist-tsc/UncontrolledComparative.js.map +1 -1
- package/dist-tsc/url-params.d.ts +24 -0
- package/dist-tsc/url-params.d.ts.map +1 -0
- package/dist-tsc/url-params.js +32 -0
- package/dist-tsc/url-params.js.map +1 -0
- package/dist-tsc/url-params.test.d.ts +2 -0
- package/dist-tsc/url-params.test.d.ts.map +1 -0
- package/dist-tsc/url-params.test.js +18 -0
- package/dist-tsc/url-params.test.js.map +1 -0
- package/package.json +15 -13
- package/src/BiomarkerSelect.jsx +70 -45
- package/src/ComparativeConfig.jsx +295 -13
- package/src/ComparativeConfig.test.jsx +151 -0
- package/src/ControlledComparative.jsx +47 -13
- package/src/UncontrolledComparative.jsx +62 -16
- package/src/url-params.js +34 -0
- package/src/url-params.test.js +20 -0
- package/dist/ReactNeuroglancer-CsYUFP61.js +0 -43672
|
@@ -4,7 +4,7 @@ import { useThree as ve, useFrame as Me, Canvas as Pe } from "@react-three/fiber
|
|
|
4
4
|
import { OrbitControls as me } from "@react-three/drei";
|
|
5
5
|
import * as M from "three";
|
|
6
6
|
import { Data3DTexture as ge, RedFormat as Ae, UnsignedByteType as Be, LinearFilter as pe, RedIntegerFormat as Ne, UnsignedIntType as Ue, NearestFilter as xe, Vector3 as R, Vector2 as _, Vector4 as j, UniformsUtils as Le } from "three";
|
|
7
|
-
import { l as n, i as Oe, c as ue, d as he, C as P, u as K } from "./index-
|
|
7
|
+
import { l as n, i as Oe, c as ue, d as he, C as P, u as K } from "./index-CSfNzXQa.js";
|
|
8
8
|
const w = 32, B = 64, Z = 64, fe = 4, ce = B * Z * fe, be = B * w, _e = Z * w, Ce = fe * w, V = {
|
|
9
9
|
NOT_STARTED: "not_started",
|
|
10
10
|
IN_PROGRESS: "in_progress",
|
|
@@ -6,7 +6,7 @@ import ae, { useRef as Q, useState as X, useEffect as q, Suspense as ee, forward
|
|
|
6
6
|
import { Canvas as Ce } from "@react-three/fiber";
|
|
7
7
|
import { Center as ze, Text as ve, Line as Te, Bvh as we, OrbitControls as Me } from "@react-three/drei";
|
|
8
8
|
import { Matrix3 as Le, Matrix4 as ie, Vector3 as P, Vector2 as G, UniformsUtils as Pe, Data3DTexture as Ae, RedFormat as De, FloatType as Ie, LinearFilter as ge, FrontSide as _e, Scene as Fe, Group as Ee, MeshPhysicalMaterial as Re, MeshBasicMaterial as Ve, MeshStandardMaterial as Oe, BackSide as ke } from "three";
|
|
9
|
-
import { C as j, b as Ue } from "./index-
|
|
9
|
+
import { C as j, b as Ue } from "./index-CSfNzXQa.js";
|
|
10
10
|
function Ne({ currentLine: t, scale: e }) {
|
|
11
11
|
const a = Q(null);
|
|
12
12
|
return H("group", { children: [_(ze, { bottom: !0, right: !0, position: [t.midPoint.x, t.midPoint.y, t.midPoint.z], rotation: [0, 0, 0], children: _(ve, { color: "gray", scale: 0.05, ref: a, children: `${(t.startPoint.distanceTo(t.endPoint) * e).toFixed(2)} µm` }) }), _(Te, {
|
|
@@ -762,7 +762,7 @@ function re(t) {
|
|
|
762
762
|
g(c.object.name);
|
|
763
763
|
}, onPointerOut: () => g(null) }) })] }) : null, i.uniforms && i.shader && i.meshScale && i.geometrySize ? _("group", { children: H("mesh", { scale: i.meshScale, ref: l, children: [_("boxGeometry", { args: i.geometrySize }), _("shaderMaterial", { customProgramCacheKey: () => "1", side: _e, uniforms: i.uniforms, needsUpdate: !0, transparent: !0, vertexShader: i.shader.vertexShader, fragmentShader: i.shader.fragmentShader })] }) }) : null] }), _("group", { name: "lines", children: m.map((c) => _(Ne, { currentLine: c, scale: 1 }, tt(c))) })] });
|
|
764
764
|
}
|
|
765
|
-
const at = ae.lazy(() => import("./GeometryAndMeshXR-
|
|
765
|
+
const at = ae.lazy(() => import("./GeometryAndMeshXR-CYO2tqUV.js").catch(() => ({ default: re }))), lt = ae.lazy(() => import("./XRSceneComponents-DYeS3CwE.js").catch(() => ({ default: () => null })));
|
|
766
766
|
function oe(t) {
|
|
767
767
|
const e = Q(null), a = Q(null), [o, i] = X(!1), [l, n] = X(!1), [g, p] = X(null), [m, c] = X([1, 1, 1]), [s, w] = X({
|
|
768
768
|
uniforms: null,
|
|
@@ -976,12 +976,12 @@ function pt() {
|
|
|
976
976
|
}
|
|
977
977
|
const it = ae.lazy(
|
|
978
978
|
// eslint-disable-next-line implicit-arrow-linebreak, function-paren-newline
|
|
979
|
-
() => import("./XRWrapper-
|
|
979
|
+
() => import("./XRWrapper-DbheKuSQ.js").catch(() => ({
|
|
980
980
|
default: ({ children: t }) => t
|
|
981
981
|
}))
|
|
982
982
|
), ot = ae.lazy(
|
|
983
983
|
// eslint-disable-next-line implicit-arrow-linebreak, function-paren-newline
|
|
984
|
-
() => import("./XREnterButton-
|
|
984
|
+
() => import("./XREnterButton-BdEVWrV7.js").catch(() => ({
|
|
985
985
|
default: () => null
|
|
986
986
|
}))
|
|
987
987
|
), rt = Se((t, e) => {
|
package/dist/index.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aa as e, w as s, p as t, D as r, F as l, H as d, A as C, q as p, T as c, R as g, P as u, S as y, Q as T, ab as S, V as A, O as m, r as P, X as f, o as F, a0 as I, $ as N, n as V, N as w, y as E, J as _, x as v, z as U, I as x, E as M, W as O, Z as h, s as H, _ as b, K as z, M as G, Y as L, a4 as Y, a7 as D, a1 as J, a8 as R, a9 as q, a2 as B, a5 as K, a6 as Q, a3 as W, v as X, U as Z } from "./index-CSfNzXQa.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
export {
|
|
@@ -15,9 +15,9 @@ export {
|
|
|
15
15
|
u as PluginFileType,
|
|
16
16
|
y as PluginJointFileType,
|
|
17
17
|
T as PluginViewType,
|
|
18
|
-
|
|
18
|
+
S as UncontrolledComparative,
|
|
19
19
|
A as ViewType,
|
|
20
|
-
|
|
20
|
+
m as Vitessce,
|
|
21
21
|
P as VitessceConfig,
|
|
22
22
|
f as addAnnotationControllerView,
|
|
23
23
|
F as decodeURLParamsToConf,
|
|
@@ -26,27 +26,27 @@ export {
|
|
|
26
26
|
V as encodeConfInUrl,
|
|
27
27
|
w as fetchConfigFromGist,
|
|
28
28
|
E as generateConfig,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
_ as generateConfigAlt,
|
|
30
|
+
v as getCoordinationSpaceAndScopes,
|
|
31
|
+
U as getHintOptions,
|
|
32
32
|
x as getInitialCoordinationScopeName,
|
|
33
33
|
M as getInitialCoordinationScopePrefix,
|
|
34
34
|
O as hasAnnotationControllerView,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
h as hasAnyAnnotationStory,
|
|
36
|
+
H as hconcat,
|
|
37
|
+
b as isAnyAnnotationEditing,
|
|
38
|
+
z as parseUrls,
|
|
39
|
+
G as parseUrlsFromString,
|
|
40
|
+
L as removeAnnotationControllerView,
|
|
41
|
+
Y as useComplexCoordination,
|
|
42
42
|
D as useComplexCoordinationSecondary,
|
|
43
43
|
J as useCoordination,
|
|
44
44
|
R as useCoordinationScopes,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
q as useCoordinationScopesBy,
|
|
46
|
+
B as useGridItemSize,
|
|
47
|
+
K as useMultiCoordinationScopesNonNull,
|
|
48
|
+
Q as useMultiCoordinationScopesSecondaryNonNull,
|
|
49
|
+
W as usePageModeView,
|
|
50
|
+
X as vconcat,
|
|
51
|
+
Z as z
|
|
52
52
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as sA } from "./pako.esm-D68R8YXe.js";
|
|
2
|
-
import { g as DA, B as nA, L as fA, a as gA } from "./index-
|
|
2
|
+
import { g as DA, B as nA, L as fA, a as gA } from "./index-CSfNzXQa.js";
|
|
3
3
|
var BA = { exports: {} }, iA;
|
|
4
4
|
function tA() {
|
|
5
5
|
return iA || (iA = 1, function(j) {
|
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Renders the biomarkerSelectAlt view, synchronizing
|
|
3
|
+
* biomarker selection, gene selection, sample set selection, and modality selection
|
|
4
|
+
* state with its parent.
|
|
5
|
+
* See the ControlledComparative component for documentation of the props.
|
|
6
|
+
* @param {object} props
|
|
7
|
+
* @param {{ label: string, nodeType: string } | null} [props.biomarkerSelection]
|
|
8
|
+
* The selected modality-agnostic item (e.g., gene or pathway),
|
|
9
|
+
* which is transformed into a list of genes (geneSelection) internally.
|
|
10
|
+
* @param {Function} [props.setBiomarkerSelection] Setter function
|
|
11
|
+
* called when the biomarker selection has been updated from inside.
|
|
12
|
+
*/
|
|
13
|
+
export function BiomarkerSelect(props: {
|
|
14
|
+
biomarkerSelection?: {
|
|
15
|
+
label: string;
|
|
16
|
+
nodeType: string;
|
|
17
|
+
} | null | undefined;
|
|
18
|
+
setBiomarkerSelection?: Function | undefined;
|
|
19
|
+
}): any;
|
|
2
20
|
//# sourceMappingURL=BiomarkerSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BiomarkerSelect.d.ts","sourceRoot":"","sources":["../src/BiomarkerSelect.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BiomarkerSelect.d.ts","sourceRoot":"","sources":["../src/BiomarkerSelect.jsx"],"names":[],"mappings":"AAcA;;;;;;;;;;;GAWG;AACH,uCANG;IAA2D,kBAAkB;eAA5D,MAAM;kBAAY,MAAM;;IAGhB,qBAAqB;CAEhD,OA0GA"}
|
|
@@ -4,40 +4,36 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
import React, { useMemo, useState, useCallback } from 'react';
|
|
5
5
|
import { Vitessce } from '@vitessce/all';
|
|
6
6
|
import { isEqual } from 'lodash-es';
|
|
7
|
-
import { BiomarkerSelectPageComponent, generateComparativeConfig } from './ComparativeConfig.jsx';
|
|
7
|
+
import { BiomarkerSelectPageComponent, generateComparativeConfig, getSelectedModality, getBiomarkerSelection, resolveSelectedModality, mergeBiomarkerSelectConfig, } from './ComparativeConfig.jsx';
|
|
8
|
+
/**
|
|
9
|
+
* Renders the biomarkerSelectAlt view, synchronizing
|
|
10
|
+
* biomarker selection, gene selection, sample set selection, and modality selection
|
|
11
|
+
* state with its parent.
|
|
12
|
+
* See the ControlledComparative component for documentation of the props.
|
|
13
|
+
* @param {object} props
|
|
14
|
+
* @param {{ label: string, nodeType: string } | null} [props.biomarkerSelection]
|
|
15
|
+
* The selected modality-agnostic item (e.g., gene or pathway),
|
|
16
|
+
* which is transformed into a list of genes (geneSelection) internally.
|
|
17
|
+
* @param {Function} [props.setBiomarkerSelection] Setter function
|
|
18
|
+
* called when the biomarker selection has been updated from inside.
|
|
19
|
+
*/
|
|
8
20
|
export function BiomarkerSelect(props) {
|
|
9
|
-
const {
|
|
10
|
-
const initialConfig = useMemo(() => generateComparativeConfig(
|
|
21
|
+
const { singleCellDatasetUrl, singleNucleusDatasetUrl, selectedModality: selectedModalityProp, setSelectedModality, biomarkerSelection, setBiomarkerSelection, geneSelection, sampleSetSelection, setGeneSelection, setSampleSetSelection, theme = 'light2', debugMode = false, logLevel = undefined, } = props;
|
|
22
|
+
const initialConfig = useMemo(() => generateComparativeConfig({ singleCellDatasetUrl, singleNucleusDatasetUrl }, true), [singleCellDatasetUrl, singleNucleusDatasetUrl]);
|
|
23
|
+
// Fall back to the first available modality if the selected one is not available.
|
|
24
|
+
const selectedModality = useMemo(() => resolveSelectedModality(initialConfig.datasets.map(d => d.uid), selectedModalityProp), [initialConfig, selectedModalityProp]);
|
|
11
25
|
const [currentConfig, setCurrentConfig] = useState(null);
|
|
12
|
-
// Merge currentConfig with
|
|
13
|
-
//
|
|
14
|
-
const mergedConfig = useMemo(() => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
coordinationSpace: {
|
|
24
|
-
...currentConfig.coordinationSpace,
|
|
25
|
-
featureSelection: {
|
|
26
|
-
...currentConfig.coordinationSpace?.featureSelection,
|
|
27
|
-
__comparison__: (isValidGeneSelection
|
|
28
|
-
? geneSelection
|
|
29
|
-
: currentConfig.coordinationSpace?.featureSelection?.__comparison__),
|
|
30
|
-
},
|
|
31
|
-
sampleSetSelection: {
|
|
32
|
-
...currentConfig.coordinationSpace?.sampleSetSelection,
|
|
33
|
-
__comparison__: (isValidSampleSetSelection
|
|
34
|
-
? sampleSetSelection
|
|
35
|
-
: currentConfig.coordinationSpace?.sampleSetSelection?.__comparison__),
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
return newConfig;
|
|
40
|
-
}, [initialConfig, currentConfig, geneSelection, sampleSetSelection]);
|
|
26
|
+
// Merge currentConfig with the selections that may have been
|
|
27
|
+
// updated from outside Vitessce (e.g., from URL params or ControlledComparative).
|
|
28
|
+
const mergedConfig = useMemo(() => mergeBiomarkerSelectConfig({
|
|
29
|
+
currentConfig,
|
|
30
|
+
initialConfig,
|
|
31
|
+
geneSelection,
|
|
32
|
+
sampleSetSelection,
|
|
33
|
+
biomarkerSelection,
|
|
34
|
+
selectedModality,
|
|
35
|
+
createUid: () => `biomarker-select-${Date.now()}`,
|
|
36
|
+
}), [initialConfig, currentConfig, biomarkerSelection, geneSelection, sampleSetSelection, selectedModality]);
|
|
41
37
|
const onConfigChange = useCallback((newConfig) => {
|
|
42
38
|
// Listen for changes to the config from inside vITESSCE
|
|
43
39
|
setCurrentConfig(newConfig);
|
|
@@ -45,13 +41,12 @@ export function BiomarkerSelect(props) {
|
|
|
45
41
|
const newFeatureSelection = newConfig.coordinationSpace?.featureSelection?.__comparison__;
|
|
46
42
|
const newSampleSetSelection = newConfig.coordinationSpace?.sampleSetSelection?.__comparison__;
|
|
47
43
|
// Was there a new selection made from inside Vitessce?
|
|
48
|
-
// Note:
|
|
49
|
-
// (
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
// Note: unlike in ControlledComparative, here we allow CLEARING the selections
|
|
45
|
+
// (i.e., null or empty array values), since this is the UI from which
|
|
46
|
+
// selections are cleared (e.g., selecting "All" in the "In group" dropdown).
|
|
47
|
+
const hasNewGeneSelection = (newFeatureSelection !== undefined
|
|
52
48
|
&& !isEqual(newFeatureSelection, geneSelection));
|
|
53
|
-
const hasNewSampleSetSelection = (
|
|
54
|
-
&& newSampleSetSelection.length > 0
|
|
49
|
+
const hasNewSampleSetSelection = (newSampleSetSelection !== undefined
|
|
55
50
|
&& !isEqual(newSampleSetSelection, sampleSetSelection));
|
|
56
51
|
if (hasNewGeneSelection) {
|
|
57
52
|
setGeneSelection(newFeatureSelection);
|
|
@@ -59,7 +54,19 @@ export function BiomarkerSelect(props) {
|
|
|
59
54
|
if (hasNewSampleSetSelection) {
|
|
60
55
|
setSampleSetSelection(newSampleSetSelection);
|
|
61
56
|
}
|
|
62
|
-
|
|
57
|
+
// Was a different biomarker (e.g., gene or pathway) selected from inside Vitessce?
|
|
58
|
+
const newBiomarkerSelection = getBiomarkerSelection(newConfig);
|
|
59
|
+
if (newBiomarkerSelection !== undefined
|
|
60
|
+
&& !isEqual(newBiomarkerSelection, biomarkerSelection)) {
|
|
61
|
+
setBiomarkerSelection?.(newBiomarkerSelection);
|
|
62
|
+
}
|
|
63
|
+
// Was a different modality (i.e., dataset) selected from inside Vitessce?
|
|
64
|
+
const newModality = getSelectedModality(newConfig);
|
|
65
|
+
if (typeof newModality === 'string' && newModality !== selectedModality) {
|
|
66
|
+
setSelectedModality?.(newModality);
|
|
67
|
+
}
|
|
68
|
+
}, [biomarkerSelection, geneSelection, sampleSetSelection, selectedModality,
|
|
69
|
+
setBiomarkerSelection, setGeneSelection, setSampleSetSelection, setSelectedModality]);
|
|
63
70
|
const didFirstValidation = currentConfig !== null;
|
|
64
71
|
return (_jsx("div", { children: _jsx(Vitessce, { config: mergedConfig, onConfigChange: onConfigChange, remountOnUidChange: false, validateConfig: !didFirstValidation, validateOnConfigChange: false, rowHeight: null, theme: theme, pageMode: true, debugMode: debugMode, logLevel: logLevel, children: _jsx(BiomarkerSelectPageComponent, {}) }) }));
|
|
65
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BiomarkerSelect.js","sourceRoot":"","sources":["../src/BiomarkerSelect.jsx"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,yCAAyC;AACzC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,
|
|
1
|
+
{"version":3,"file":"BiomarkerSelect.js","sourceRoot":"","sources":["../src/BiomarkerSelect.jsx"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,yCAAyC;AACzC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,C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ACxE,mBAAmB,EAAE,CAAC,WAAW,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,EAAE,CAAC,kBAAkB,EAAE,aAAa,EAAE,kBAAkB,EAAE,gBAAgB;QACzE,qBAAqB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAExF,MAAM,kBAAkB,GAAG,aAAa,KAAK,IAAI,CAAC;IAElD,OAAO,CACL,wBACE,KAAC,QAAQ,IACP,MAAM,EAAE,YAAY,EACpB,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,KAAK,EACzB,cAAc,EAAE,CAAC,kBAAkB,EACnC,sBAAsB,EAAE,KAAK,EAC7B,SAAS,EAAE,IAAI,EACf,KAAK,EAAE,KAAK,EACZ,QAAQ,QACR,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,YAElB,KAAC,4BAA4B,KAAG,GACvB,GACP,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get the list of modalities for which a dataset URL was provided.
|
|
3
|
+
* @param {object} datasetUrls
|
|
4
|
+
* @param {string|undefined} datasetUrls.singleCellDatasetUrl
|
|
5
|
+
* @param {string|undefined} datasetUrls.singleNucleusDatasetUrl
|
|
6
|
+
* @returns {{ uid: string, name: string, url: string, circleScaleFactor: number }[]}
|
|
7
|
+
*/
|
|
8
|
+
export function getAvailableModalities(datasetUrls: {
|
|
9
|
+
singleCellDatasetUrl: string | undefined;
|
|
10
|
+
singleNucleusDatasetUrl: string | undefined;
|
|
11
|
+
}): {
|
|
12
|
+
uid: string;
|
|
13
|
+
name: string;
|
|
14
|
+
url: string;
|
|
15
|
+
circleScaleFactor: number;
|
|
16
|
+
}[];
|
|
17
|
+
/**
|
|
18
|
+
* Resolve the modality to view, falling back to the first available modality
|
|
19
|
+
* if the requested one is not available.
|
|
20
|
+
* @param {string[]} availableModalityUids
|
|
21
|
+
* @param {string|null|undefined} requestedModality
|
|
22
|
+
* @returns {string|undefined}
|
|
23
|
+
*/
|
|
24
|
+
export function resolveSelectedModality(availableModalityUids: string[], requestedModality: string | null | undefined): string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Get the currently-selected modality (dataset uid) from a view config.
|
|
27
|
+
* @param {object|null} config
|
|
28
|
+
* @returns {string|undefined}
|
|
29
|
+
*/
|
|
30
|
+
export function getSelectedModality(config: object | null): string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Return a new view config in which the given modality is selected.
|
|
33
|
+
* Upon a change of modality, all obsSetSelection values are reset to null,
|
|
34
|
+
* so that the selected cell types become re-initialized
|
|
35
|
+
* (since the new modality may contain different cell type categories).
|
|
36
|
+
* @param {object} config A view config generated by generateComparativeConfig.
|
|
37
|
+
* @param {string} modality The modality (dataset uid) to select.
|
|
38
|
+
* @returns {object} The updated view config (or the original
|
|
39
|
+
* config if the modality is not present in the config
|
|
40
|
+
* or is already selected).
|
|
41
|
+
*/
|
|
42
|
+
export function withSelectedModality(config: object, modality: string): object;
|
|
43
|
+
/**
|
|
44
|
+
* Get the biomarkerSelection value from the props of the biomarkerSelectAlt view.
|
|
45
|
+
* @param {object|null} config
|
|
46
|
+
* @returns {{ label: string, nodeType: string } | null | undefined}
|
|
47
|
+
*/
|
|
48
|
+
export function getBiomarkerSelection(config: object | null): {
|
|
49
|
+
label: string;
|
|
50
|
+
nodeType: string;
|
|
51
|
+
} | null | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Return a new view config in which the biomarkerSelectAlt view
|
|
54
|
+
* has the given biomarkerSelection prop value.
|
|
55
|
+
* @param {object} config A view config generated by generateComparativeConfig.
|
|
56
|
+
* @param {{ label: string, nodeType: string } | null} biomarkerSelection
|
|
57
|
+
* @returns {object} The updated view config (or the original config if unchanged).
|
|
58
|
+
*/
|
|
59
|
+
export function withBiomarkerSelection(config: object, biomarkerSelection: {
|
|
60
|
+
label: string;
|
|
61
|
+
nodeType: string;
|
|
62
|
+
} | null): object;
|
|
63
|
+
/**
|
|
64
|
+
* Merge the selections from outside Vitessce (e.g., from URL params)
|
|
65
|
+
* into the view config for the biomarkerSelectAlt view.
|
|
66
|
+
* @param {object} params
|
|
67
|
+
* @param {object|null} params.currentConfig The most recent config emitted via onConfigChange
|
|
68
|
+
* (or null prior to the first onConfigChange).
|
|
69
|
+
* @param {object} params.initialConfig The generated initial config.
|
|
70
|
+
* @param {string[]|null} params.geneSelection
|
|
71
|
+
* @param {string[][]|null} params.sampleSetSelection
|
|
72
|
+
* @param {{ label: string, nodeType: string } | null} params.biomarkerSelection
|
|
73
|
+
* @param {string} params.selectedModality
|
|
74
|
+
* @param {() => string} params.createUid Function that returns a new unique config uid.
|
|
75
|
+
* @returns {object} The merged config. Returns currentConfig itself
|
|
76
|
+
* if it already reflects all of the outside selections.
|
|
77
|
+
*/
|
|
78
|
+
export function mergeBiomarkerSelectConfig({ currentConfig, initialConfig, geneSelection, sampleSetSelection, biomarkerSelection, selectedModality, createUid, }: {
|
|
79
|
+
currentConfig: object | null;
|
|
80
|
+
initialConfig: object;
|
|
81
|
+
geneSelection: string[] | null;
|
|
82
|
+
sampleSetSelection: string[][] | null;
|
|
83
|
+
biomarkerSelection: {
|
|
84
|
+
label: string;
|
|
85
|
+
nodeType: string;
|
|
86
|
+
} | null;
|
|
87
|
+
selectedModality: string;
|
|
88
|
+
createUid: () => string;
|
|
89
|
+
}): object;
|
|
1
90
|
/**
|
|
2
91
|
* Generate a Vitessce config for comparative visualization.
|
|
92
|
+
* One dataset is defined per data modality (single-cell and/or single-nucleus),
|
|
93
|
+
* and all views are linked to a shared `dataset` coordination scope
|
|
94
|
+
* so that the currently-viewed modality can be switched.
|
|
3
95
|
* If isBiomarkerSelectOnly is true, only the biomarkerSelect view is included.
|
|
4
96
|
* Otherwise, a config without the biomarkerSelect view is generated.
|
|
5
|
-
* @param {
|
|
97
|
+
* @param {object} datasetUrls
|
|
98
|
+
* @param {string|undefined} datasetUrls.singleCellDatasetUrl URL to the
|
|
99
|
+
* single-cell AnnData-Zarr store.
|
|
100
|
+
* @param {string|undefined} datasetUrls.singleNucleusDatasetUrl URL to the
|
|
101
|
+
* single-nucleus AnnData-Zarr store.
|
|
6
102
|
* @param {boolean} isBiomarkerSelectOnly
|
|
7
|
-
* @
|
|
103
|
+
* @param {string|undefined} selectedModality The modality to view initially.
|
|
104
|
+
* By default, the first available modality.
|
|
105
|
+
* @returns {object} The view config JSON.
|
|
8
106
|
*/
|
|
9
|
-
export function generateComparativeConfig(
|
|
107
|
+
export function generateComparativeConfig(datasetUrls: {
|
|
108
|
+
singleCellDatasetUrl: string | undefined;
|
|
109
|
+
singleNucleusDatasetUrl: string | undefined;
|
|
110
|
+
}, isBiomarkerSelectOnly: boolean, selectedModality?: string | undefined): object;
|
|
10
111
|
export function BiomarkerSelectPageComponent(): any;
|
|
11
112
|
export function ComparativePageComponent(): any;
|
|
113
|
+
export const COMPARATIVE_DATASET_SCOPE: "__comparison__";
|
|
114
|
+
export const BIOMARKER_SELECT_VIEW_UID: "biomarker-select";
|
|
115
|
+
export const COMPARATIVE_MODALITIES: {
|
|
116
|
+
uid: string;
|
|
117
|
+
name: string;
|
|
118
|
+
urlKey: string;
|
|
119
|
+
circleScaleFactor: number;
|
|
120
|
+
}[];
|
|
12
121
|
//# sourceMappingURL=ComparativeConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComparativeConfig.d.ts","sourceRoot":"","sources":["../src/ComparativeConfig.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComparativeConfig.d.ts","sourceRoot":"","sources":["../src/ComparativeConfig.jsx"],"names":[],"mappings":"AA6CA;;;;;;GAMG;AACH,oDAJG;IAAsC,oBAAoB,EAAlD,MAAM,GAAC,SAAS;IACc,uBAAuB,EAArD,MAAM,GAAC,SAAS;CACxB,GAAU;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAA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