@vitessce/statistical-plots 3.8.3 → 3.8.5

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.
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { B as BaseDecoder } from "./index-Cbe4c7In.js";
2
+ import { B as BaseDecoder } from "./index-Bww8vUPc.js";
3
3
  class DeflateDecoder extends BaseDecoder {
4
4
  decodeBlock(buffer) {
5
5
  return inflate_1(new Uint8Array(buffer)).buffer;
@@ -1201,6 +1201,7 @@ const COMPONENT_COORDINATION_TYPES = {
1201
1201
  CoordinationType$1.FEATURE_SELECTION,
1202
1202
  CoordinationType$1.FEATURE_VALUE_COLORMAP,
1203
1203
  CoordinationType$1.FEATURE_VALUE_COLORMAP_RANGE,
1204
+ CoordinationType$1.FEATURE_AGGREGATION_STRATEGY,
1204
1205
  // TODO: CoordinationType.FEATURE_COLOR_ENCODING,
1205
1206
  // TODO: CoordinationType.ADDITIONAL_FEATURE_SETS,
1206
1207
  CoordinationType$1.TOOLTIPS_VISIBLE,
@@ -11237,7 +11238,10 @@ z.object({
11237
11238
  obsSets: obsSetsSpatialdataSchema,
11238
11239
  obsEmbedding: obsEmbeddingSpatialdataSchemaConvenience,
11239
11240
  // TODO: obsLabels
11240
- // TODO: featureLabels
11241
+ featureLabels: z.union([
11242
+ annDataFeatureLabels,
11243
+ z.array(annDataConvenienceFeatureLabelsItem)
11244
+ ]),
11241
11245
  // TODO: allow specifying tablePath and region at the top-level here.
11242
11246
  coordinateSystem: z.string().optional().describe("The name of a coordinate transformation output used to transform all elements which lack a per-element coordinateSystem property.")
11243
11247
  }).partial();
@@ -178758,22 +178762,22 @@ function addDecoder(cases2, importFn) {
178758
178762
  }
178759
178763
  cases2.forEach((c2) => registry$1.set(c2, importFn));
178760
178764
  }
178761
- addDecoder([void 0, 1], () => import("./raw-B1EQg_SA.js").then((m2) => m2.default));
178762
- addDecoder(5, () => import("./lzw-Eb5O3C7F.js").then((m2) => m2.default));
178765
+ addDecoder([void 0, 1], () => import("./raw-BE-hWhIt.js").then((m2) => m2.default));
178766
+ addDecoder(5, () => import("./lzw-CtdR_QD0.js").then((m2) => m2.default));
178763
178767
  addDecoder(6, () => {
178764
178768
  throw new Error("old style JPEG compression is not supported.");
178765
178769
  });
178766
- addDecoder(7, () => import("./jpeg-hmwNBzu7.js").then((m2) => m2.default));
178767
- addDecoder([8, 32946], () => import("./deflate-7ohytk11.js").then((m2) => m2.default));
178768
- addDecoder(32773, () => import("./packbits-TfpJF6VX.js").then((m2) => m2.default));
178770
+ addDecoder(7, () => import("./jpeg-DaQlT1PL.js").then((m2) => m2.default));
178771
+ addDecoder([8, 32946], () => import("./deflate-DhdKi2Ho.js").then((m2) => m2.default));
178772
+ addDecoder(32773, () => import("./packbits-IHApx9PX.js").then((m2) => m2.default));
178769
178773
  addDecoder(
178770
178774
  34887,
178771
- () => import("./lerc-CyTLEcX2.js").then(async (m2) => {
178775
+ () => import("./lerc-CEyFtJYR.js").then(async (m2) => {
178772
178776
  await m2.zstd.init();
178773
178777
  return m2;
178774
178778
  }).then((m2) => m2.default)
178775
178779
  );
178776
- addDecoder(50001, () => import("./webimage-DkHQ713h.js").then((m2) => m2.default));
178780
+ addDecoder(50001, () => import("./webimage-Co4sRMMx.js").then((m2) => m2.default));
178777
178781
  function decodeRowAcc(row, stride) {
178778
178782
  let length2 = row.length - stride;
178779
178783
  let offset2 = 0;
@@ -195741,6 +195745,7 @@ accessor$1(() => 0, [], "zero");
195741
195745
  accessor$1(() => 1, [], "one");
195742
195746
  accessor$1(() => true, [], "true");
195743
195747
  accessor$1(() => false, [], "false");
195748
+ /* @__PURE__ */ new Set([...Object.getOwnPropertyNames(Object.prototype).filter((name2) => typeof Object.prototype[name2] === "function"), "__proto__"]);
195744
195749
  var isArray$1 = Array.isArray;
195745
195750
  function peek$2(array2) {
195746
195751
  return array2[array2.length - 1];
@@ -199050,8 +199055,7 @@ function splitAccessPath(p) {
199050
199055
  for (i2 = j = 0; j < n2; ++j) {
199051
199056
  c2 = p[j];
199052
199057
  if (c2 === "\\") {
199053
- s2 += p.substring(i2, j);
199054
- s2 += p.substring(++j, ++j);
199058
+ s2 += p.substring(i2, j++);
199055
199059
  i2 = j;
199056
199060
  } else if (c2 === q) {
199057
199061
  push2();
@@ -199109,7 +199113,8 @@ const Error$1 = 1;
199109
199113
  const Warn = 2;
199110
199114
  const Info = 3;
199111
199115
  const Debug = 4;
199112
- function logger(_, method2, handler = log$1$1) {
199116
+ function logger(_, method2) {
199117
+ let handler = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : log$1$1;
199113
199118
  let level = _ || None$2;
199114
199119
  return {
199115
199120
  level(_2) {
@@ -199143,7 +199148,10 @@ function isObject(_) {
199143
199148
  return _ === Object(_);
199144
199149
  }
199145
199150
  const isLegalKey = (key2) => key2 !== "__proto__";
199146
- function mergeConfig(...configs) {
199151
+ function mergeConfig() {
199152
+ for (var _len = arguments.length, configs = new Array(_len), _key = 0; _key < _len; _key++) {
199153
+ configs[_key] = arguments[_key];
199154
+ }
199147
199155
  return configs.reduce((out, source2) => {
199148
199156
  for (const key2 in source2) {
199149
199157
  if (key2 === "signals") {
@@ -199381,9 +199389,8 @@ function extentIndex(array2, f2) {
199381
199389
  }
199382
199390
  return [u2, v];
199383
199391
  }
199384
- const hop = Object.prototype.hasOwnProperty;
199385
199392
  function has$1(object2, property2) {
199386
- return hop.call(object2, property2);
199393
+ return Object.hasOwn(object2, property2);
199387
199394
  }
199388
199395
  const NULL = {};
199389
199396
  function fastmap(input) {
@@ -252537,6 +252544,7 @@ function FeatureStatsTable(props) {
252537
252544
  sampleSetSelection,
252538
252545
  data: data2,
252539
252546
  setFeatureSelection,
252547
+ setFeatureAggregationStrategy,
252540
252548
  featurePointSignificanceThreshold,
252541
252549
  featurePointFoldChangeThreshold
252542
252550
  } = props;
@@ -252599,6 +252607,7 @@ function FeatureStatsTable(props) {
252599
252607
  }, [filteredData, obsSetsColumnNameMappingReversed]);
252600
252608
  const onSelectionModelChange = useCallback((rowIds) => {
252601
252609
  const featureIds = Array.from(rowIds.ids).map((rowId) => rowId.split(ROW_ID_DELIMITER)[0]);
252610
+ setFeatureAggregationStrategy(null);
252602
252611
  setFeatureSelection(featureIds);
252603
252612
  }, []);
252604
252613
  const rowSelectionModel = useMemo(() => ({ ids: /* @__PURE__ */ new Set([]), type: "include" }), []);
@@ -252646,6 +252655,7 @@ function FeatureStatsTableSubscriber(props) {
252646
252655
  featurePointFoldChangeThreshold,
252647
252656
  featureValueTransform,
252648
252657
  featureValueTransformCoefficient,
252658
+ featureAggregationStrategy,
252649
252659
  gatingFeatureSelectionX,
252650
252660
  gatingFeatureSelectionY,
252651
252661
  featureSelection,
@@ -252662,6 +252672,7 @@ function FeatureStatsTableSubscriber(props) {
252662
252672
  setFeaturePointFoldChangeThreshold,
252663
252673
  setFeatureValueTransform,
252664
252674
  setFeatureValueTransformCoefficient,
252675
+ setFeatureAggregationStrategy,
252665
252676
  setGatingFeatureSelectionX,
252666
252677
  setGatingFeatureSelectionY,
252667
252678
  setFeatureSelection,
@@ -252736,6 +252747,7 @@ function FeatureStatsTableSubscriber(props) {
252736
252747
  data: featureStats,
252737
252748
  featureSelection,
252738
252749
  setFeatureSelection,
252750
+ setFeatureAggregationStrategy,
252739
252751
  featurePointSignificanceThreshold,
252740
252752
  featurePointFoldChangeThreshold
252741
252753
  }
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b, f, C, e, a, i, D, h, E, F, c, d, T, V } from "./index-Cbe4c7In.js";
1
+ import { b, f, C, e, a, i, D, h, E, F, c, d, T, V } from "./index-Bww8vUPc.js";
2
2
  export {
3
3
  b as CellSetCompositionBarPlotSubscriber,
4
4
  f as CellSetExpressionPlot,
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Cbe4c7In.js";
1
+ import { B as BaseDecoder } from "./index-Bww8vUPc.js";
2
2
  const dctZigZag = new Int32Array([
3
3
  0,
4
4
  1,
@@ -1,5 +1,5 @@
1
1
  import { i as inflate_1 } from "./pako.esm-SxljTded.js";
2
- import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-Cbe4c7In.js";
2
+ import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-Bww8vUPc.js";
3
3
  const LercParameters = {
4
4
  AddCompression: 1
5
5
  };
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Cbe4c7In.js";
1
+ import { B as BaseDecoder } from "./index-Bww8vUPc.js";
2
2
  const MIN_BITS = 9;
3
3
  const CLEAR_CODE = 256;
4
4
  const EOI_CODE = 257;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Cbe4c7In.js";
1
+ import { B as BaseDecoder } from "./index-Bww8vUPc.js";
2
2
  class PackbitsDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  const dataView = new DataView(buffer);
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Cbe4c7In.js";
1
+ import { B as BaseDecoder } from "./index-Bww8vUPc.js";
2
2
  class RawDecoder extends BaseDecoder {
3
3
  decodeBlock(buffer) {
4
4
  return buffer;
@@ -1,4 +1,4 @@
1
- import { B as BaseDecoder } from "./index-Cbe4c7In.js";
1
+ import { B as BaseDecoder } from "./index-Bww8vUPc.js";
2
2
  class WebImageDecoder extends BaseDecoder {
3
3
  constructor() {
4
4
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureStatsTable.d.ts","sourceRoot":"","sources":["../src/FeatureStatsTable.js"],"names":[],"mappings":"AAoBA,mEAyGC"}
1
+ {"version":3,"file":"FeatureStatsTable.d.ts","sourceRoot":"","sources":["../src/FeatureStatsTable.js"],"names":[],"mappings":"AAoBA,mEA6GC"}
@@ -17,7 +17,7 @@ const initialState = {
17
17
  };
18
18
  const pageSizeOptions = [10];
19
19
  export default function FeatureStatsTable(props) {
20
- const { obsType, featureType, obsSetsColumnNameMappingReversed, sampleSetsColumnNameMappingReversed, sampleSetSelection, data, setFeatureSelection, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, } = props;
20
+ const { obsType, featureType, obsSetsColumnNameMappingReversed, sampleSetsColumnNameMappingReversed, sampleSetSelection, data, setFeatureSelection, setFeatureAggregationStrategy, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, } = props;
21
21
  const [
22
22
  // eslint-disable-next-line no-unused-vars
23
23
  computedData, filteredData,] = useFilteredVolcanoData({
@@ -78,6 +78,8 @@ export default function FeatureStatsTable(props) {
78
78
  }, [filteredData, obsSetsColumnNameMappingReversed]);
79
79
  const onSelectionModelChange = useCallback((rowIds) => {
80
80
  const featureIds = Array.from(rowIds.ids).map(rowId => rowId.split(ROW_ID_DELIMITER)[0]);
81
+ // We want to clear this value upon selection, in case it was previously set.
82
+ setFeatureAggregationStrategy(null);
81
83
  setFeatureSelection(featureIds);
82
84
  }, []);
83
85
  const rowSelectionModel = useMemo(() => ({ ids: new Set([]), type: 'include' }), []);
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureStatsTableSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureStatsTableSubscriber.js"],"names":[],"mappings":"AAqBA,qEAwHC"}
1
+ {"version":3,"file":"FeatureStatsTableSubscriber.d.ts","sourceRoot":"","sources":["../src/FeatureStatsTableSubscriber.js"],"names":[],"mappings":"AAqBA,qEA2HC"}
@@ -10,7 +10,7 @@ export function FeatureStatsTableSubscriber(props) {
10
10
  const loaders = useLoaders();
11
11
  const coordinationScopes = useCoordinationScopes(coordinationScopesRaw);
12
12
  // Get "props" from the coordination space.
13
- const [{ dataset, obsType, sampleType, featureType, featureValueType, obsFilter: cellFilter, obsHighlight: cellHighlight, obsSetSelection, obsSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, featureValueTransform, featureValueTransformCoefficient, gatingFeatureSelectionX, gatingFeatureSelectionY, featureSelection, sampleSetSelection, sampleSetColor, }, { setObsFilter: setCellFilter, setObsSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setFeaturePointSignificanceThreshold, setFeaturePointFoldChangeThreshold, setFeatureValueTransform, setFeatureValueTransformCoefficient, setGatingFeatureSelectionX, setGatingFeatureSelectionY, setFeatureSelection, setSampleSetSelection, setSampleSetColor, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.FEATURE_STATS_TABLE], coordinationScopes);
13
+ const [{ dataset, obsType, sampleType, featureType, featureValueType, obsFilter: cellFilter, obsHighlight: cellHighlight, obsSetSelection, obsSetColor, obsColorEncoding: cellColorEncoding, additionalObsSets: additionalCellSets, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, featureValueTransform, featureValueTransformCoefficient, featureAggregationStrategy, gatingFeatureSelectionX, gatingFeatureSelectionY, featureSelection, sampleSetSelection, sampleSetColor, }, { setObsFilter: setCellFilter, setObsSetSelection, setObsHighlight: setCellHighlight, setObsSetColor: setCellSetColor, setObsColorEncoding: setCellColorEncoding, setAdditionalObsSets: setAdditionalCellSets, setFeaturePointSignificanceThreshold, setFeaturePointFoldChangeThreshold, setFeatureValueTransform, setFeatureValueTransformCoefficient, setFeatureAggregationStrategy, setGatingFeatureSelectionX, setGatingFeatureSelectionY, setFeatureSelection, setSampleSetSelection, setSampleSetColor, }] = useCoordination(COMPONENT_COORDINATION_TYPES[ViewType.FEATURE_STATS_TABLE], coordinationScopes);
14
14
  const obsSetsLoader = useMatchingLoader(loaders, dataset, DataType.OBS_SETS, { obsType });
15
15
  const sampleSetsLoader = useMatchingLoader(loaders, dataset, DataType.SAMPLE_SETS, { sampleType });
16
16
  const obsSetsColumnNameMapping = useColumnNameMapping(obsSetsLoader);
@@ -28,5 +28,5 @@ export function FeatureStatsTableSubscriber(props) {
28
28
  const isReady = useReady([
29
29
  featureStatsStatus,
30
30
  ]);
31
- return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, errors: errors, withPadding: false, children: featureStats ? (_jsx(FeatureStatsTable, { theme: theme, obsType: obsType, featureType: featureType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: featureStats, featureSelection: featureSelection, setFeatureSelection: setFeatureSelection, featurePointSignificanceThreshold: featurePointSignificanceThreshold, featurePointFoldChangeThreshold: featurePointFoldChangeThreshold })) : (_jsxs("p", { style: { padding: '12px' }, children: ["Select at least one ", obsType, " set."] })) }));
31
+ return (_jsx(TitleInfo, { title: title, removeGridComponent: removeGridComponent, theme: theme, isReady: isReady, helpText: helpText, errors: errors, withPadding: false, children: featureStats ? (_jsx(FeatureStatsTable, { theme: theme, obsType: obsType, featureType: featureType, obsSetsColumnNameMapping: obsSetsColumnNameMapping, obsSetsColumnNameMappingReversed: obsSetsColumnNameMappingReversed, sampleSetsColumnNameMapping: sampleSetsColumnNameMapping, sampleSetsColumnNameMappingReversed: sampleSetsColumnNameMappingReversed, sampleSetSelection: sampleSetSelection, obsSetSelection: obsSetSelection, obsSetColor: obsSetColor, sampleSetColor: sampleSetColor, data: featureStats, featureSelection: featureSelection, setFeatureSelection: setFeatureSelection, setFeatureAggregationStrategy: setFeatureAggregationStrategy, featurePointSignificanceThreshold: featurePointSignificanceThreshold, featurePointFoldChangeThreshold: featurePointFoldChangeThreshold })) : (_jsxs("p", { style: { padding: '12px' }, children: ["Select at least one ", obsType, " set."] })) }));
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/statistical-plots",
3
- "version": "3.8.3",
3
+ "version": "3.8.5",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -28,13 +28,13 @@
28
28
  "react-aria": "^3.28.0",
29
29
  "internmap": "^2.0.3",
30
30
  "uuid": "^9.0.0",
31
- "@vitessce/styles": "3.8.3",
32
- "@vitessce/constants-internal": "3.8.3",
33
- "@vitessce/sets-utils": "3.8.3",
34
- "@vitessce/utils": "3.8.3",
35
- "@vitessce/vega": "3.8.3",
36
- "@vitessce/vit-s": "3.8.3",
37
- "@vitessce/gl": "3.8.3"
31
+ "@vitessce/styles": "3.8.5",
32
+ "@vitessce/constants-internal": "3.8.5",
33
+ "@vitessce/sets-utils": "3.8.5",
34
+ "@vitessce/utils": "3.8.5",
35
+ "@vitessce/vega": "3.8.5",
36
+ "@vitessce/vit-s": "3.8.5",
37
+ "@vitessce/gl": "3.8.5"
38
38
  },
39
39
  "devDependencies": {
40
40
  "react": "18.3.1",
@@ -27,6 +27,7 @@ export default function FeatureStatsTable(props) {
27
27
  sampleSetSelection,
28
28
  data,
29
29
  setFeatureSelection,
30
+ setFeatureAggregationStrategy,
30
31
  featurePointSignificanceThreshold,
31
32
  featurePointFoldChangeThreshold,
32
33
  } = props;
@@ -99,6 +100,9 @@ export default function FeatureStatsTable(props) {
99
100
 
100
101
  const onSelectionModelChange = useCallback((rowIds) => {
101
102
  const featureIds = Array.from(rowIds.ids).map(rowId => rowId.split(ROW_ID_DELIMITER)[0]);
103
+ // We want to clear this value upon selection, in case it was previously set.
104
+ setFeatureAggregationStrategy(null);
105
+
102
106
  setFeatureSelection(featureIds);
103
107
  }, []);
104
108
 
@@ -48,6 +48,7 @@ export function FeatureStatsTableSubscriber(props) {
48
48
  featurePointFoldChangeThreshold,
49
49
  featureValueTransform,
50
50
  featureValueTransformCoefficient,
51
+ featureAggregationStrategy,
51
52
  gatingFeatureSelectionX,
52
53
  gatingFeatureSelectionY,
53
54
  featureSelection,
@@ -64,6 +65,7 @@ export function FeatureStatsTableSubscriber(props) {
64
65
  setFeaturePointFoldChangeThreshold,
65
66
  setFeatureValueTransform,
66
67
  setFeatureValueTransformCoefficient,
68
+ setFeatureAggregationStrategy,
67
69
  setGatingFeatureSelectionX,
68
70
  setGatingFeatureSelectionY,
69
71
  setFeatureSelection,
@@ -131,6 +133,7 @@ export function FeatureStatsTableSubscriber(props) {
131
133
  data={featureStats}
132
134
  featureSelection={featureSelection}
133
135
  setFeatureSelection={setFeatureSelection}
136
+ setFeatureAggregationStrategy={setFeatureAggregationStrategy}
134
137
  featurePointSignificanceThreshold={featurePointSignificanceThreshold}
135
138
  featurePointFoldChangeThreshold={featurePointFoldChangeThreshold}
136
139
  />