@vitessce/biomarker-select 3.5.8 → 3.5.10

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import React__default, { Children, isValidElement, cloneElement, createElement, PureComponent, useRef, useEffect, useMemo, useState, useCallback } from "react";
3
- import { useLoaders, useCoordination, useViewConfigStoreApi, useViewConfig, useSetViewConfig, useMatchingLoader, useColumnNameMapping, useAsyncFunction, useComparisonMetadata } from "@vitessce/vit-s";
3
+ import { useLoaders, useCoordination, useViewConfigStoreApi, useViewConfig, useSetViewConfig, useMatchingLoader, useColumnNameMapping, useAsyncFunction, useComparisonMetadata, useReady, TitleInfo } from "@vitessce/vit-s";
4
4
  import * as ReactDOM from "react-dom";
5
5
  import ReactDOM__default from "react-dom";
6
6
  function getDefaultExportFromCjs(x) {
@@ -917,7 +917,9 @@ const ViewType = {
917
917
  LINK_CONTROLLER: "linkController",
918
918
  NEUROGLANCER: "neuroglancer",
919
919
  DUAL_SCATTERPLOT: "dualScatterplot",
920
- TREEMAP: "treemap"
920
+ TREEMAP: "treemap",
921
+ SAMPLE_SET_PAIR_MANAGER: "sampleSetPairManager",
922
+ FEATURE_STATS_TABLE: "featureStatsTable"
921
923
  };
922
924
  const DataType = {
923
925
  OBS_LABELS: "obsLabels",
@@ -1106,6 +1108,30 @@ const CoordinationType = {
1106
1108
  // Treemap
1107
1109
  HIERARCHY_LEVELS: "hierarchyLevels"
1108
1110
  };
1111
+ const ViewHelpMapping = {
1112
+ SCATTERPLOT: "The scatterplot displays two-dimensional (pre-computed) dimensionality reduction results (such as from t-SNE or UMAP). Each point on the scatterplot represents an observation (e.g., cell).",
1113
+ HEATMAP: "The heatmap displays an observation-by-feature (e.g., cell-by-gene) matrix, typically with transformed (e.g., normalized or standardized) values.",
1114
+ SPATIAL: "The spatial view displays (potentially layered) spatially-resolved data including RGB or multiplexed images, segmentations of observations (bitmask- or polygon-based), and/or points (e.g., representing FISH transcripts).",
1115
+ DESCRIPTION: "The description view displays additional information about a dataset. When images are included in a dataset, the description view also includes image metadata (if contained in the image files).",
1116
+ STATUS: "The status view displays debugging messages, including app-wide error messages when datasets fail to load or when schemas fail to validate. Details about the entity under the mouse cursor (cell, gene, and/or molecule) are displayed during hover interactions.",
1117
+ LAYER_CONTROLLER: "The spatial layer controller provides an interface for manipulating the visualization layers displayed in the spatial view.",
1118
+ GENOMIC_PROFILES: "The genomic profiles view displays genome browser tracks (using the genomic-profiles data type) containing bar plots, where the genome is along the x-axis and the value at each genome position is encoded with a bar along the y-axis.",
1119
+ GATING: "The gating scatterplot displays expression data for two genes (along the X and Y axes). Users can select two genes, and the scatterplot is dynamically generated using observation-by-feature matrix data. Gating can then be performed by using the lasso or box select tools.",
1120
+ FEATURE_LIST: "The feature list controller displays an interactive list of features (e.g., genes).",
1121
+ OBS_SETS: "The observation sets controller displays an interactive list of (potentially hierarchical) observation sets (e.g., cell clusters or cell type annotations).",
1122
+ OBS_SET_SIZES: "The observation set sizes view displays a bar plot with the currently-selected observation sets (e.g., cell types) on the x-axis and bars representing their size (e.g., number of cells) on the y-axis.",
1123
+ OBS_SET_FEATURE_VALUE_DISTRIBUTION: "The observation set feature value distribution view displays a violin plot with values (e.g., expression values) per set (e.g., cell type) for the selected feature (e.g., gene).",
1124
+ FEATURE_VALUE_HISTOGRAM: "The feature value histogram displays the distribution of values (e.g., expression) for the selected feature (e.g., gene).",
1125
+ DOT_PLOT: "The dot plot displays summary information about expression of the selected features (e.g., genes) for each selected observation set (e.g., cell type).",
1126
+ FEATURE_BAR_PLOT: "The feature bar plot displays one bar per observation (e.g., cell) along the x-axis, where the value of a selected feature (e.g., gene) is encoded along the y-axis.",
1127
+ NEUROGLANCER: "The Neuroglancer view displays 3d meshes using Neuroglancer developed by Google.",
1128
+ TREEMAP: "The treemap provides an overview of the current state of sample-level or cell-level selection and filtering.",
1129
+ VOLCANO_PLOT: "The volcano plot displays differential expression results. Each data point represents a feature (as opposed to an observation).",
1130
+ OBS_SET_COMPOSITION_BAR_PLOT: "The set composition bar plot displays the results of a compositional analysis conducted using the scCODA method (Büttner et al. 2021 Nature Communications).",
1131
+ FEATURE_SET_ENRICHMENT_BAR_PLOT: "The feature set enrichment bar plot displays the results of a hypergeometric test applied to the differential expression test results to identify enriched pathway gene sets.",
1132
+ SAMPLE_SET_PAIR_MANAGER: "Select pairs of sample groups.",
1133
+ FEATURE_STATS_TABLE: "This table displays per-feature statistics, for example, from a differential expression test."
1134
+ };
1109
1135
  const COMPONENT_COORDINATION_TYPES = {
1110
1136
  [ViewType.NEUROGLANCER]: [
1111
1137
  CoordinationType.DATASET
@@ -1606,6 +1632,33 @@ const COMPONENT_COORDINATION_TYPES = {
1606
1632
  CoordinationType.FEATURE_POINT_FOLD_CHANGE_THRESHOLD,
1607
1633
  CoordinationType.FEATURE_LABEL_FOLD_CHANGE_THRESHOLD
1608
1634
  ],
1635
+ [ViewType.FEATURE_STATS_TABLE]: [
1636
+ CoordinationType.DATASET,
1637
+ CoordinationType.OBS_TYPE,
1638
+ CoordinationType.FEATURE_TYPE,
1639
+ CoordinationType.SAMPLE_TYPE,
1640
+ // For selection of case-control sets of samples:
1641
+ CoordinationType.SAMPLE_SET_SELECTION,
1642
+ // For selection of one-vs-others sets of observations:
1643
+ CoordinationType.OBS_SET_SELECTION,
1644
+ // TODO: CoordinationType.FEATURE_SET_SELECTION,
1645
+ // TODO: CoordinationType.FEATURE_SET_HIGHLIGHT,
1646
+ // TODO: CoordinationType.FEATURE_SET_COLOR,
1647
+ CoordinationType.FEATURE_HIGHLIGHT,
1648
+ CoordinationType.FEATURE_SELECTION,
1649
+ CoordinationType.FEATURE_VALUE_COLORMAP,
1650
+ CoordinationType.FEATURE_VALUE_COLORMAP_RANGE,
1651
+ // TODO: CoordinationType.FEATURE_COLOR_ENCODING,
1652
+ // TODO: CoordinationType.ADDITIONAL_FEATURE_SETS,
1653
+ CoordinationType.TOOLTIPS_VISIBLE,
1654
+ CoordinationType.ADDITIONAL_OBS_SETS,
1655
+ CoordinationType.OBS_SET_COLOR,
1656
+ CoordinationType.SAMPLE_SET_COLOR,
1657
+ CoordinationType.FEATURE_POINT_SIGNIFICANCE_THRESHOLD,
1658
+ CoordinationType.FEATURE_LABEL_SIGNIFICANCE_THRESHOLD,
1659
+ CoordinationType.FEATURE_POINT_FOLD_CHANGE_THRESHOLD,
1660
+ CoordinationType.FEATURE_LABEL_FOLD_CHANGE_THRESHOLD
1661
+ ],
1609
1662
  [ViewType.OBS_SET_COMPOSITION_BAR_PLOT]: [
1610
1663
  CoordinationType.DATASET,
1611
1664
  CoordinationType.OBS_TYPE,
@@ -1654,6 +1707,13 @@ const COMPONENT_COORDINATION_TYPES = {
1654
1707
  CoordinationType.OBS_SET_SELECTION,
1655
1708
  CoordinationType.OBS_SET_FILTER
1656
1709
  ],
1710
+ [ViewType.SAMPLE_SET_PAIR_MANAGER]: [
1711
+ CoordinationType.DATASET,
1712
+ CoordinationType.OBS_TYPE,
1713
+ CoordinationType.SAMPLE_TYPE,
1714
+ CoordinationType.SAMPLE_SET_SELECTION,
1715
+ CoordinationType.SAMPLE_SET_FILTER
1716
+ ],
1657
1717
  [ViewType.TREEMAP]: [
1658
1718
  CoordinationType.DATASET,
1659
1719
  CoordinationType.OBS_TYPE,
@@ -2022,7 +2082,7 @@ object-assign
2022
2082
  @license MIT
2023
2083
  */
2024
2084
  var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
2025
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2085
+ var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
2026
2086
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;
2027
2087
  function toObject(val) {
2028
2088
  if (val === null || val === void 0) {
@@ -2069,7 +2129,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function(target, source)
2069
2129
  for (var s = 1; s < arguments.length; s++) {
2070
2130
  from = Object(arguments[s]);
2071
2131
  for (var key in from) {
2072
- if (hasOwnProperty.call(from, key)) {
2132
+ if (hasOwnProperty$9.call(from, key)) {
2073
2133
  to2[key] = from[key];
2074
2134
  }
2075
2135
  }
@@ -3102,7 +3162,7 @@ function _objectWithoutProperties(source, excluded) {
3102
3162
  }
3103
3163
  return target;
3104
3164
  }
3105
- var keys = ["xs", "sm", "md", "lg", "xl"];
3165
+ var keys$1 = ["xs", "sm", "md", "lg", "xl"];
3106
3166
  function createBreakpoints(breakpoints) {
3107
3167
  var _breakpoints$values = breakpoints.values, values2 = _breakpoints$values === void 0 ? {
3108
3168
  xs: 0,
@@ -3116,20 +3176,20 @@ function createBreakpoints(breakpoints) {
3116
3176
  return "@media (min-width:".concat(value).concat(unit, ")");
3117
3177
  }
3118
3178
  function down(key) {
3119
- var endIndex = keys.indexOf(key) + 1;
3120
- var upperbound = values2[keys[endIndex]];
3121
- if (endIndex === keys.length) {
3179
+ var endIndex = keys$1.indexOf(key) + 1;
3180
+ var upperbound = values2[keys$1[endIndex]];
3181
+ if (endIndex === keys$1.length) {
3122
3182
  return up2("xs");
3123
3183
  }
3124
3184
  var value = typeof upperbound === "number" && endIndex > 0 ? upperbound : key;
3125
3185
  return "@media (max-width:".concat(value - step / 100).concat(unit, ")");
3126
3186
  }
3127
3187
  function between(start, end) {
3128
- var endIndex = keys.indexOf(end);
3129
- if (endIndex === keys.length - 1) {
3188
+ var endIndex = keys$1.indexOf(end);
3189
+ if (endIndex === keys$1.length - 1) {
3130
3190
  return up2(start);
3131
3191
  }
3132
- return "@media (min-width:".concat(typeof values2[start] === "number" ? values2[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values2[keys[endIndex + 1]] === "number" ? values2[keys[endIndex + 1]] : end) - step / 100).concat(unit, ")");
3192
+ return "@media (min-width:".concat(typeof values2[start] === "number" ? values2[start] : start).concat(unit, ") and ") + "(max-width:".concat((endIndex !== -1 && typeof values2[keys$1[endIndex + 1]] === "number" ? values2[keys$1[endIndex + 1]] : end) - step / 100).concat(unit, ")");
3133
3193
  }
3134
3194
  function only(key) {
3135
3195
  return between(key, key);
@@ -3145,7 +3205,7 @@ function createBreakpoints(breakpoints) {
3145
3205
  return values2[key];
3146
3206
  }
3147
3207
  return _extends$2({
3148
- keys,
3208
+ keys: keys$1,
3149
3209
  values: values2,
3150
3210
  up: up2,
3151
3211
  down,
@@ -3959,7 +4019,7 @@ function createUnarySpacing(theme) {
3959
4019
  return void 0;
3960
4020
  };
3961
4021
  }
3962
- function getValue(transformer, propValue) {
4022
+ function getValue$1(transformer, propValue) {
3963
4023
  if (typeof propValue === "string" || propValue == null) {
3964
4024
  return propValue;
3965
4025
  }
@@ -3976,7 +4036,7 @@ function getValue(transformer, propValue) {
3976
4036
  function getStyleFromPropValue(cssProperties, transformer) {
3977
4037
  return function(propValue) {
3978
4038
  return cssProperties.reduce(function(acc, cssProperty) {
3979
- acc[cssProperty] = getValue(transformer, propValue);
4039
+ acc[cssProperty] = getValue$1(transformer, propValue);
3980
4040
  return acc;
3981
4041
  }, {});
3982
4042
  };
@@ -7325,7 +7385,7 @@ function styled$2(Component) {
7325
7385
  }
7326
7386
  var stylesOrCreator = typeof style === "function" ? function(theme) {
7327
7387
  return {
7328
- root: function root(props) {
7388
+ root: function root2(props) {
7329
7389
  return style(_extends$2({
7330
7390
  theme
7331
7391
  }, props));
@@ -17751,7 +17811,7 @@ function taskDebounce(fn2) {
17751
17811
  }
17752
17812
  var supportsMicroTasks = isBrowser && window.Promise;
17753
17813
  var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;
17754
- function isFunction(functionToCheck) {
17814
+ function isFunction$1(functionToCheck) {
17755
17815
  var getType = {};
17756
17816
  return functionToCheck && getType.toString.call(functionToCheck) === "[object Function]";
17757
17817
  }
@@ -18209,7 +18269,7 @@ function runModifiers(modifiers2, data, ends) {
18209
18269
  console.warn("`modifier.function` is deprecated, use `modifier.fn`!");
18210
18270
  }
18211
18271
  var fn2 = modifier["function"] || modifier.fn;
18212
- if (modifier.enabled && isFunction(fn2)) {
18272
+ if (modifier.enabled && isFunction$1(fn2)) {
18213
18273
  data.offsets.popper = getClientRect(data.offsets.popper);
18214
18274
  data.offsets.reference = getClientRect(data.offsets.reference);
18215
18275
  data = fn2(data, modifier);
@@ -19172,7 +19232,7 @@ var Popper$1 = function() {
19172
19232
  return a.order - b.order;
19173
19233
  });
19174
19234
  this.modifiers.forEach(function(modifierOptions) {
19175
- if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {
19235
+ if (modifierOptions.enabled && isFunction$1(modifierOptions.onLoad)) {
19176
19236
  modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);
19177
19237
  }
19178
19238
  });
@@ -22462,7 +22522,7 @@ const ExpandMoreIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path",
22462
22522
  const InfoIcon = createSvgIcon(/* @__PURE__ */ React.createElement("path", {
22463
22523
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"
22464
22524
  }), "Info");
22465
- const useStyles = makeStyles(() => ({
22525
+ const useStyles$2 = makeStyles(() => ({
22466
22526
  header: {
22467
22527
  marginTop: "10px",
22468
22528
  marginBottom: "10px"
@@ -22505,7 +22565,7 @@ function ConfirmatoryCart(props) {
22505
22565
  // eslint-disable-next-line no-unused-vars
22506
22566
  setCurrentStratificationSelection
22507
22567
  } = props;
22508
- const classes = useStyles();
22568
+ const classes = useStyles$2();
22509
22569
  const [expandedAccordions, setExpandedAccordions] = React__default.useState([
22510
22570
  "agnostic",
22511
22571
  "specific",
@@ -24098,7 +24158,7 @@ const Autocomplete$1 = withStyles2(styles42, {
24098
24158
  var safeIsNaN = Number.isNaN || function ponyfill(value) {
24099
24159
  return typeof value === "number" && value !== value;
24100
24160
  };
24101
- function isEqual(first, second) {
24161
+ function isEqual$1(first, second) {
24102
24162
  if (first === second) {
24103
24163
  return true;
24104
24164
  }
@@ -24112,7 +24172,7 @@ function areInputsEqual(newInputs, lastInputs) {
24112
24172
  return false;
24113
24173
  }
24114
24174
  for (var i = 0; i < newInputs.length; i++) {
24115
- if (!isEqual(newInputs[i], lastInputs[i])) {
24175
+ if (!isEqual$1(newInputs[i], lastInputs[i])) {
24116
24176
  return false;
24117
24177
  }
24118
24178
  }
@@ -24767,7 +24827,7 @@ function SelectAgnostic(props) {
24767
24827
  currentModalityAgnosticSelection,
24768
24828
  setCurrentModalityAgnosticSelection
24769
24829
  } = props;
24770
- const classes = useStyles();
24830
+ const classes = useStyles$2();
24771
24831
  const [selectedItem, setSelectedItem] = React__default.useState(null);
24772
24832
  const [potentialItems, setPotentialItems] = React__default.useState([]);
24773
24833
  const handleChange = async (event) => {
@@ -30750,7 +30810,7 @@ function SelectSpecific(props) {
30750
30810
  setCurrentModalitySpecificSelection,
30751
30811
  getEdges
30752
30812
  } = props;
30753
- const classes = useStyles();
30813
+ const classes = useStyles$2();
30754
30814
  const queries = useQueries({
30755
30815
  queries: (currentModalityAgnosticSelection == null ? void 0 : currentModalityAgnosticSelection.map((item) => ({
30756
30816
  queryKey: [item.nodeType, item.kgId],
@@ -30886,7 +30946,7 @@ function ConfirmatoryStepper(props) {
30886
30946
  stratifications,
30887
30947
  onFinish
30888
30948
  } = props;
30889
- const classes = useStyles();
30949
+ const classes = useStyles$2();
30890
30950
  const [activeStep, setActiveStep] = React__default.useState(0);
30891
30951
  const [skipped, setSkipped] = React__default.useState(/* @__PURE__ */ new Set());
30892
30952
  const isStepOptional = (step) => step === 2;
@@ -31028,7 +31088,7 @@ function ExploratoryStepper(props) {
31028
31088
  stratifications,
31029
31089
  onFinish
31030
31090
  } = props;
31031
- const classes = useStyles();
31091
+ const classes = useStyles$2();
31032
31092
  const [activeStep, setActiveStep] = React__default.useState(0);
31033
31093
  const [skipped, setSkipped] = React__default.useState(/* @__PURE__ */ new Set());
31034
31094
  const isStepOptional = (step) => step === 2;
@@ -31141,7 +31201,7 @@ function ScmdUi(props) {
31141
31201
  stratifications,
31142
31202
  onFinish
31143
31203
  } = props;
31144
- const classes = useStyles();
31204
+ const classes = useStyles$2();
31145
31205
  const mode = modeProp || "confirmatory";
31146
31206
  const [tempIsVisible, setTempIsVisible] = useState(true);
31147
31207
  const isConfirmatoryMode = mode === "confirmatory";
@@ -31309,22 +31369,927 @@ function BiomarkerSelectSubscriber(props) {
31309
31369
  }
31310
31370
  ) : null });
31311
31371
  }
31372
+ const useStyles$1 = makeStyles((theme) => ({
31373
+ buttonContainer: {
31374
+ position: "absolute",
31375
+ right: 0,
31376
+ display: "flex",
31377
+ flexDirection: "column",
31378
+ justifyContent: "center",
31379
+ height: "100%",
31380
+ "& div": {
31381
+ display: "flex",
31382
+ flexDirection: "row"
31383
+ },
31384
+ "& div > button": {
31385
+ height: "auto"
31386
+ }
31387
+ },
31388
+ headingContainer: {
31389
+ backgroundColor: "transparent"
31390
+ },
31391
+ headingSectionContainer: {
31392
+ width: "100%",
31393
+ display: "flex",
31394
+ flexDirection: "row",
31395
+ position: "relative"
31396
+ },
31397
+ headingText: {
31398
+ margin: 0,
31399
+ color: theme.palette.primaryForeground
31400
+ }
31401
+ }));
31312
31402
  function ComparativeHeadingSubscriber(props) {
31313
31403
  var _a2, _b;
31314
31404
  const {
31315
31405
  coordinationScopes
31316
31406
  } = props;
31317
31407
  const [{
31318
- sampleSetSelection
31408
+ sampleSetSelection,
31409
+ featureSelection
31410
+ }, {
31411
+ setSampleSetSelection,
31412
+ setFeatureSelection
31319
31413
  }] = useCoordination(
31320
31414
  COMPONENT_COORDINATION_TYPES[ViewType.COMPARATIVE_HEADING],
31321
31415
  coordinationScopes
31322
31416
  );
31323
- return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: sampleSetSelection && sampleSetSelection.length === 2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "row" }, children: [
31324
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "45%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { children: (_a2 = sampleSetSelection == null ? void 0 : sampleSetSelection[0]) == null ? void 0 : _a2.at(-1) }) }),
31325
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "5%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { style: { textAlign: "right" }, children: "vs. " }) }),
31326
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "50%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { children: (_b = sampleSetSelection == null ? void 0 : sampleSetSelection[1]) == null ? void 0 : _b.at(-1) }) })
31327
- ] }) : null });
31417
+ const classes = useStyles$1();
31418
+ const swapSampleSets = useCallback(() => {
31419
+ if ((sampleSetSelection == null ? void 0 : sampleSetSelection.length) === 2) {
31420
+ setSampleSetSelection([
31421
+ sampleSetSelection[1],
31422
+ sampleSetSelection[0]
31423
+ ]);
31424
+ }
31425
+ }, [sampleSetSelection, setSampleSetSelection]);
31426
+ const clearSampleSetSelection = useCallback(() => {
31427
+ if ((sampleSetSelection == null ? void 0 : sampleSetSelection.length) === 2) {
31428
+ setSampleSetSelection(null);
31429
+ }
31430
+ }, [sampleSetSelection, setSampleSetSelection]);
31431
+ const clearFeatureSelection = useCallback(() => {
31432
+ if (Array.isArray(featureSelection) && featureSelection.length > 0) {
31433
+ setFeatureSelection(null);
31434
+ }
31435
+ }, [featureSelection, setFeatureSelection]);
31436
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingContainer, children: [
31437
+ sampleSetSelection && sampleSetSelection.length === 2 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingSectionContainer, children: [
31438
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "45%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, children: (_a2 = sampleSetSelection == null ? void 0 : sampleSetSelection[0]) == null ? void 0 : _a2.at(-1) }) }),
31439
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "5%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, style: { textAlign: "right" }, children: "vs. " }) }),
31440
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "50%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, children: (_b = sampleSetSelection == null ? void 0 : sampleSetSelection[1]) == null ? void 0 : _b.at(-1) }) }),
31441
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.buttonContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
31442
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: swapSampleSets, type: "button", children: "Swap" }),
31443
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: clearSampleSetSelection, type: "button", children: "Clear" })
31444
+ ] }) })
31445
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.headingSectionContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: classes.headingText, children: "All samples" }) }) }),
31446
+ featureSelection && featureSelection.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classes.headingSectionContainer, children: [
31447
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: classes.headingText, children: "Selected Biomarkers: " }) }),
31448
+ featureSelection == null ? void 0 : featureSelection.map((featureName, i) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: classes.headingText, children: [
31449
+ featureName,
31450
+ i < featureSelection.length - 1 ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: ", " }) : null
31451
+ ] }) }, featureName)),
31452
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classes.buttonContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: clearFeatureSelection, type: "button", children: "Clear" }) }) })
31453
+ ] }) : null
31454
+ ] });
31455
+ }
31456
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
31457
+ const freeGlobal$1 = freeGlobal;
31458
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
31459
+ var root = freeGlobal$1 || freeSelf || Function("return this")();
31460
+ const root$1 = root;
31461
+ var Symbol$1 = root$1.Symbol;
31462
+ const Symbol$2 = Symbol$1;
31463
+ var objectProto$b = Object.prototype;
31464
+ var hasOwnProperty$8 = objectProto$b.hasOwnProperty;
31465
+ var nativeObjectToString$1 = objectProto$b.toString;
31466
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
31467
+ function getRawTag(value) {
31468
+ var isOwn = hasOwnProperty$8.call(value, symToStringTag$1), tag = value[symToStringTag$1];
31469
+ try {
31470
+ value[symToStringTag$1] = void 0;
31471
+ var unmasked = true;
31472
+ } catch (e) {
31473
+ }
31474
+ var result = nativeObjectToString$1.call(value);
31475
+ if (unmasked) {
31476
+ if (isOwn) {
31477
+ value[symToStringTag$1] = tag;
31478
+ } else {
31479
+ delete value[symToStringTag$1];
31480
+ }
31481
+ }
31482
+ return result;
31483
+ }
31484
+ var objectProto$a = Object.prototype;
31485
+ var nativeObjectToString = objectProto$a.toString;
31486
+ function objectToString(value) {
31487
+ return nativeObjectToString.call(value);
31488
+ }
31489
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
31490
+ var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
31491
+ function baseGetTag(value) {
31492
+ if (value == null) {
31493
+ return value === void 0 ? undefinedTag : nullTag;
31494
+ }
31495
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
31496
+ }
31497
+ function isObjectLike$1(value) {
31498
+ return value != null && typeof value == "object";
31499
+ }
31500
+ var isArray$1 = Array.isArray;
31501
+ const isArray$2 = isArray$1;
31502
+ function isObject$1(value) {
31503
+ var type = typeof value;
31504
+ return value != null && (type == "object" || type == "function");
31505
+ }
31506
+ var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
31507
+ function isFunction(value) {
31508
+ if (!isObject$1(value)) {
31509
+ return false;
31510
+ }
31511
+ var tag = baseGetTag(value);
31512
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
31513
+ }
31514
+ var coreJsData = root$1["__core-js_shared__"];
31515
+ const coreJsData$1 = coreJsData;
31516
+ var maskSrcKey = function() {
31517
+ var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
31518
+ return uid ? "Symbol(src)_1." + uid : "";
31519
+ }();
31520
+ function isMasked(func) {
31521
+ return !!maskSrcKey && maskSrcKey in func;
31522
+ }
31523
+ var funcProto$1 = Function.prototype;
31524
+ var funcToString$1 = funcProto$1.toString;
31525
+ function toSource(func) {
31526
+ if (func != null) {
31527
+ try {
31528
+ return funcToString$1.call(func);
31529
+ } catch (e) {
31530
+ }
31531
+ try {
31532
+ return func + "";
31533
+ } catch (e) {
31534
+ }
31535
+ }
31536
+ return "";
31537
+ }
31538
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
31539
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
31540
+ var funcProto = Function.prototype, objectProto$9 = Object.prototype;
31541
+ var funcToString = funcProto.toString;
31542
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
31543
+ var reIsNative = RegExp(
31544
+ "^" + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
31545
+ );
31546
+ function baseIsNative(value) {
31547
+ if (!isObject$1(value) || isMasked(value)) {
31548
+ return false;
31549
+ }
31550
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
31551
+ return pattern.test(toSource(value));
31552
+ }
31553
+ function getValue(object, key) {
31554
+ return object == null ? void 0 : object[key];
31555
+ }
31556
+ function getNative(object, key) {
31557
+ var value = getValue(object, key);
31558
+ return baseIsNative(value) ? value : void 0;
31559
+ }
31560
+ var WeakMap$1 = getNative(root$1, "WeakMap");
31561
+ const WeakMap$2 = WeakMap$1;
31562
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
31563
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
31564
+ function isIndex(value, length) {
31565
+ var type = typeof value;
31566
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
31567
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
31568
+ }
31569
+ function eq(value, other) {
31570
+ return value === other || value !== value && other !== other;
31571
+ }
31572
+ var MAX_SAFE_INTEGER = 9007199254740991;
31573
+ function isLength(value) {
31574
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
31575
+ }
31576
+ function isArrayLike(value) {
31577
+ return value != null && isLength(value.length) && !isFunction(value);
31578
+ }
31579
+ var objectProto$8 = Object.prototype;
31580
+ function isPrototype(value) {
31581
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$8;
31582
+ return value === proto;
31583
+ }
31584
+ function baseTimes(n2, iteratee) {
31585
+ var index = -1, result = Array(n2);
31586
+ while (++index < n2) {
31587
+ result[index] = iteratee(index);
31588
+ }
31589
+ return result;
31590
+ }
31591
+ var argsTag$2 = "[object Arguments]";
31592
+ function baseIsArguments(value) {
31593
+ return isObjectLike$1(value) && baseGetTag(value) == argsTag$2;
31594
+ }
31595
+ var objectProto$7 = Object.prototype;
31596
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
31597
+ var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
31598
+ var isArguments = baseIsArguments(function() {
31599
+ return arguments;
31600
+ }()) ? baseIsArguments : function(value) {
31601
+ return isObjectLike$1(value) && hasOwnProperty$6.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
31602
+ };
31603
+ const isArguments$1 = isArguments;
31604
+ function stubFalse() {
31605
+ return false;
31606
+ }
31607
+ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
31608
+ var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
31609
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
31610
+ var Buffer = moduleExports$1 ? root$1.Buffer : void 0;
31611
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
31612
+ var isBuffer = nativeIsBuffer || stubFalse;
31613
+ const isBuffer$1 = isBuffer;
31614
+ var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", weakMapTag$1 = "[object WeakMap]";
31615
+ var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
31616
+ var typedArrayTags = {};
31617
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
31618
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
31619
+ function baseIsTypedArray(value) {
31620
+ return isObjectLike$1(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
31621
+ }
31622
+ function baseUnary(func) {
31623
+ return function(value) {
31624
+ return func(value);
31625
+ };
31626
+ }
31627
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
31628
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
31629
+ var moduleExports = freeModule && freeModule.exports === freeExports;
31630
+ var freeProcess = moduleExports && freeGlobal$1.process;
31631
+ var nodeUtil = function() {
31632
+ try {
31633
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
31634
+ if (types) {
31635
+ return types;
31636
+ }
31637
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
31638
+ } catch (e) {
31639
+ }
31640
+ }();
31641
+ const nodeUtil$1 = nodeUtil;
31642
+ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
31643
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
31644
+ const isTypedArray$1 = isTypedArray;
31645
+ var objectProto$6 = Object.prototype;
31646
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
31647
+ function arrayLikeKeys(value, inherited) {
31648
+ var isArr = isArray$2(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
31649
+ for (var key in value) {
31650
+ if ((inherited || hasOwnProperty$5.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
31651
+ (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
31652
+ isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
31653
+ isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
31654
+ isIndex(key, length)))) {
31655
+ result.push(key);
31656
+ }
31657
+ }
31658
+ return result;
31659
+ }
31660
+ function overArg(func, transform3) {
31661
+ return function(arg) {
31662
+ return func(transform3(arg));
31663
+ };
31664
+ }
31665
+ var nativeKeys = overArg(Object.keys, Object);
31666
+ const nativeKeys$1 = nativeKeys;
31667
+ var objectProto$5 = Object.prototype;
31668
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
31669
+ function baseKeys(object) {
31670
+ if (!isPrototype(object)) {
31671
+ return nativeKeys$1(object);
31672
+ }
31673
+ var result = [];
31674
+ for (var key in Object(object)) {
31675
+ if (hasOwnProperty$4.call(object, key) && key != "constructor") {
31676
+ result.push(key);
31677
+ }
31678
+ }
31679
+ return result;
31680
+ }
31681
+ function keys(object) {
31682
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
31683
+ }
31684
+ var nativeCreate = getNative(Object, "create");
31685
+ const nativeCreate$1 = nativeCreate;
31686
+ function hashClear() {
31687
+ this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
31688
+ this.size = 0;
31689
+ }
31690
+ function hashDelete(key) {
31691
+ var result = this.has(key) && delete this.__data__[key];
31692
+ this.size -= result ? 1 : 0;
31693
+ return result;
31694
+ }
31695
+ var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
31696
+ var objectProto$4 = Object.prototype;
31697
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
31698
+ function hashGet(key) {
31699
+ var data = this.__data__;
31700
+ if (nativeCreate$1) {
31701
+ var result = data[key];
31702
+ return result === HASH_UNDEFINED$2 ? void 0 : result;
31703
+ }
31704
+ return hasOwnProperty$3.call(data, key) ? data[key] : void 0;
31705
+ }
31706
+ var objectProto$3 = Object.prototype;
31707
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
31708
+ function hashHas(key) {
31709
+ var data = this.__data__;
31710
+ return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$2.call(data, key);
31711
+ }
31712
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
31713
+ function hashSet(key, value) {
31714
+ var data = this.__data__;
31715
+ this.size += this.has(key) ? 0 : 1;
31716
+ data[key] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$1 : value;
31717
+ return this;
31718
+ }
31719
+ function Hash(entries) {
31720
+ var index = -1, length = entries == null ? 0 : entries.length;
31721
+ this.clear();
31722
+ while (++index < length) {
31723
+ var entry = entries[index];
31724
+ this.set(entry[0], entry[1]);
31725
+ }
31726
+ }
31727
+ Hash.prototype.clear = hashClear;
31728
+ Hash.prototype["delete"] = hashDelete;
31729
+ Hash.prototype.get = hashGet;
31730
+ Hash.prototype.has = hashHas;
31731
+ Hash.prototype.set = hashSet;
31732
+ function listCacheClear() {
31733
+ this.__data__ = [];
31734
+ this.size = 0;
31735
+ }
31736
+ function assocIndexOf(array, key) {
31737
+ var length = array.length;
31738
+ while (length--) {
31739
+ if (eq(array[length][0], key)) {
31740
+ return length;
31741
+ }
31742
+ }
31743
+ return -1;
31744
+ }
31745
+ var arrayProto = Array.prototype;
31746
+ var splice = arrayProto.splice;
31747
+ function listCacheDelete(key) {
31748
+ var data = this.__data__, index = assocIndexOf(data, key);
31749
+ if (index < 0) {
31750
+ return false;
31751
+ }
31752
+ var lastIndex = data.length - 1;
31753
+ if (index == lastIndex) {
31754
+ data.pop();
31755
+ } else {
31756
+ splice.call(data, index, 1);
31757
+ }
31758
+ --this.size;
31759
+ return true;
31760
+ }
31761
+ function listCacheGet(key) {
31762
+ var data = this.__data__, index = assocIndexOf(data, key);
31763
+ return index < 0 ? void 0 : data[index][1];
31764
+ }
31765
+ function listCacheHas(key) {
31766
+ return assocIndexOf(this.__data__, key) > -1;
31767
+ }
31768
+ function listCacheSet(key, value) {
31769
+ var data = this.__data__, index = assocIndexOf(data, key);
31770
+ if (index < 0) {
31771
+ ++this.size;
31772
+ data.push([key, value]);
31773
+ } else {
31774
+ data[index][1] = value;
31775
+ }
31776
+ return this;
31777
+ }
31778
+ function ListCache(entries) {
31779
+ var index = -1, length = entries == null ? 0 : entries.length;
31780
+ this.clear();
31781
+ while (++index < length) {
31782
+ var entry = entries[index];
31783
+ this.set(entry[0], entry[1]);
31784
+ }
31785
+ }
31786
+ ListCache.prototype.clear = listCacheClear;
31787
+ ListCache.prototype["delete"] = listCacheDelete;
31788
+ ListCache.prototype.get = listCacheGet;
31789
+ ListCache.prototype.has = listCacheHas;
31790
+ ListCache.prototype.set = listCacheSet;
31791
+ var Map$1 = getNative(root$1, "Map");
31792
+ const Map$2 = Map$1;
31793
+ function mapCacheClear() {
31794
+ this.size = 0;
31795
+ this.__data__ = {
31796
+ "hash": new Hash(),
31797
+ "map": new (Map$2 || ListCache)(),
31798
+ "string": new Hash()
31799
+ };
31800
+ }
31801
+ function isKeyable(value) {
31802
+ var type = typeof value;
31803
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
31804
+ }
31805
+ function getMapData(map, key) {
31806
+ var data = map.__data__;
31807
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
31808
+ }
31809
+ function mapCacheDelete(key) {
31810
+ var result = getMapData(this, key)["delete"](key);
31811
+ this.size -= result ? 1 : 0;
31812
+ return result;
31813
+ }
31814
+ function mapCacheGet(key) {
31815
+ return getMapData(this, key).get(key);
31816
+ }
31817
+ function mapCacheHas(key) {
31818
+ return getMapData(this, key).has(key);
31819
+ }
31820
+ function mapCacheSet(key, value) {
31821
+ var data = getMapData(this, key), size2 = data.size;
31822
+ data.set(key, value);
31823
+ this.size += data.size == size2 ? 0 : 1;
31824
+ return this;
31825
+ }
31826
+ function MapCache(entries) {
31827
+ var index = -1, length = entries == null ? 0 : entries.length;
31828
+ this.clear();
31829
+ while (++index < length) {
31830
+ var entry = entries[index];
31831
+ this.set(entry[0], entry[1]);
31832
+ }
31833
+ }
31834
+ MapCache.prototype.clear = mapCacheClear;
31835
+ MapCache.prototype["delete"] = mapCacheDelete;
31836
+ MapCache.prototype.get = mapCacheGet;
31837
+ MapCache.prototype.has = mapCacheHas;
31838
+ MapCache.prototype.set = mapCacheSet;
31839
+ function arrayPush(array, values2) {
31840
+ var index = -1, length = values2.length, offset2 = array.length;
31841
+ while (++index < length) {
31842
+ array[offset2 + index] = values2[index];
31843
+ }
31844
+ return array;
31845
+ }
31846
+ function stackClear() {
31847
+ this.__data__ = new ListCache();
31848
+ this.size = 0;
31849
+ }
31850
+ function stackDelete(key) {
31851
+ var data = this.__data__, result = data["delete"](key);
31852
+ this.size = data.size;
31853
+ return result;
31854
+ }
31855
+ function stackGet(key) {
31856
+ return this.__data__.get(key);
31857
+ }
31858
+ function stackHas(key) {
31859
+ return this.__data__.has(key);
31860
+ }
31861
+ var LARGE_ARRAY_SIZE = 200;
31862
+ function stackSet(key, value) {
31863
+ var data = this.__data__;
31864
+ if (data instanceof ListCache) {
31865
+ var pairs = data.__data__;
31866
+ if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
31867
+ pairs.push([key, value]);
31868
+ this.size = ++data.size;
31869
+ return this;
31870
+ }
31871
+ data = this.__data__ = new MapCache(pairs);
31872
+ }
31873
+ data.set(key, value);
31874
+ this.size = data.size;
31875
+ return this;
31876
+ }
31877
+ function Stack(entries) {
31878
+ var data = this.__data__ = new ListCache(entries);
31879
+ this.size = data.size;
31880
+ }
31881
+ Stack.prototype.clear = stackClear;
31882
+ Stack.prototype["delete"] = stackDelete;
31883
+ Stack.prototype.get = stackGet;
31884
+ Stack.prototype.has = stackHas;
31885
+ Stack.prototype.set = stackSet;
31886
+ function arrayFilter(array, predicate) {
31887
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
31888
+ while (++index < length) {
31889
+ var value = array[index];
31890
+ if (predicate(value, index, array)) {
31891
+ result[resIndex++] = value;
31892
+ }
31893
+ }
31894
+ return result;
31895
+ }
31896
+ function stubArray() {
31897
+ return [];
31898
+ }
31899
+ var objectProto$2 = Object.prototype;
31900
+ var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
31901
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
31902
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
31903
+ if (object == null) {
31904
+ return [];
31905
+ }
31906
+ object = Object(object);
31907
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
31908
+ return propertyIsEnumerable.call(object, symbol);
31909
+ });
31910
+ };
31911
+ const getSymbols$1 = getSymbols;
31912
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
31913
+ var result = keysFunc(object);
31914
+ return isArray$2(object) ? result : arrayPush(result, symbolsFunc(object));
31915
+ }
31916
+ function getAllKeys(object) {
31917
+ return baseGetAllKeys(object, keys, getSymbols$1);
31918
+ }
31919
+ var DataView = getNative(root$1, "DataView");
31920
+ const DataView$1 = DataView;
31921
+ var Promise$1 = getNative(root$1, "Promise");
31922
+ const Promise$2 = Promise$1;
31923
+ var Set$1 = getNative(root$1, "Set");
31924
+ const Set$2 = Set$1;
31925
+ var mapTag$1 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$1 = "[object Set]", weakMapTag = "[object WeakMap]";
31926
+ var dataViewTag$1 = "[object DataView]";
31927
+ var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$2), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$2), weakMapCtorString = toSource(WeakMap$2);
31928
+ var getTag$1 = baseGetTag;
31929
+ if (DataView$1 && getTag$1(new DataView$1(new ArrayBuffer(1))) != dataViewTag$1 || Map$2 && getTag$1(new Map$2()) != mapTag$1 || Promise$2 && getTag$1(Promise$2.resolve()) != promiseTag || Set$2 && getTag$1(new Set$2()) != setTag$1 || WeakMap$2 && getTag$1(new WeakMap$2()) != weakMapTag) {
31930
+ getTag$1 = function(value) {
31931
+ var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
31932
+ if (ctorString) {
31933
+ switch (ctorString) {
31934
+ case dataViewCtorString:
31935
+ return dataViewTag$1;
31936
+ case mapCtorString:
31937
+ return mapTag$1;
31938
+ case promiseCtorString:
31939
+ return promiseTag;
31940
+ case setCtorString:
31941
+ return setTag$1;
31942
+ case weakMapCtorString:
31943
+ return weakMapTag;
31944
+ }
31945
+ }
31946
+ return result;
31947
+ };
31948
+ }
31949
+ const getTag$2 = getTag$1;
31950
+ var Uint8Array$1 = root$1.Uint8Array;
31951
+ const Uint8Array$2 = Uint8Array$1;
31952
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
31953
+ function setCacheAdd(value) {
31954
+ this.__data__.set(value, HASH_UNDEFINED);
31955
+ return this;
31956
+ }
31957
+ function setCacheHas(value) {
31958
+ return this.__data__.has(value);
31959
+ }
31960
+ function SetCache(values2) {
31961
+ var index = -1, length = values2 == null ? 0 : values2.length;
31962
+ this.__data__ = new MapCache();
31963
+ while (++index < length) {
31964
+ this.add(values2[index]);
31965
+ }
31966
+ }
31967
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
31968
+ SetCache.prototype.has = setCacheHas;
31969
+ function arraySome(array, predicate) {
31970
+ var index = -1, length = array == null ? 0 : array.length;
31971
+ while (++index < length) {
31972
+ if (predicate(array[index], index, array)) {
31973
+ return true;
31974
+ }
31975
+ }
31976
+ return false;
31977
+ }
31978
+ function cacheHas(cache2, key) {
31979
+ return cache2.has(key);
31980
+ }
31981
+ var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
31982
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
31983
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
31984
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
31985
+ return false;
31986
+ }
31987
+ var arrStacked = stack.get(array);
31988
+ var othStacked = stack.get(other);
31989
+ if (arrStacked && othStacked) {
31990
+ return arrStacked == other && othStacked == array;
31991
+ }
31992
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
31993
+ stack.set(array, other);
31994
+ stack.set(other, array);
31995
+ while (++index < arrLength) {
31996
+ var arrValue = array[index], othValue = other[index];
31997
+ if (customizer) {
31998
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
31999
+ }
32000
+ if (compared !== void 0) {
32001
+ if (compared) {
32002
+ continue;
32003
+ }
32004
+ result = false;
32005
+ break;
32006
+ }
32007
+ if (seen) {
32008
+ if (!arraySome(other, function(othValue2, othIndex) {
32009
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
32010
+ return seen.push(othIndex);
32011
+ }
32012
+ })) {
32013
+ result = false;
32014
+ break;
32015
+ }
32016
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
32017
+ result = false;
32018
+ break;
32019
+ }
32020
+ }
32021
+ stack["delete"](array);
32022
+ stack["delete"](other);
32023
+ return result;
32024
+ }
32025
+ function mapToArray(map) {
32026
+ var index = -1, result = Array(map.size);
32027
+ map.forEach(function(value, key) {
32028
+ result[++index] = [key, value];
32029
+ });
32030
+ return result;
32031
+ }
32032
+ function setToArray(set2) {
32033
+ var index = -1, result = Array(set2.size);
32034
+ set2.forEach(function(value) {
32035
+ result[++index] = value;
32036
+ });
32037
+ return result;
32038
+ }
32039
+ var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
32040
+ var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
32041
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
32042
+ var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
32043
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
32044
+ switch (tag) {
32045
+ case dataViewTag:
32046
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
32047
+ return false;
32048
+ }
32049
+ object = object.buffer;
32050
+ other = other.buffer;
32051
+ case arrayBufferTag:
32052
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$2(object), new Uint8Array$2(other))) {
32053
+ return false;
32054
+ }
32055
+ return true;
32056
+ case boolTag:
32057
+ case dateTag:
32058
+ case numberTag:
32059
+ return eq(+object, +other);
32060
+ case errorTag:
32061
+ return object.name == other.name && object.message == other.message;
32062
+ case regexpTag:
32063
+ case stringTag:
32064
+ return object == other + "";
32065
+ case mapTag:
32066
+ var convert = mapToArray;
32067
+ case setTag:
32068
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
32069
+ convert || (convert = setToArray);
32070
+ if (object.size != other.size && !isPartial) {
32071
+ return false;
32072
+ }
32073
+ var stacked = stack.get(object);
32074
+ if (stacked) {
32075
+ return stacked == other;
32076
+ }
32077
+ bitmask |= COMPARE_UNORDERED_FLAG;
32078
+ stack.set(object, other);
32079
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
32080
+ stack["delete"](object);
32081
+ return result;
32082
+ case symbolTag:
32083
+ if (symbolValueOf) {
32084
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
32085
+ }
32086
+ }
32087
+ return false;
32088
+ }
32089
+ var COMPARE_PARTIAL_FLAG$1 = 1;
32090
+ var objectProto$1 = Object.prototype;
32091
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
32092
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
32093
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
32094
+ if (objLength != othLength && !isPartial) {
32095
+ return false;
32096
+ }
32097
+ var index = objLength;
32098
+ while (index--) {
32099
+ var key = objProps[index];
32100
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
32101
+ return false;
32102
+ }
32103
+ }
32104
+ var objStacked = stack.get(object);
32105
+ var othStacked = stack.get(other);
32106
+ if (objStacked && othStacked) {
32107
+ return objStacked == other && othStacked == object;
32108
+ }
32109
+ var result = true;
32110
+ stack.set(object, other);
32111
+ stack.set(other, object);
32112
+ var skipCtor = isPartial;
32113
+ while (++index < objLength) {
32114
+ key = objProps[index];
32115
+ var objValue = object[key], othValue = other[key];
32116
+ if (customizer) {
32117
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
32118
+ }
32119
+ if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
32120
+ result = false;
32121
+ break;
32122
+ }
32123
+ skipCtor || (skipCtor = key == "constructor");
32124
+ }
32125
+ if (result && !skipCtor) {
32126
+ var objCtor = object.constructor, othCtor = other.constructor;
32127
+ if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
32128
+ result = false;
32129
+ }
32130
+ }
32131
+ stack["delete"](object);
32132
+ stack["delete"](other);
32133
+ return result;
32134
+ }
32135
+ var COMPARE_PARTIAL_FLAG = 1;
32136
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
32137
+ var objectProto = Object.prototype;
32138
+ var hasOwnProperty = objectProto.hasOwnProperty;
32139
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
32140
+ var objIsArr = isArray$2(object), othIsArr = isArray$2(other), objTag = objIsArr ? arrayTag : getTag$2(object), othTag = othIsArr ? arrayTag : getTag$2(other);
32141
+ objTag = objTag == argsTag ? objectTag : objTag;
32142
+ othTag = othTag == argsTag ? objectTag : othTag;
32143
+ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
32144
+ if (isSameTag && isBuffer$1(object)) {
32145
+ if (!isBuffer$1(other)) {
32146
+ return false;
32147
+ }
32148
+ objIsArr = true;
32149
+ objIsObj = false;
32150
+ }
32151
+ if (isSameTag && !objIsObj) {
32152
+ stack || (stack = new Stack());
32153
+ return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
32154
+ }
32155
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
32156
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
32157
+ if (objIsWrapped || othIsWrapped) {
32158
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
32159
+ stack || (stack = new Stack());
32160
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
32161
+ }
32162
+ }
32163
+ if (!isSameTag) {
32164
+ return false;
32165
+ }
32166
+ stack || (stack = new Stack());
32167
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
32168
+ }
32169
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
32170
+ if (value === other) {
32171
+ return true;
32172
+ }
32173
+ if (value == null || other == null || !isObjectLike$1(value) && !isObjectLike$1(other)) {
32174
+ return value !== value && other !== other;
32175
+ }
32176
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
32177
+ }
32178
+ function isEqual(value, other) {
32179
+ return baseIsEqual(value, other);
32180
+ }
32181
+ const useStyles = makeStyles(() => ({
32182
+ selectedPair: {
32183
+ fontWeight: "bold"
32184
+ },
32185
+ pairUl: {
32186
+ paddingLeft: "15px",
32187
+ marginTop: 0,
32188
+ fontSize: "12px",
32189
+ "& button": {
32190
+ fontSize: "12px"
32191
+ }
32192
+ }
32193
+ }));
32194
+ function SampleSetPairManagerSubscriber(props) {
32195
+ const {
32196
+ coordinationScopes,
32197
+ removeGridComponent,
32198
+ theme,
32199
+ title = "Sample Sets",
32200
+ closeButtonVisible,
32201
+ helpText = ViewHelpMapping.SAMPLE_SET_PAIR_MANAGER
32202
+ } = props;
32203
+ const classes = useStyles();
32204
+ const loaders = useLoaders();
32205
+ const [{
32206
+ dataset,
32207
+ obsType,
32208
+ sampleType,
32209
+ sampleSetSelection
32210
+ }, {
32211
+ setSampleSetSelection
32212
+ }] = useCoordination(
32213
+ COMPONENT_COORDINATION_TYPES[ViewType.SAMPLE_SET_PAIR_MANAGER],
32214
+ coordinationScopes
32215
+ );
32216
+ const sampleSetsLoader = useMatchingLoader(
32217
+ loaders,
32218
+ dataset,
32219
+ DataType.SAMPLE_SETS,
32220
+ { sampleType }
32221
+ );
32222
+ const sampleSetsColumnNameMappingReversed = useColumnNameMapping(sampleSetsLoader, true);
32223
+ const [{ comparisonMetadata }, cmpMetadataStatus] = useComparisonMetadata(
32224
+ loaders,
32225
+ dataset,
32226
+ false,
32227
+ {},
32228
+ {},
32229
+ { obsType, sampleType }
32230
+ );
32231
+ const isReady = useReady([
32232
+ cmpMetadataStatus
32233
+ ]);
32234
+ const stratificationOptions = useMemo(() => {
32235
+ if (comparisonMetadata == null ? void 0 : comparisonMetadata.sample_group_pairs) {
32236
+ return comparisonMetadata.sample_group_pairs.map((sampleGroupPair) => {
32237
+ const [sampleGroupCol, sampleGroupValues] = sampleGroupPair;
32238
+ const [sampleGroupCtrl, sampleGroupCase] = sampleGroupValues;
32239
+ const groupName = sampleSetsColumnNameMappingReversed == null ? void 0 : sampleSetsColumnNameMappingReversed[sampleGroupCol];
32240
+ return {
32241
+ stratificationId: `${sampleGroupCol}_${sampleGroupCtrl}-vs-${sampleGroupCase}`,
32242
+ name: `${groupName}: ${sampleGroupCtrl} vs. ${sampleGroupCase}`,
32243
+ stratificationType: "sampleSet",
32244
+ sampleSets: [
32245
+ // With sampleSets coming from the comparison_metadata,
32246
+ // need to use loader options from obsSets and sampleSets to get mapping
32247
+ // from column name to group name.
32248
+ [groupName, sampleGroupCtrl],
32249
+ [groupName, sampleGroupCase]
32250
+ ]
32251
+ };
32252
+ });
32253
+ }
32254
+ return null;
32255
+ }, [comparisonMetadata, sampleSetsColumnNameMappingReversed]);
32256
+ const onSelectPair = useCallback((sampleSetPair) => {
32257
+ setSampleSetSelection(sampleSetPair);
32258
+ }, [sampleSetSelection, setSampleSetSelection]);
32259
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
32260
+ TitleInfo,
32261
+ {
32262
+ title,
32263
+ closeButtonVisible,
32264
+ removeGridComponent,
32265
+ isScroll: true,
32266
+ theme,
32267
+ isReady,
32268
+ helpText,
32269
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: classes.pairUl, children: stratificationOptions == null ? void 0 : stratificationOptions.map((pairObj) => {
32270
+ const isSelected = Array.isArray(sampleSetSelection) && sampleSetSelection.length === 2 && (isEqual(pairObj.sampleSets, sampleSetSelection) || isEqual(pairObj.sampleSets, [sampleSetSelection == null ? void 0 : sampleSetSelection[1], sampleSetSelection == null ? void 0 : sampleSetSelection[0]]));
32271
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
32272
+ "li",
32273
+ {
32274
+ className: clsx({ [classes.selectedPair]: isSelected }),
32275
+ children: [
32276
+ pairObj.name,
32277
+ " ",
32278
+ !isSelected ? /* @__PURE__ */ jsxRuntimeExports.jsx(
32279
+ "button",
32280
+ {
32281
+ type: "button",
32282
+ onClick: () => onSelectPair(pairObj.sampleSets),
32283
+ children: "Select"
32284
+ }
32285
+ ) : null
32286
+ ]
32287
+ },
32288
+ pairObj.stratificationId
32289
+ );
32290
+ }) })
32291
+ }
32292
+ );
31328
32293
  }
