@platforma-open/milaboratories.repertoire-mutation-heatmap.block 1.1.9 → 1.2.0
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/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.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -13769,6 +13769,35 @@ function landscapePanelsFrom(pCols) {
|
|
|
13769
13769
|
panels.sort((a, b) => a.index - b.index);
|
|
13770
13770
|
return panels;
|
|
13771
13771
|
}
|
|
13772
|
+
/**
|
|
13773
|
+
* Whether a discovered column can be plotted as a landscape score.
|
|
13774
|
+
*
|
|
13775
|
+
* A cell is ONE variant's value, so the column must be numeric and keyed on the variant axis and
|
|
13776
|
+
* nothing else. Numeric alone — all this used to check — admitted two kinds that cannot be drawn:
|
|
13777
|
+
*
|
|
13778
|
+
* - Keyed on the anchor's OTHER axes. Sort-Seq's baselines sit on `[parentId]` and
|
|
13779
|
+
* `[parentId, position]`, both reachable from the state matrix, so they were offered as scores.
|
|
13780
|
+
* The workflow reads `pt.axis(variantKey)` off whatever it is given, which those do not have.
|
|
13781
|
+
* - Keyed on the variant axis PLUS another, such as `[variantKey, gate]`. Those do join, but give
|
|
13782
|
+
* several rows per variant, and the landscape's one-row-per-cell `first` would then pick one of
|
|
13783
|
+
* them with nothing reporting it — the worst of the three outcomes.
|
|
13784
|
+
*
|
|
13785
|
+
* Deliberately NOT filtered on `pl7.app/isScore`, though Sort-Seq sets it and an earlier comment
|
|
13786
|
+
* in the picker expected to use it once that block landed. It would also drop variant-keyed
|
|
13787
|
+
* columns a user may legitimately plot — an abundance, a mutation count — which carry no such
|
|
13788
|
+
* annotation. The axis shape is a hard requirement of the plot; the annotation is a statement of
|
|
13789
|
+
* intent, and the two should not be confused.
|
|
13790
|
+
*/
|
|
13791
|
+
function isLandscapeScoreColumn(spec, variantAxisName) {
|
|
13792
|
+
if (!(/* @__PURE__ */ new Set([
|
|
13793
|
+
"Int",
|
|
13794
|
+
"Long",
|
|
13795
|
+
"Float",
|
|
13796
|
+
"Double"
|
|
13797
|
+
])).has(spec.valueType)) return false;
|
|
13798
|
+
if (variantAxisName === void 0) return false;
|
|
13799
|
+
return spec.axesSpec.length === 1 && spec.axesSpec[0].name === variantAxisName;
|
|
13800
|
+
}
|
|
13772
13801
|
/** The section href of one landscape page. */
|
|
13773
13802
|
function landscapeHref(scoreKey) {
|
|
13774
13803
|
return `/?score=${encodeURIComponent(scoreKey)}`;
|
|
@@ -13881,17 +13910,12 @@ const platforma$1 = BlockModelV3.create({
|
|
|
13881
13910
|
maxHops: 0,
|
|
13882
13911
|
exclude: [{ annotations: { "pl7.app/isLinkerColumn": exactMatch("true") } }]
|
|
13883
13912
|
}).getColumns();
|
|
13884
|
-
const
|
|
13885
|
-
"Int",
|
|
13886
|
-
"Long",
|
|
13887
|
-
"Float",
|
|
13888
|
-
"Double"
|
|
13889
|
-
]);
|
|
13913
|
+
const variantAxisName = stateSpec.axesSpec[0]?.name;
|
|
13890
13914
|
const seen = /* @__PURE__ */ new Set();
|
|
13891
13915
|
const options = [];
|
|
13892
13916
|
for (const recipe of columns) {
|
|
13893
13917
|
const spec = recipe.getSpec();
|
|
13894
|
-
if (!
|
|
13918
|
+
if (!isLandscapeScoreColumn(spec, variantAxisName)) continue;
|
|
13895
13919
|
const dedupKey = spec.name + "|" + JSON.stringify(spec.domain ?? {});
|
|
13896
13920
|
if (seen.has(dedupKey)) continue;
|
|
13897
13921
|
seen.add(dedupKey);
|