@vitessce/statistical-plots 4.0.0 → 4.0.2
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-DW1iET8g.js → deflate-DN9irvtS.js} +1 -1
- package/dist/{index-DKGZofDL.js → index-DKWiD0_-.js} +69 -12
- package/dist/index.js +1 -1
- package/dist/{jpeg-BcFUc49m.js → jpeg-DA0bMpPw.js} +1 -1
- package/dist/{lerc-DvHuJtok.js → lerc-PCO9t4ZR.js} +1 -1
- package/dist/{lzw-BXBJRSoa.js → lzw-DQkfb7of.js} +1 -1
- package/dist/{packbits-C5DpT4rK.js → packbits-CuaN4bB2.js} +1 -1
- package/dist/{raw-B-zQvZxn.js → raw-CCURUeAu.js} +1 -1
- package/dist/{webimage-B3lyoOmq.js → webimage-CUTBnRFx.js} +1 -1
- package/dist-tsc/VolcanoPlot.d.ts.map +1 -1
- package/dist-tsc/VolcanoPlot.js +9 -2
- package/dist-tsc/VolcanoPlot.js.map +1 -1
- package/dist-tsc/utils.js +2 -2
- package/package.json +8 -8
- package/src/VolcanoPlot.js +10 -2
- package/src/utils.js +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as inflate_1 } from "./pako.esm-SxljTded.js";
|
|
2
|
-
import { B as BaseDecoder } from "./index-
|
|
2
|
+
import { B as BaseDecoder } from "./index-DKWiD0_-.js";
|
|
3
3
|
class DeflateDecoder extends BaseDecoder {
|
|
4
4
|
decodeBlock(buffer) {
|
|
5
5
|
return inflate_1(new Uint8Array(buffer)).buffer;
|
|
@@ -357,6 +357,7 @@ const CoordinationType$1 = {
|
|
|
357
357
|
SPATIAL_CHANNEL_LABELS_VISIBLE: "spatialChannelLabelsVisible",
|
|
358
358
|
SPATIAL_CHANNEL_LABELS_ORIENTATION: "spatialChannelLabelsOrientation",
|
|
359
359
|
SPATIAL_CHANNEL_LABEL_SIZE: "spatialChannelLabelSize",
|
|
360
|
+
SPATIAL_CHANNELS_SORT_ORDER: "spatialChannelsSortOrder",
|
|
360
361
|
// Multi-sample / comparative
|
|
361
362
|
SAMPLE_TYPE: "sampleType",
|
|
362
363
|
SAMPLE_SELECTION: "sampleSelection",
|
|
@@ -942,6 +943,7 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
942
943
|
CoordinationType$1.SPATIAL_CHANNEL_LABELS_VISIBLE,
|
|
943
944
|
CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION,
|
|
944
945
|
CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE,
|
|
946
|
+
CoordinationType$1.SPATIAL_CHANNELS_SORT_ORDER,
|
|
945
947
|
CoordinationType$1.PHOTOMETRIC_INTERPRETATION
|
|
946
948
|
],
|
|
947
949
|
[ViewType$1.HEATMAP]: [
|
|
@@ -1123,7 +1125,8 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
1123
1125
|
CoordinationType$1.LEGEND_VISIBLE,
|
|
1124
1126
|
CoordinationType$1.SPATIAL_CHANNEL_LABELS_VISIBLE,
|
|
1125
1127
|
CoordinationType$1.SPATIAL_CHANNEL_LABELS_ORIENTATION,
|
|
1126
|
-
CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE
|
|
1128
|
+
CoordinationType$1.SPATIAL_CHANNEL_LABEL_SIZE,
|
|
1129
|
+
CoordinationType$1.SPATIAL_CHANNELS_SORT_ORDER
|
|
1127
1130
|
],
|
|
1128
1131
|
[ViewType$1.GENOMIC_PROFILES]: [
|
|
1129
1132
|
CoordinationType$1.DATASET,
|
|
@@ -11591,7 +11594,18 @@ z.object({
|
|
|
11591
11594
|
z.object({
|
|
11592
11595
|
projectionAnnotationSpacing: z.number(),
|
|
11593
11596
|
featureIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing feature IDs. For example, specify 'gene' to use prop_gene() in the Neuroglancer shader code."),
|
|
11594
|
-
pointIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing point IDs. For example, specify 'point_id' to use prop_point_id() in the Neuroglancer shader code.")
|
|
11597
|
+
pointIndexProp: z.string().optional().describe("The name of the Neuroglancer AnnotationProperty containing point IDs. For example, specify 'point_id' to use prop_point_id() in the Neuroglancer shader code."),
|
|
11598
|
+
transform: z.object({
|
|
11599
|
+
matrix: z.array(z.array(z.number())),
|
|
11600
|
+
outputDimensions: z.record(z.tuple([z.number(), z.string()]))
|
|
11601
|
+
}).optional().describe("A coordinate transformation matrix to apply to the annotation layer source to map annotation coordinates to the global coordinate space."),
|
|
11602
|
+
// Note: See comments in neuroglancer-sorger.js
|
|
11603
|
+
// We may remove these in the future, pending clarification
|
|
11604
|
+
// to questions in the tissue-map-tools repo
|
|
11605
|
+
// - https://github.com/hms-dbmi/tissue-map-tools/issues/20
|
|
11606
|
+
// - https://github.com/hms-dbmi/tissue-map-tools/issues/38
|
|
11607
|
+
quantitativeColorProp: z.string().optional(),
|
|
11608
|
+
quantitativeColorMax: z.number().optional()
|
|
11595
11609
|
}).partial().nullable();
|
|
11596
11610
|
z.object({
|
|
11597
11611
|
obsIndex: z.string(),
|
|
@@ -18166,6 +18180,37 @@ function keyof(value2) {
|
|
|
18166
18180
|
return value2 !== null && typeof value2 === "object" ? value2.valueOf() : value2;
|
|
18167
18181
|
}
|
|
18168
18182
|
const schemeRdBu = [[103, 0, 31], [178, 24, 43], [214, 96, 77], [244, 165, 130], [253, 219, 199], [247, 247, 247], [209, 229, 240], [146, 197, 222], [67, 147, 195], [33, 102, 172], [5, 48, 97]];
|
|
18183
|
+
const schemePlasma = [[13, 8, 135], [16, 7, 136], [19, 7, 137], [22, 7, 138], [25, 6, 140], [27, 6, 141], [29, 6, 142], [32, 6, 143], [34, 6, 144], [36, 6, 145], [38, 5, 145], [40, 5, 146], [42, 5, 147], [44, 5, 148], [46, 5, 149], [47, 5, 150], [49, 5, 151], [51, 5, 151], [53, 4, 152], [55, 4, 153], [56, 4, 154], [58, 4, 154], [60, 4, 155], [62, 4, 156], [63, 4, 156], [65, 4, 157], [67, 3, 158], [68, 3, 158], [70, 3, 159], [72, 3, 159], [73, 3, 160], [75, 3, 161], [76, 2, 161], [78, 2, 162], [80, 2, 162], [81, 2, 163], [83, 2, 163], [85, 2, 164], [86, 1, 164], [88, 1, 164], [89, 1, 165], [91, 1, 165], [92, 1, 166], [94, 1, 166], [96, 1, 166], [97, 0, 167], [99, 0, 167], [100, 0, 167], [102, 0, 167], [103, 0, 168], [105, 0, 168], [106, 0, 168], [108, 0, 168], [110, 0, 168], [111, 0, 168], [113, 0, 168], [114, 1, 168], [116, 1, 168], [117, 1, 168], [119, 1, 168], [120, 1, 168], [122, 2, 168], [123, 2, 168], [125, 3, 168], [126, 3, 168], [128, 4, 168], [129, 4, 167], [131, 5, 167], [132, 5, 167], [134, 6, 166], [135, 7, 166], [136, 8, 166], [138, 9, 165], [139, 10, 165], [141, 11, 165], [142, 12, 164], [143, 13, 164], [145, 14, 163], [146, 15, 163], [148, 16, 162], [149, 17, 161], [150, 19, 161], [152, 20, 160], [153, 21, 159], [154, 22, 159], [156, 23, 158], [157, 24, 157], [158, 25, 157], [160, 26, 156], [161, 27, 155], [162, 29, 154], [163, 30, 154], [165, 31, 153], [166, 32, 152], [167, 33, 151], [168, 34, 150], [170, 35, 149], [171, 36, 148], [172, 38, 148], [173, 39, 147], [174, 40, 146], [176, 41, 145], [177, 42, 144], [178, 43, 143], [179, 44, 142], [180, 46, 141], [181, 47, 140], [182, 48, 139], [183, 49, 138], [184, 50, 137], [186, 51, 136], [187, 52, 136], [188, 53, 135], [189, 55, 134], [190, 56, 133], [191, 57, 132], [192, 58, 131], [193, 59, 130], [194, 60, 129], [195, 61, 128], [196, 62, 127], [197, 64, 126], [198, 65, 125], [199, 66, 124], [200, 67, 123], [201, 68, 122], [202, 69, 122], [203, 70, 121], [204, 71, 120], [204, 73, 119], [205, 74, 118], [206, 75, 117], [207, 76, 116], [208, 77, 115], [209, 78, 114], [210, 79, 113], [211, 81, 113], [212, 82, 112], [213, 83, 111], [213, 84, 110], [214, 85, 109], [215, 86, 108], [216, 87, 107], [217, 88, 106], [218, 90, 106], [218, 91, 105], [219, 92, 104], [220, 93, 103], [221, 94, 102], [222, 95, 101], [222, 97, 100], [223, 98, 99], [224, 99, 99], [225, 100, 98], [226, 101, 97], [226, 102, 96], [227, 104, 95], [228, 105, 94], [229, 106, 93], [229, 107, 93], [230, 108, 92], [231, 110, 91], [231, 111, 90], [232, 112, 89], [233, 113, 88], [233, 114, 87], [234, 116, 87], [235, 117, 86], [235, 118, 85], [236, 119, 84], [237, 121, 83], [237, 122, 82], [238, 123, 81], [239, 124, 81], [239, 126, 80], [240, 127, 79], [240, 128, 78], [241, 129, 77], [241, 131, 76], [242, 132, 75], [243, 133, 75], [243, 135, 74], [244, 136, 73], [244, 137, 72], [245, 139, 71], [245, 140, 70], [246, 141, 69], [246, 143, 68], [247, 144, 68], [247, 145, 67], [247, 147, 66], [248, 148, 65], [248, 149, 64], [249, 151, 63], [249, 152, 62], [249, 154, 62], [250, 155, 61], [250, 156, 60], [250, 158, 59], [251, 159, 58], [251, 161, 57], [251, 162, 56], [252, 163, 56], [252, 165, 55], [252, 166, 54], [252, 168, 53], [252, 169, 52], [253, 171, 51], [253, 172, 51], [253, 174, 50], [253, 175, 49], [253, 177, 48], [253, 178, 47], [253, 180, 47], [253, 181, 46], [254, 183, 45], [254, 184, 44], [254, 186, 44], [254, 187, 43], [254, 189, 42], [254, 190, 42], [254, 192, 41], [253, 194, 41], [253, 195, 40], [253, 197, 39], [253, 198, 39], [253, 200, 39], [253, 202, 38], [253, 203, 38], [252, 205, 37], [252, 206, 37], [252, 208, 37], [252, 210, 37], [251, 211, 36], [251, 213, 36], [251, 215, 36], [250, 216, 36], [250, 218, 36], [249, 220, 36], [249, 221, 37], [248, 223, 37], [248, 225, 37], [247, 226, 37], [247, 228, 37], [246, 230, 38], [246, 232, 38], [245, 233, 38], [245, 235, 39], [244, 237, 39], [243, 238, 39], [243, 240, 39], [242, 242, 39], [241, 244, 38], [241, 245, 37], [240, 247, 36], [240, 249, 33]];
|
|
18184
|
+
const schemeViridis = [[68, 1, 84], [68, 2, 86], [69, 4, 87], [69, 5, 89], [70, 7, 90], [70, 8, 92], [70, 10, 93], [70, 11, 94], [71, 13, 96], [71, 14, 97], [71, 16, 99], [71, 17, 100], [71, 19, 101], [72, 20, 103], [72, 22, 104], [72, 23, 105], [72, 24, 106], [72, 26, 108], [72, 27, 109], [72, 28, 110], [72, 30, 111], [72, 31, 112], [72, 32, 113], [72, 34, 115], [72, 35, 116], [72, 36, 117], [72, 38, 118], [72, 39, 119], [72, 40, 120], [72, 42, 121], [72, 43, 122], [72, 44, 123], [72, 46, 124], [72, 47, 125], [72, 48, 126], [72, 50, 127], [72, 51, 128], [72, 52, 129], [72, 53, 130], [72, 55, 131], [72, 56, 132], [72, 57, 133], [72, 59, 134], [72, 60, 135], [72, 61, 136], [72, 63, 137], [72, 64, 137], [72, 65, 138], [72, 67, 139], [72, 68, 140], [72, 69, 141], [72, 71, 142], [72, 72, 143], [72, 73, 144], [72, 75, 145], [72, 76, 146], [72, 77, 147], [72, 79, 148], [72, 80, 149], [72, 82, 150], [72, 83, 150], [72, 84, 151], [72, 86, 152], [72, 87, 153], [72, 88, 154], [72, 90, 155], [71, 91, 156], [71, 92, 157], [71, 94, 158], [71, 95, 158], [71, 97, 159], [71, 98, 160], [71, 99, 161], [71, 101, 162], [71, 102, 163], [71, 103, 164], [71, 105, 164], [71, 106, 165], [71, 108, 166], [71, 109, 167], [71, 110, 168], [71, 112, 169], [71, 113, 169], [71, 114, 170], [71, 116, 171], [71, 117, 172], [70, 119, 173], [70, 120, 174], [70, 121, 174], [70, 123, 175], [70, 124, 176], [70, 125, 177], [70, 127, 178], [70, 128, 178], [70, 130, 179], [70, 131, 180], [70, 132, 181], [70, 134, 182], [70, 135, 182], [70, 136, 183], [70, 138, 184], [70, 139, 185], [70, 141, 186], [70, 142, 186], [70, 143, 187], [70, 145, 188], [70, 146, 189], [70, 148, 189], [70, 149, 190], [70, 150, 191], [70, 152, 192], [70, 153, 192], [70, 155, 193], [70, 156, 194], [70, 157, 195], [70, 159, 195], [70, 160, 196], [70, 162, 197], [70, 163, 198], [70, 164, 198], [70, 166, 199], [70, 167, 200], [71, 169, 200], [71, 170, 201], [71, 171, 202], [71, 173, 203], [71, 174, 203], [71, 176, 204], [71, 177, 205], [71, 178, 205], [72, 180, 206], [72, 181, 207], [72, 183, 207], [72, 184, 208], [73, 185, 209], [73, 187, 209], [73, 188, 210], [74, 190, 211], [74, 191, 211], [74, 192, 212], [75, 194, 213], [75, 195, 213], [76, 197, 214], [76, 198, 214], [77, 199, 215], [77, 201, 216], [78, 202, 216], [78, 204, 217], [79, 205, 217], [79, 207, 218], [80, 208, 218], [81, 209, 219], [81, 211, 220], [82, 212, 220], [83, 214, 221], [83, 215, 221], [84, 216, 222], [85, 218, 222], [85, 219, 223], [86, 221, 223], [87, 222, 224], [88, 224, 224], [88, 225, 225], [89, 226, 225], [90, 228, 226], [91, 229, 226], [92, 231, 227], [92, 232, 227], [93, 234, 228], [94, 235, 228], [95, 236, 229], [96, 238, 229], [97, 239, 230], [97, 241, 230], [98, 242, 231], [99, 244, 231], [100, 245, 232], [101, 246, 232], [102, 248, 233], [103, 249, 233], [104, 251, 234], [105, 252, 234]];
|
|
18185
|
+
const schemeJet = Array.from({ length: 256 }, (_, i2) => {
|
|
18186
|
+
const t4 = i2 / 255;
|
|
18187
|
+
let r3;
|
|
18188
|
+
let g2;
|
|
18189
|
+
let b2;
|
|
18190
|
+
if (t4 < 0.125) {
|
|
18191
|
+
r3 = 0;
|
|
18192
|
+
g2 = 0;
|
|
18193
|
+
b2 = 0.5 + t4 * 4;
|
|
18194
|
+
} else if (t4 < 0.375) {
|
|
18195
|
+
r3 = 0;
|
|
18196
|
+
g2 = (t4 - 0.125) * 4;
|
|
18197
|
+
b2 = 1;
|
|
18198
|
+
} else if (t4 < 0.625) {
|
|
18199
|
+
r3 = (t4 - 0.375) * 4;
|
|
18200
|
+
g2 = 1;
|
|
18201
|
+
b2 = 1 - (t4 - 0.375) * 4;
|
|
18202
|
+
} else if (t4 < 0.875) {
|
|
18203
|
+
r3 = 1;
|
|
18204
|
+
g2 = 1 - (t4 - 0.625) * 4;
|
|
18205
|
+
b2 = 0;
|
|
18206
|
+
} else {
|
|
18207
|
+
r3 = 1 - (t4 - 0.875) * 4;
|
|
18208
|
+
g2 = 0;
|
|
18209
|
+
b2 = 0;
|
|
18210
|
+
}
|
|
18211
|
+
return [Math.round(r3 * 255), Math.round(g2 * 255), Math.round(b2 * 255)];
|
|
18212
|
+
});
|
|
18213
|
+
const schemeGreys = Array.from({ length: 256 }, (_, i2) => [i2, i2, i2]);
|
|
18169
18214
|
function rgbSpline$1(spline) {
|
|
18170
18215
|
return (colors2) => {
|
|
18171
18216
|
const n2 = colors2.length;
|
|
@@ -18203,7 +18248,15 @@ function basis$2(values2) {
|
|
|
18203
18248
|
};
|
|
18204
18249
|
}
|
|
18205
18250
|
const interpolateRgbBasis = rgbSpline$1(basis$2);
|
|
18251
|
+
function interpolateSequentialMulti(range2) {
|
|
18252
|
+
const n2 = range2.length;
|
|
18253
|
+
return (t4) => range2[Math.max(0, Math.min(n2 - 1, Math.floor(t4 * n2)))];
|
|
18254
|
+
}
|
|
18206
18255
|
interpolateRgbBasis(schemeRdBu);
|
|
18256
|
+
interpolateSequentialMulti(schemePlasma);
|
|
18257
|
+
interpolateSequentialMulti(schemeViridis);
|
|
18258
|
+
interpolateSequentialMulti(schemeJet);
|
|
18259
|
+
interpolateSequentialMulti(schemeGreys);
|
|
18207
18260
|
function stratifyExpressionData(sampleEdges, sampleSets, sampleSetSelection, expressionData, obsIndex, mergedCellSets, geneSelection, cellSetSelection, cellSetColor, featureValueTransform, featureValueTransformCoefficient) {
|
|
18208
18261
|
const result = new InternMap2([], JSON.stringify);
|
|
18209
18262
|
const hasSampleSetSelection = Array.isArray(sampleSetSelection) && sampleSetSelection.length > 0;
|
|
@@ -178658,22 +178711,22 @@ function addDecoder(cases2, importFn) {
|
|
|
178658
178711
|
}
|
|
178659
178712
|
cases2.forEach((c2) => registry$1.set(c2, importFn));
|
|
178660
178713
|
}
|
|
178661
|
-
addDecoder([void 0, 1], () => import("./raw-
|
|
178662
|
-
addDecoder(5, () => import("./lzw-
|
|
178714
|
+
addDecoder([void 0, 1], () => import("./raw-CCURUeAu.js").then((m2) => m2.default));
|
|
178715
|
+
addDecoder(5, () => import("./lzw-DQkfb7of.js").then((m2) => m2.default));
|
|
178663
178716
|
addDecoder(6, () => {
|
|
178664
178717
|
throw new Error("old style JPEG compression is not supported.");
|
|
178665
178718
|
});
|
|
178666
|
-
addDecoder(7, () => import("./jpeg-
|
|
178667
|
-
addDecoder([8, 32946], () => import("./deflate-
|
|
178668
|
-
addDecoder(32773, () => import("./packbits-
|
|
178719
|
+
addDecoder(7, () => import("./jpeg-DA0bMpPw.js").then((m2) => m2.default));
|
|
178720
|
+
addDecoder([8, 32946], () => import("./deflate-DN9irvtS.js").then((m2) => m2.default));
|
|
178721
|
+
addDecoder(32773, () => import("./packbits-CuaN4bB2.js").then((m2) => m2.default));
|
|
178669
178722
|
addDecoder(
|
|
178670
178723
|
34887,
|
|
178671
|
-
() => import("./lerc-
|
|
178724
|
+
() => import("./lerc-PCO9t4ZR.js").then(async (m2) => {
|
|
178672
178725
|
await m2.zstd.init();
|
|
178673
178726
|
return m2;
|
|
178674
178727
|
}).then((m2) => m2.default)
|
|
178675
178728
|
);
|
|
178676
|
-
addDecoder(50001, () => import("./webimage-
|
|
178729
|
+
addDecoder(50001, () => import("./webimage-CUTBnRFx.js").then((m2) => m2.default));
|
|
178677
178730
|
function decodeRowAcc(row, stride) {
|
|
178678
178731
|
let length2 = row.length - stride;
|
|
178679
178732
|
let offset2 = 0;
|
|
@@ -197818,7 +197871,7 @@ function useFilteredVolcanoData(props) {
|
|
|
197818
197871
|
const rawSampleSetPathB = coordinationValues.sampleSetFilter[1];
|
|
197819
197872
|
const sampleSetPathB = [...rawSampleSetPathB];
|
|
197820
197873
|
sampleSetPathB[0] = sampleSetsColumnNameMappingReversed[rawSampleSetPathB[0]];
|
|
197821
|
-
if (isEqual$3(sampleSetPathA, sampleSetSelection[
|
|
197874
|
+
if (isEqual$3(sampleSetPathA, sampleSetSelection[0]) && isEqual$3(sampleSetPathB, sampleSetSelection[1])) {
|
|
197822
197875
|
shouldSwapFoldChangeDirection = true;
|
|
197823
197876
|
}
|
|
197824
197877
|
}
|
|
@@ -250744,6 +250797,10 @@ function TreemapSubscriber(props) {
|
|
|
250744
250797
|
/* @__PURE__ */ React__default.createElement("div", { style: { position: "absolute", right: "2px", bottom: "2px", fontSize: "10px" } }, unselectedObsCount > 0 ? /* @__PURE__ */ React__default.createElement("span", null, `${commaNumber(unselectedObsCount)} ${pluralize(obsType, unselectedObsCount)} from ${commaNumber(unselectedSampleCount)} ${pluralize(sampleType, unselectedSampleCount)} currently omitted`) : null)
|
|
250745
250798
|
);
|
|
250746
250799
|
}
|
|
250800
|
+
const GOLDEN_RATIO = 0.6180339887498948;
|
|
250801
|
+
function topJitter(index2, rangePixels) {
|
|
250802
|
+
return index2 * GOLDEN_RATIO % 1 * rangePixels;
|
|
250803
|
+
}
|
|
250747
250804
|
function VolcanoPlot(props) {
|
|
250748
250805
|
const {
|
|
250749
250806
|
theme,
|
|
@@ -250833,10 +250890,10 @@ function VolcanoPlot(props) {
|
|
|
250833
250890
|
const obsSetPath = [...rawObsSetPath];
|
|
250834
250891
|
obsSetPath[0] = obsSetsColumnNameMappingReversed[rawObsSetPath[0]];
|
|
250835
250892
|
const color2 = obsSetColorScale(obsSetPath);
|
|
250836
|
-
obsSetG.append("g").selectAll("circle").data(filteredDf).join("circle").attr("cx", (d) => xScale(d.logFoldChange)).attr("cy", (d) => yScale(d.minusLog10p)).attr("r", 3).attr("opacity", 0.5).attr("fill", color2).on("click", (event2, d) => {
|
|
250893
|
+
obsSetG.append("g").selectAll("circle").data(filteredDf).join("circle").attr("cx", (d) => xScale(d.logFoldChange)).attr("cy", (d, i2) => yScale(d.minusLog10p) + (!Number.isFinite(d.minusLog10p) ? topJitter(i2, 20) : 0)).attr("r", 3).attr("opacity", 0.5).attr("fill", color2).on("click", (event2, d) => {
|
|
250837
250894
|
onFeatureClick(d.featureId);
|
|
250838
250895
|
});
|
|
250839
|
-
const textElements = obsSetG.append("g").selectAll("text").data(filteredDf).join("text").text((d) => d.featureId).attr("text-anchor", (d) => d.logFoldChange < 0 ? "end" : "start").attr("x", (d) => xScale(d.logFoldChange)).attr("y", (d) => yScale(d.minusLog10p)).style("display", (d) => Math.abs(d.logFoldChange) < (featureLabelFoldChangeThreshold ?? 5) || d.featureSignificance >= (featureLabelSignificanceThreshold ?? 0.01) ? "none" : void 0).attr("fill", color2).on("click", (event2, d) => {
|
|
250896
|
+
const textElements = obsSetG.append("g").selectAll("text").data(filteredDf).join("text").text((d) => d.featureId).attr("text-anchor", (d) => d.logFoldChange < 0 ? "end" : "start").attr("x", (d) => xScale(d.logFoldChange)).attr("y", (d, i2) => yScale(d.minusLog10p) + (!Number.isFinite(d.minusLog10p) ? topJitter(i2, 20) : 0)).style("display", (d) => Math.abs(d.logFoldChange) < (featureLabelFoldChangeThreshold ?? 5) || d.featureSignificance >= (featureLabelSignificanceThreshold ?? 0.01) ? "none" : void 0).attr("fill", color2).on("click", (event2, d) => {
|
|
250840
250897
|
onFeatureClick(d.featureId);
|
|
250841
250898
|
});
|
|
250842
250899
|
textElements.append("title").text((d) => `${featureType}: ${d.featureId}
|
package/dist/index.js
CHANGED
|
@@ -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-
|
|
2
|
+
import { g as getDefaultExportFromCjs, B as BaseDecoder } from "./index-DKWiD0_-.js";
|
|
3
3
|
const LercParameters = {
|
|
4
4
|
AddCompression: 1
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolcanoPlot.d.ts","sourceRoot":"","sources":["../src/VolcanoPlot.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VolcanoPlot.d.ts","sourceRoot":"","sources":["../src/VolcanoPlot.js"],"names":[],"mappings":"AAmBA,qDAgQC"}
|
package/dist-tsc/VolcanoPlot.js
CHANGED
|
@@ -9,6 +9,13 @@ import { select } from 'd3-selection';
|
|
|
9
9
|
import { capitalize, getDefaultForegroundColor } from '@vitessce/utils';
|
|
10
10
|
import { colorArrayToString } from '@vitessce/sets-utils';
|
|
11
11
|
import { getColorScale, useFilteredVolcanoData } from './utils.js';
|
|
12
|
+
// Deterministic jitter for points clamped at the top of the y-axis.
|
|
13
|
+
// Uses the golden-ratio sequence (index * φ mod 1) which is optimally
|
|
14
|
+
// equidistributed — no clustering regardless of how many points there are.
|
|
15
|
+
const GOLDEN_RATIO = 0.6180339887498948;
|
|
16
|
+
function topJitter(index, rangePixels) {
|
|
17
|
+
return ((index * GOLDEN_RATIO) % 1) * rangePixels;
|
|
18
|
+
}
|
|
12
19
|
export default function VolcanoPlot(props) {
|
|
13
20
|
const { theme, width, height, obsType, featureType, obsSetsColumnNameMappingReversed, sampleSetsColumnNameMappingReversed, sampleSetSelection, obsSetSelection, obsSetColor, sampleSetColor, data, marginTop = 5, marginRight = 5, marginLeft = 50, marginBottom = 50, onFeatureClick, featurePointSignificanceThreshold, featurePointFoldChangeThreshold, featureLabelSignificanceThreshold, featureLabelFoldChangeThreshold, } = props;
|
|
14
21
|
const svgRef = useRef();
|
|
@@ -157,7 +164,7 @@ export default function VolcanoPlot(props) {
|
|
|
157
164
|
.data(filteredDf)
|
|
158
165
|
.join('circle')
|
|
159
166
|
.attr('cx', d => xScale(d.logFoldChange))
|
|
160
|
-
.attr('cy', d => yScale(d.minusLog10p))
|
|
167
|
+
.attr('cy', (d, i) => yScale(d.minusLog10p) + (!Number.isFinite(d.minusLog10p) ? topJitter(i, 20) : 0))
|
|
161
168
|
.attr('r', 3)
|
|
162
169
|
.attr('opacity', 0.5)
|
|
163
170
|
.attr('fill', color)
|
|
@@ -171,7 +178,7 @@ export default function VolcanoPlot(props) {
|
|
|
171
178
|
.text(d => d.featureId)
|
|
172
179
|
.attr('text-anchor', d => (d.logFoldChange < 0 ? 'end' : 'start'))
|
|
173
180
|
.attr('x', d => xScale(d.logFoldChange))
|
|
174
|
-
.attr('y', d => yScale(d.minusLog10p))
|
|
181
|
+
.attr('y', (d, i) => yScale(d.minusLog10p) + (!Number.isFinite(d.minusLog10p) ? topJitter(i, 20) : 0))
|
|
175
182
|
.style('display', d => ((Math.abs(d.logFoldChange) < (featureLabelFoldChangeThreshold ?? 5.0)
|
|
176
183
|
|| (d.featureSignificance >= (featureLabelSignificanceThreshold ?? 0.01))) ? 'none' : undefined))
|
|
177
184
|
.attr('fill', color)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VolcanoPlot.js","sourceRoot":"","sources":["../src/VolcanoPlot.js"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,8BAA8B;AAC9B,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK;IACvC,MAAM,EACJ,KAAK,EACL,KAAK,EACL,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AE,CAAC;YACP,KAAK,EAAE,GAAG,KAAK,IAAI;YACnB,MAAM,EAAE,GAAG,MAAM,IAAI;YACrB,QAAQ,EAAE,UAAU;SACrB,GACD,CACH,CAAC;AACJ,CAAC"}
|
package/dist-tsc/utils.js
CHANGED
|
@@ -63,8 +63,8 @@ export function useFilteredVolcanoData(props) {
|
|
|
63
63
|
const rawSampleSetPathB = coordinationValues.sampleSetFilter[1];
|
|
64
64
|
const sampleSetPathB = [...rawSampleSetPathB];
|
|
65
65
|
sampleSetPathB[0] = sampleSetsColumnNameMappingReversed[rawSampleSetPathB[0]];
|
|
66
|
-
if (isEqual(sampleSetPathA, sampleSetSelection[
|
|
67
|
-
&& isEqual(sampleSetPathB, sampleSetSelection[
|
|
66
|
+
if (isEqual(sampleSetPathA, sampleSetSelection[0])
|
|
67
|
+
&& isEqual(sampleSetPathB, sampleSetSelection[1])) {
|
|
68
68
|
shouldSwapFoldChangeDirection = true;
|
|
69
69
|
}
|
|
70
70
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitessce/statistical-plots",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
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.47.0",
|
|
29
29
|
"internmap": "^2.0.3",
|
|
30
30
|
"uuid": "^9.0.0",
|
|
31
|
-
"@vitessce/
|
|
32
|
-
"@vitessce/
|
|
33
|
-
"@vitessce/
|
|
34
|
-
"@vitessce/
|
|
35
|
-
"@vitessce/
|
|
36
|
-
"@vitessce/
|
|
37
|
-
"@vitessce/
|
|
31
|
+
"@vitessce/constants-internal": "4.0.2",
|
|
32
|
+
"@vitessce/styles": "4.0.2",
|
|
33
|
+
"@vitessce/vega": "4.0.2",
|
|
34
|
+
"@vitessce/sets-utils": "4.0.2",
|
|
35
|
+
"@vitessce/vit-s": "4.0.2",
|
|
36
|
+
"@vitessce/gl": "4.0.2",
|
|
37
|
+
"@vitessce/utils": "4.0.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"react": "19.2.6",
|
package/src/VolcanoPlot.js
CHANGED
|
@@ -9,6 +9,14 @@ import { capitalize, getDefaultForegroundColor } from '@vitessce/utils';
|
|
|
9
9
|
import { colorArrayToString } from '@vitessce/sets-utils';
|
|
10
10
|
import { getColorScale, useFilteredVolcanoData } from './utils.js';
|
|
11
11
|
|
|
12
|
+
// Deterministic jitter for points clamped at the top of the y-axis.
|
|
13
|
+
// Uses the golden-ratio sequence (index * φ mod 1) which is optimally
|
|
14
|
+
// equidistributed — no clustering regardless of how many points there are.
|
|
15
|
+
const GOLDEN_RATIO = 0.6180339887498948;
|
|
16
|
+
function topJitter(index, rangePixels) {
|
|
17
|
+
return ((index * GOLDEN_RATIO) % 1) * rangePixels;
|
|
18
|
+
}
|
|
19
|
+
|
|
12
20
|
export default function VolcanoPlot(props) {
|
|
13
21
|
const {
|
|
14
22
|
theme,
|
|
@@ -215,7 +223,7 @@ export default function VolcanoPlot(props) {
|
|
|
215
223
|
.data(filteredDf)
|
|
216
224
|
.join('circle')
|
|
217
225
|
.attr('cx', d => xScale(d.logFoldChange))
|
|
218
|
-
.attr('cy', d => yScale(d.minusLog10p))
|
|
226
|
+
.attr('cy', (d, i) => yScale(d.minusLog10p) + (!Number.isFinite(d.minusLog10p) ? topJitter(i, 20) : 0))
|
|
219
227
|
.attr('r', 3)
|
|
220
228
|
.attr('opacity', 0.5)
|
|
221
229
|
.attr('fill', color)
|
|
@@ -230,7 +238,7 @@ export default function VolcanoPlot(props) {
|
|
|
230
238
|
.text(d => d.featureId)
|
|
231
239
|
.attr('text-anchor', d => (d.logFoldChange < 0 ? 'end' : 'start'))
|
|
232
240
|
.attr('x', d => xScale(d.logFoldChange))
|
|
233
|
-
.attr('y', d => yScale(d.minusLog10p))
|
|
241
|
+
.attr('y', (d, i) => yScale(d.minusLog10p) + (!Number.isFinite(d.minusLog10p) ? topJitter(i, 20) : 0))
|
|
234
242
|
.style('display', d => ((
|
|
235
243
|
Math.abs(d.logFoldChange) < (featureLabelFoldChangeThreshold ?? 5.0)
|
|
236
244
|
|| (d.featureSignificance >= (featureLabelSignificanceThreshold ?? 0.01))
|
package/src/utils.js
CHANGED
|
@@ -87,8 +87,8 @@ export function useFilteredVolcanoData(props) {
|
|
|
87
87
|
sampleSetPathB[0] = sampleSetsColumnNameMappingReversed[rawSampleSetPathB[0]];
|
|
88
88
|
|
|
89
89
|
if (
|
|
90
|
-
isEqual(sampleSetPathA, sampleSetSelection[
|
|
91
|
-
&& isEqual(sampleSetPathB, sampleSetSelection[
|
|
90
|
+
isEqual(sampleSetPathA, sampleSetSelection[0])
|
|
91
|
+
&& isEqual(sampleSetPathB, sampleSetSelection[1])
|
|
92
92
|
) {
|
|
93
93
|
shouldSwapFoldChangeDirection = true;
|
|
94
94
|
}
|