@platforma-open/milaboratories.repertoire-mutation-heatmap.block 1.1.2 → 1.1.4
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/block-pack/description.md +1 -1
- package/block-pack/main.plj.gz +0 -0
- package/block-pack/manifest.json +1 -1
- package/block-pack/model.json +1 -1
- package/block-pack/published.json +1 -1
- package/block-pack/ui.tgz +0 -0
- package/dist/AGENTS.d.ts +91 -20
- package/dist/AGENTS.d.ts.map +1 -1
- package/dist/index.d.ts +91 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -9
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -11451,28 +11451,43 @@ function dedupByLeafId(recipes) {
|
|
|
11451
11451
|
});
|
|
11452
11452
|
}
|
|
11453
11453
|
const STATE_MATRIX = "pl7.app/repertoire/stateMatrix";
|
|
11454
|
+
const LANDSCAPE_VALUE = "pl7.app/repertoire/singleMutantValue";
|
|
11455
|
+
const LANDSCAPE_SCORE_REF = "pl7.app/repertoire/landscapeScoreRef";
|
|
11456
|
+
const LANDSCAPE_SCORE_INDEX = "pl7.app/repertoire/landscapeScoreIndex";
|
|
11454
11457
|
const NO_DATASET_LABEL = "No dataset selected";
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11458
|
+
/**
|
|
11459
|
+
* Default state for a mutation-landscape chart. Used by `init` for the placeholder and by the UI
|
|
11460
|
+
* for each score a run produces, so the two look alike.
|
|
11461
|
+
*
|
|
11462
|
+
* @param currentTab `"settings"` opens the Settings drawer, `null` leaves it closed
|
|
11463
|
+
*/
|
|
11464
|
+
function makeLandscapeChartState(title, currentTab) {
|
|
11465
|
+
return {
|
|
11466
|
+
title,
|
|
11461
11467
|
template: "heatmap",
|
|
11462
|
-
currentTab
|
|
11468
|
+
currentTab,
|
|
11463
11469
|
layersSettings: { heatmap: {
|
|
11464
11470
|
normalizationDirection: null,
|
|
11465
11471
|
transform: null
|
|
11466
11472
|
} },
|
|
11467
11473
|
axesSettings: {
|
|
11468
|
-
other: { facetColumns: 1 },
|
|
11469
11474
|
axisX: { cellSize: 20 },
|
|
11470
11475
|
axisY: {
|
|
11471
11476
|
hideAxisLabels: false,
|
|
11472
11477
|
cellSize: 20
|
|
11473
11478
|
}
|
|
11474
11479
|
}
|
|
11475
|
-
}
|
|
11480
|
+
};
|
|
11481
|
+
}
|
|
11482
|
+
const dataModel = new DataModelBuilder({ kind }).from("v1").migrate("v2", (v1) => ({
|
|
11483
|
+
...v1,
|
|
11484
|
+
singleMutantHeatmapStates: {}
|
|
11485
|
+
})).init(() => ({
|
|
11486
|
+
roundFrequencyRefs: [],
|
|
11487
|
+
compositionEpsilon: 1e-6,
|
|
11488
|
+
scoreRefs: [],
|
|
11489
|
+
singleMutantHeatmapState: makeLandscapeChartState("Single Mutation Landscape", "settings"),
|
|
11490
|
+
singleMutantHeatmapStates: {},
|
|
11476
11491
|
compositionHeatmapState: {
|
|
11477
11492
|
title: "Enrichment Analysis",
|
|
11478
11493
|
template: "heatmap",
|
|
@@ -11589,6 +11604,28 @@ const platforma$1 = BlockModelV3.create({
|
|
|
11589
11604
|
} catch {
|
|
11590
11605
|
return;
|
|
11591
11606
|
}
|
|
11607
|
+
}).output("landscapePanels", (ctx) => {
|
|
11608
|
+
let pCols;
|
|
11609
|
+
try {
|
|
11610
|
+
pCols = ctx.outputs?.resolve("singleMutantHeatmapPf")?.getPColumns();
|
|
11611
|
+
} catch {
|
|
11612
|
+
return;
|
|
11613
|
+
}
|
|
11614
|
+
if (pCols === void 0) return void 0;
|
|
11615
|
+
const panels = [];
|
|
11616
|
+
for (const col of pCols) {
|
|
11617
|
+
if (col.spec.name !== LANDSCAPE_VALUE) continue;
|
|
11618
|
+
const key = col.spec.annotations?.[LANDSCAPE_SCORE_REF];
|
|
11619
|
+
if (key === void 0) continue;
|
|
11620
|
+
panels.push({
|
|
11621
|
+
key,
|
|
11622
|
+
label: col.spec.annotations?.["pl7.app/label"] ?? "Score",
|
|
11623
|
+
index: Number(col.spec.annotations?.[LANDSCAPE_SCORE_INDEX] ?? "0"),
|
|
11624
|
+
spec: col.spec
|
|
11625
|
+
});
|
|
11626
|
+
}
|
|
11627
|
+
panels.sort((a, b) => a.index - b.index);
|
|
11628
|
+
return panels;
|
|
11592
11629
|
}).outputWithStatus("compositionHeatmapPf", (ctx) => {
|
|
11593
11630
|
try {
|
|
11594
11631
|
const pCols = ctx.outputs?.resolve("compositionHeatmapPf")?.getPColumns();
|