31329
32294
  var EOL = {}, EOF = {}, QUOTE = 34, NEWLINE = 10, RETURN = 13;
31330
32295
  function objectConverter(columns2) {
@@ -32394,12 +33359,17 @@ function loadCellTypeNodes() {
32394
33359
  });
32395
33360
  }
32396
33361
  function loadPathwayNodes() {
32397
- return fetch(`${KG_BASE_URL}/Reactome_2022.nodes.csv`).then((res) => res.text()).then((res) => {
33362
+ const reactomeNodes = fetch(`${KG_BASE_URL}/Reactome_2022.nodes.csv`);
33363
+ return reactomeNodes.then((res) => res.text()).then((res) => {
32398
33364
  const result = csvParse(res);
32399
33365
  return result.map((d) => ({
32400
33366
  kgId: d.id,
32401
33367
  label: d.pathway,
33368
+ // For reactome
32402
33369
  term: `reactome:${d.acc}`,
33370
+ // For reactome
33371
+ // label: d.ontology_label, // For GO_BP
33372
+ // term: d.acc, // For GO_BP
32403
33373
  nodeType: "pathway"
32404
33374
  }));
32405
33375
  });
@@ -32456,7 +33426,8 @@ async function autocompleteFeature({ queryClient }, partial, targetModality) {
32456
33426
  return results.map((result) => result.item);
32457
33427
  }
32458
33428
  async function loadPathwayToGeneEdges() {
32459
- return fetch(`${KG_BASE_URL}/Reactome_2022.Reactome.Gene.edges.csv`).then((res) => res.text()).then((res) => {
33429
+ const reactomeEdges = fetch(`${KG_BASE_URL}/Reactome_2022.Reactome.Gene.edges.csv`);
33430
+ return reactomeEdges.then((res) => res.text()).then((res) => {
32460
33431
  const result = csvParse(res);
32461
33432
  return result.map((d) => ({
32462
33433
  source: d.source,
@@ -32525,6 +33496,7 @@ async function getTermMapping({ queryClient }, keyCuriePrefix, valCuriePrefix) {
32525
33496
  export {
32526
33497
  BiomarkerSelectSubscriber,
32527
33498
  ComparativeHeadingSubscriber,
33499
+ SampleSetPairManagerSubscriber,
32528
33500
  autocompleteFeature,
32529
33501
  getAlternativeTerms,
32530
33502
  getTermMapping,