@vitessce/statistical-plots 3.4.7 → 3.4.8
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/{deflate-c8c2f459.js → deflate-9b949812.js} +1 -1
- package/dist/{index-a1925e78.js → index-ff4d0660.js} +25 -23
- package/dist/index.js +1 -1
- package/dist/{jpeg-ffd14ffe.js → jpeg-9d65dc0f.js} +1 -1
- package/dist/{lerc-9d1dd17e.js → lerc-5d951898.js} +1 -1
- package/dist/{lzw-3705b408.js → lzw-f9f89edb.js} +1 -1
- package/dist/{packbits-6f657116.js → packbits-92275192.js} +1 -1
- package/dist/{raw-0a76dec9.js → raw-18214a1e.js} +1 -1
- package/dist/{webimage-fbdf3bdf.js → webimage-6f128314.js} +1 -1
- package/dist-tsc/dot-plot-hook.js +3 -3
- package/dist-tsc/expr-hooks.js +7 -7
- package/dist-tsc/expr-hooks.test.js +2 -2
- package/package.json +7 -7
- package/src/dot-plot-hook.js +3 -3
- package/src/expr-hooks.js +7 -7
- package/src/expr-hooks.test.js +2 -2
@@ -18842,13 +18842,15 @@ function stratifyExpressionData(sampleEdges, sampleSets, sampleSetSelection, exp
|
|
18842
18842
|
}
|
18843
18843
|
function aggregateStratifiedExpressionData(stratifiedResult, geneSelection) {
|
18844
18844
|
const result = new InternMap([], JSON.stringify);
|
18845
|
-
|
18846
|
-
|
18847
|
-
|
18848
|
-
|
18849
|
-
|
18845
|
+
if (stratifiedResult) {
|
18846
|
+
Array.from(stratifiedResult.keys()).forEach((cellSetKey) => {
|
18847
|
+
result.set(cellSetKey, new InternMap([], JSON.stringify));
|
18848
|
+
Array.from(stratifiedResult.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
18849
|
+
const values2 = stratifiedResult.get(cellSetKey).get(sampleSetKey).get(geneSelection[0]);
|
18850
|
+
result.get(cellSetKey).set(sampleSetKey, values2);
|
18851
|
+
});
|
18850
18852
|
});
|
18851
|
-
}
|
18853
|
+
}
|
18852
18854
|
return result;
|
18853
18855
|
}
|
18854
18856
|
const $b5e257d569688ac6$var$defaultContext = {
|
@@ -133126,16 +133128,16 @@ function addDecoder(cases2, importFn) {
|
|
133126
133128
|
}
|
133127
133129
|
cases2.forEach((c2) => registry$1.set(c2, importFn));
|
133128
133130
|
}
|
133129
|
-
addDecoder([void 0, 1], () => import("./raw-
|
133130
|
-
addDecoder(5, () => import("./lzw-
|
133131
|
+
addDecoder([void 0, 1], () => import("./raw-18214a1e.js").then((m2) => m2.default));
|
133132
|
+
addDecoder(5, () => import("./lzw-f9f89edb.js").then((m2) => m2.default));
|
133131
133133
|
addDecoder(6, () => {
|
133132
133134
|
throw new Error("old style JPEG compression is not supported.");
|
133133
133135
|
});
|
133134
|
-
addDecoder(7, () => import("./jpeg-
|
133135
|
-
addDecoder([8, 32946], () => import("./deflate-
|
133136
|
-
addDecoder(32773, () => import("./packbits-
|
133137
|
-
addDecoder(34887, () => import("./lerc-
|
133138
|
-
addDecoder(50001, () => import("./webimage-
|
133136
|
+
addDecoder(7, () => import("./jpeg-9d65dc0f.js").then((m2) => m2.default));
|
133137
|
+
addDecoder([8, 32946], () => import("./deflate-9b949812.js").then((m2) => m2.default));
|
133138
|
+
addDecoder(32773, () => import("./packbits-92275192.js").then((m2) => m2.default));
|
133139
|
+
addDecoder(34887, () => import("./lerc-5d951898.js").then((m2) => m2.default));
|
133140
|
+
addDecoder(50001, () => import("./webimage-6f128314.js").then((m2) => m2.default));
|
133139
133141
|
function decodeRowAcc(row, stride) {
|
133140
133142
|
let length2 = row.length - stride;
|
133141
133143
|
let offset5 = 0;
|
@@ -153684,12 +153686,12 @@ function summarize(iterable, keepZeros) {
|
|
153684
153686
|
}
|
153685
153687
|
function dotStratifiedExpressionData(stratifiedResult, posThreshold) {
|
153686
153688
|
const result = new InternMap([], JSON.stringify);
|
153687
|
-
|
153689
|
+
Array.from(stratifiedResult.keys()).forEach((cellSetKey) => {
|
153688
153690
|
result.set(cellSetKey, new InternMap([], JSON.stringify));
|
153689
|
-
|
153691
|
+
Array.from(stratifiedResult.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
153690
153692
|
result.get(cellSetKey).set(sampleSetKey, new InternMap([], JSON.stringify));
|
153691
153693
|
const allGenes = stratifiedResult.get(cellSetKey).get(sampleSetKey);
|
153692
|
-
|
153694
|
+
Array.from(allGenes.keys()).forEach((geneKey) => {
|
153693
153695
|
const values2 = allGenes.get(geneKey);
|
153694
153696
|
const exprMean = mean$1(values2);
|
153695
153697
|
const numPos = values2.reduce((acc, val) => val > posThreshold ? acc + 1 : acc, 0);
|
@@ -153706,9 +153708,9 @@ function dotStratifiedExpressionData(stratifiedResult, posThreshold) {
|
|
153706
153708
|
}
|
153707
153709
|
function summarizeStratifiedExpressionData(stratifiedResult, keepZeros) {
|
153708
153710
|
const summarizedResult = new InternMap([], JSON.stringify);
|
153709
|
-
|
153711
|
+
Array.from(stratifiedResult.keys()).forEach((cellSetKey) => {
|
153710
153712
|
summarizedResult.set(cellSetKey, new InternMap([], JSON.stringify));
|
153711
|
-
|
153713
|
+
Array.from(stratifiedResult.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
153712
153714
|
const values2 = stratifiedResult.get(cellSetKey).get(sampleSetKey);
|
153713
153715
|
const summary = summarize(values2, keepZeros);
|
153714
153716
|
summarizedResult.get(cellSetKey).set(sampleSetKey, summary);
|
@@ -153717,9 +153719,9 @@ function summarizeStratifiedExpressionData(stratifiedResult, keepZeros) {
|
|
153717
153719
|
return summarizedResult;
|
153718
153720
|
}
|
153719
153721
|
function histogramStratifiedExpressionData(summarizedResult, binCount, yMinProp) {
|
153720
|
-
const groupSummaries =
|
153722
|
+
const groupSummaries = Array.from(summarizedResult.keys()).map((cellSetKey) => ({
|
153721
153723
|
key: cellSetKey,
|
153722
|
-
value:
|
153724
|
+
value: Array.from(summarizedResult.get(cellSetKey).keys()).map((sampleSetKey) => ({
|
153723
153725
|
key: sampleSetKey,
|
153724
153726
|
value: summarizedResult.get(cellSetKey).get(sampleSetKey)
|
153725
153727
|
}))
|
@@ -206140,9 +206142,9 @@ function useExpressionSummaries(sampleEdges, sampleSets, sampleSetSelection, exp
|
|
206140
206142
|
JSON.stringify
|
206141
206143
|
);
|
206142
206144
|
const result = [];
|
206143
|
-
|
206144
|
-
|
206145
|
-
|
206145
|
+
Array.from(dotData.keys()).forEach((cellSetKey) => {
|
206146
|
+
Array.from(dotData.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
206147
|
+
Array.from(dotData.get(cellSetKey).get(sampleSetKey).keys()).forEach((geneKey) => {
|
206146
206148
|
const dotObj = dotData.get(cellSetKey).get(sampleSetKey).get(geneKey);
|
206147
206149
|
const featureName = geneKey;
|
206148
206150
|
result.push({
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-68f84e2a.js";
|
2
|
-
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-ff4d0660.js";
|
3
3
|
import "react";
|
4
4
|
import "@vitessce/vit-s";
|
5
5
|
import "react-dom";
|
@@ -36,9 +36,9 @@ export function useExpressionSummaries(sampleEdges, sampleSets, sampleSetSelecti
|
|
36
36
|
const cellSetToUuid = new InternMap(cellSetSelection?.map(sampleSet => ([sampleSet, uuidv4()])), JSON.stringify);
|
37
37
|
const sampleSetToUuid = new InternMap(sampleSetSelection?.map(sampleSet => ([sampleSet, uuidv4()])), JSON.stringify);
|
38
38
|
const result = [];
|
39
|
-
(
|
40
|
-
(
|
41
|
-
(
|
39
|
+
Array.from(dotData.keys()).forEach((cellSetKey) => {
|
40
|
+
Array.from(dotData.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
41
|
+
Array.from(dotData.get(cellSetKey).get(sampleSetKey).keys()).forEach((geneKey) => {
|
42
42
|
const dotObj = dotData.get(cellSetKey).get(sampleSetKey).get(geneKey);
|
43
43
|
const featureName = geneKey;
|
44
44
|
result.push({
|
package/dist-tsc/expr-hooks.js
CHANGED
@@ -45,12 +45,12 @@ function summarize(iterable, keepZeros) {
|
|
45
45
|
*/
|
46
46
|
export function dotStratifiedExpressionData(stratifiedResult, posThreshold) {
|
47
47
|
const result = new InternMap([], JSON.stringify);
|
48
|
-
(
|
48
|
+
Array.from(stratifiedResult.keys()).forEach((cellSetKey) => {
|
49
49
|
result.set(cellSetKey, new InternMap([], JSON.stringify));
|
50
|
-
(
|
50
|
+
Array.from(stratifiedResult.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
51
51
|
result.get(cellSetKey).set(sampleSetKey, new InternMap([], JSON.stringify));
|
52
52
|
const allGenes = stratifiedResult.get(cellSetKey).get(sampleSetKey);
|
53
|
-
(
|
53
|
+
Array.from(allGenes.keys()).forEach((geneKey) => {
|
54
54
|
const values = allGenes.get(geneKey);
|
55
55
|
const exprMean = d3_mean(values);
|
56
56
|
const numPos = values.reduce((acc, val) => (val > posThreshold ? acc + 1 : acc), 0);
|
@@ -74,9 +74,9 @@ export function dotStratifiedExpressionData(stratifiedResult, posThreshold) {
|
|
74
74
|
*/
|
75
75
|
export function summarizeStratifiedExpressionData(stratifiedResult, keepZeros) {
|
76
76
|
const summarizedResult = new InternMap([], JSON.stringify);
|
77
|
-
(
|
77
|
+
Array.from(stratifiedResult.keys()).forEach((cellSetKey) => {
|
78
78
|
summarizedResult.set(cellSetKey, new InternMap([], JSON.stringify));
|
79
|
-
(
|
79
|
+
Array.from(stratifiedResult.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
80
80
|
const values = stratifiedResult.get(cellSetKey).get(sampleSetKey);
|
81
81
|
const summary = summarize(values, keepZeros);
|
82
82
|
summarizedResult.get(cellSetKey).set(sampleSetKey, summary);
|
@@ -94,9 +94,9 @@ export function summarizeStratifiedExpressionData(stratifiedResult, keepZeros) {
|
|
94
94
|
* @returns
|
95
95
|
*/
|
96
96
|
export function histogramStratifiedExpressionData(summarizedResult, binCount, yMinProp) {
|
97
|
-
const groupSummaries = (
|
97
|
+
const groupSummaries = Array.from(summarizedResult.keys()).map(cellSetKey => ({
|
98
98
|
key: cellSetKey,
|
99
|
-
value: (
|
99
|
+
value: Array.from(summarizedResult.get(cellSetKey).keys()).map(sampleSetKey => ({
|
100
100
|
key: sampleSetKey,
|
101
101
|
value: summarizedResult.get(cellSetKey).get(sampleSetKey),
|
102
102
|
})),
|
@@ -73,8 +73,8 @@ describe('Utility functions for processing expression data for statistical plots
|
|
73
73
|
const [result] = stratifyExpressionData(sampleEdges, sampleSets, sampleSetSelection, expressionData, obsIndex, mergedCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient);
|
74
74
|
const aggregateData = aggregateStratifiedExpressionData(result, geneSelection);
|
75
75
|
const summaryResult = summarizeStratifiedExpressionData(aggregateData, true);
|
76
|
-
expect(
|
77
|
-
expect(
|
76
|
+
expect(Array.from(summaryResult.keys())).toEqual([['Cell type', 'T cell'], ['Cell type', 'B cell']]);
|
77
|
+
expect(Array.from(summaryResult.get(['Cell type', 'T cell']).keys())).toEqual([['Clinical groups', 'AKI'], ['Clinical groups', 'CKD']]);
|
78
78
|
expect(Object.keys(summaryResult.get(['Cell type', 'T cell']).get(['Clinical groups', 'AKI']))).toEqual([
|
79
79
|
'quartiles',
|
80
80
|
'range',
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitessce/statistical-plots",
|
3
|
-
"version": "3.4.
|
3
|
+
"version": "3.4.8",
|
4
4
|
"author": "Gehlenborg Lab",
|
5
5
|
"homepage": "http://vitessce.io",
|
6
6
|
"repository": {
|
@@ -28,12 +28,12 @@
|
|
28
28
|
"react-aria": "^3.28.0",
|
29
29
|
"internmap": "^2.0.3",
|
30
30
|
"uuid": "^9.0.0",
|
31
|
-
"@vitessce/constants-internal": "3.4.
|
32
|
-
"@vitessce/sets-utils": "3.4.
|
33
|
-
"@vitessce/utils": "3.4.
|
34
|
-
"@vitessce/vega": "3.4.
|
35
|
-
"@vitessce/vit-s": "3.4.
|
36
|
-
"@vitessce/gl": "3.4.
|
31
|
+
"@vitessce/constants-internal": "3.4.8",
|
32
|
+
"@vitessce/sets-utils": "3.4.8",
|
33
|
+
"@vitessce/utils": "3.4.8",
|
34
|
+
"@vitessce/vega": "3.4.8",
|
35
|
+
"@vitessce/vit-s": "3.4.8",
|
36
|
+
"@vitessce/gl": "3.4.8"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
39
|
"react": "^18.0.0",
|
package/src/dot-plot-hook.js
CHANGED
@@ -68,9 +68,9 @@ export function useExpressionSummaries(
|
|
68
68
|
);
|
69
69
|
|
70
70
|
const result = [];
|
71
|
-
(
|
72
|
-
(
|
73
|
-
(
|
71
|
+
Array.from(dotData.keys()).forEach((cellSetKey) => {
|
72
|
+
Array.from(dotData.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
73
|
+
Array.from(dotData.get(cellSetKey).get(sampleSetKey).keys()).forEach((geneKey) => {
|
74
74
|
const dotObj = dotData.get(cellSetKey).get(sampleSetKey).get(geneKey);
|
75
75
|
const featureName = geneKey;
|
76
76
|
result.push({
|
package/src/expr-hooks.js
CHANGED
@@ -57,14 +57,14 @@ export function dotStratifiedExpressionData(
|
|
57
57
|
stratifiedResult, posThreshold,
|
58
58
|
) {
|
59
59
|
const result = new InternMap([], JSON.stringify);
|
60
|
-
(
|
60
|
+
Array.from(stratifiedResult.keys()).forEach((cellSetKey) => {
|
61
61
|
result.set(cellSetKey, new InternMap([], JSON.stringify));
|
62
|
-
(
|
62
|
+
Array.from(stratifiedResult.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
63
63
|
result.get(cellSetKey).set(sampleSetKey, new InternMap([], JSON.stringify));
|
64
64
|
|
65
65
|
const allGenes = stratifiedResult.get(cellSetKey).get(sampleSetKey);
|
66
66
|
|
67
|
-
(
|
67
|
+
Array.from(allGenes.keys()).forEach((geneKey) => {
|
68
68
|
const values = allGenes.get(geneKey);
|
69
69
|
|
70
70
|
const exprMean = d3_mean(values);
|
@@ -95,9 +95,9 @@ export function summarizeStratifiedExpressionData(
|
|
95
95
|
) {
|
96
96
|
const summarizedResult = new InternMap([], JSON.stringify);
|
97
97
|
|
98
|
-
(
|
98
|
+
Array.from(stratifiedResult.keys()).forEach((cellSetKey) => {
|
99
99
|
summarizedResult.set(cellSetKey, new InternMap([], JSON.stringify));
|
100
|
-
(
|
100
|
+
Array.from(stratifiedResult.get(cellSetKey).keys()).forEach((sampleSetKey) => {
|
101
101
|
const values = stratifiedResult.get(cellSetKey).get(sampleSetKey);
|
102
102
|
const summary = summarize(values, keepZeros);
|
103
103
|
summarizedResult.get(cellSetKey).set(sampleSetKey, summary);
|
@@ -119,9 +119,9 @@ export function summarizeStratifiedExpressionData(
|
|
119
119
|
export function histogramStratifiedExpressionData(
|
120
120
|
summarizedResult, binCount, yMinProp,
|
121
121
|
) {
|
122
|
-
const groupSummaries = (
|
122
|
+
const groupSummaries = Array.from(summarizedResult.keys()).map(cellSetKey => ({
|
123
123
|
key: cellSetKey,
|
124
|
-
value: (
|
124
|
+
value: Array.from(summarizedResult.get(cellSetKey).keys()).map(sampleSetKey => ({
|
125
125
|
key: sampleSetKey,
|
126
126
|
value: summarizedResult.get(cellSetKey).get(sampleSetKey),
|
127
127
|
})),
|
package/src/expr-hooks.test.js
CHANGED
@@ -90,8 +90,8 @@ describe('Utility functions for processing expression data for statistical plots
|
|
90
90
|
);
|
91
91
|
const summaryResult = summarizeStratifiedExpressionData(aggregateData, true);
|
92
92
|
|
93
|
-
expect(
|
94
|
-
expect(
|
93
|
+
expect(Array.from(summaryResult.keys())).toEqual([['Cell type', 'T cell'], ['Cell type', 'B cell']]);
|
94
|
+
expect(Array.from(summaryResult.get(['Cell type', 'T cell']).keys())).toEqual([['Clinical groups', 'AKI'], ['Clinical groups', 'CKD']]);
|
95
95
|
expect(Object.keys(summaryResult.get(['Cell type', 'T cell']).get(['Clinical groups', 'AKI']))).toEqual([
|
96
96
|
'quartiles',
|
97
97
|
'range',
|