@platforma-open/milaboratories.sequence-properties.model 1.1.1 → 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.
@@ -1,6 +1,25 @@
1
1
  let _platforma_sdk_model = require("@platforma-sdk/model");
2
2
  //#region src/dataModel.ts
3
- const blockDataModel = new _platforma_sdk_model.DataModelBuilder().from("Ver_2026_04_28").init(() => ({ tableState: (0, _platforma_sdk_model.createPlDataTableStateV2)() }));
3
+ const DEFAULT_SCATTER_STATE = {
4
+ title: "",
5
+ template: "dots",
6
+ currentTab: null
7
+ };
8
+ const DEFAULT_HISTOGRAM_STATE = {
9
+ title: "",
10
+ template: "bins",
11
+ currentTab: null,
12
+ layersSettings: { bins: { fillColor: "#99e099" } }
13
+ };
14
+ const blockDataModel = new _platforma_sdk_model.DataModelBuilder().from("Ver_2026_04_28").migrate("Ver_2026_05_05", (v1) => ({
15
+ ...v1,
16
+ graphStateScatter: { ...DEFAULT_SCATTER_STATE },
17
+ graphStateHistogram: { ...DEFAULT_HISTOGRAM_STATE }
18
+ })).init(() => ({
19
+ tableState: (0, _platforma_sdk_model.createPlDataTableStateV2)(),
20
+ graphStateScatter: { ...DEFAULT_SCATTER_STATE },
21
+ graphStateHistogram: { ...DEFAULT_HISTOGRAM_STATE }
22
+ }));
4
23
  //#endregion
5
24
  exports.blockDataModel = blockDataModel;
6
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"dataModel.cjs","names":["DataModelBuilder"],"sources":["../src/dataModel.ts"],"sourcesContent":["import { createPlDataTableStateV2, DataModelBuilder } from \"@platforma-sdk/model\";\nimport type { BlockData } from \"./types\";\n\nexport const blockDataModel = new DataModelBuilder().from<BlockData>(\"Ver_2026_04_28\").init(() => ({\n tableState: createPlDataTableStateV2(),\n}));\n"],"mappings":";;AAGA,MAAa,iBAAiB,IAAIA,qBAAAA,kBAAkB,CAAC,KAAgB,iBAAiB,CAAC,YAAY,EACjG,aAAA,GAAA,qBAAA,2BAAsC,EACvC,EAAE"}
1
+ {"version":3,"file":"dataModel.cjs","names":["DataModelBuilder"],"sources":["../src/dataModel.ts"],"sourcesContent":["import type { GraphMakerState } from \"@milaboratories/graph-maker\";\nimport { createPlDataTableStateV2, DataModelBuilder } from \"@platforma-sdk/model\";\nimport type { BlockData, BlockDataV1 } from \"./types\";\n\nconst DEFAULT_SCATTER_STATE: GraphMakerState = {\n title: \"\",\n template: \"dots\",\n currentTab: null,\n};\n\nconst DEFAULT_HISTOGRAM_STATE: GraphMakerState = {\n title: \"\",\n template: \"bins\",\n currentTab: null,\n layersSettings: {\n bins: { fillColor: \"#99e099\" },\n },\n};\n\nexport const blockDataModel = new DataModelBuilder()\n .from<BlockDataV1>(\"Ver_2026_04_28\")\n .migrate<BlockData>(\"Ver_2026_05_05\", (v1) => ({\n ...v1,\n graphStateScatter: { ...DEFAULT_SCATTER_STATE },\n graphStateHistogram: { ...DEFAULT_HISTOGRAM_STATE },\n }))\n .init(() => ({\n tableState: createPlDataTableStateV2(),\n graphStateScatter: { ...DEFAULT_SCATTER_STATE },\n graphStateHistogram: { ...DEFAULT_HISTOGRAM_STATE },\n }));\n"],"mappings":";;AAIA,MAAM,wBAAyC;CAC7C,OAAO;CACP,UAAU;CACV,YAAY;CACb;AAED,MAAM,0BAA2C;CAC/C,OAAO;CACP,UAAU;CACV,YAAY;CACZ,gBAAgB,EACd,MAAM,EAAE,WAAW,WAAW,EAC/B;CACF;AAED,MAAa,iBAAiB,IAAIA,qBAAAA,kBAAkB,CACjD,KAAkB,iBAAiB,CACnC,QAAmB,mBAAmB,QAAQ;CAC7C,GAAG;CACH,mBAAmB,EAAE,GAAG,uBAAuB;CAC/C,qBAAqB,EAAE,GAAG,yBAAyB;CACpD,EAAE,CACF,YAAY;CACX,aAAA,GAAA,qBAAA,2BAAsC;CACtC,mBAAmB,EAAE,GAAG,uBAAuB;CAC/C,qBAAqB,EAAE,GAAG,yBAAyB;CACpD,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"file":"dataModel.d.ts","names":[],"sources":["../src/dataModel.ts"],"mappings":";;;;cAGa,cAAA,EAAc,uBAAA,CAAA,SAAA,CAAA,SAAA"}
1
+ {"version":3,"file":"dataModel.d.ts","names":[],"sources":["../src/dataModel.ts"],"mappings":";;;;cAmBa,cAAA,EAAc,uBAAA,CAAA,SAAA,CAAA,SAAA"}
package/dist/dataModel.js CHANGED
@@ -1,6 +1,25 @@
1
1
  import { DataModelBuilder, createPlDataTableStateV2 } from "@platforma-sdk/model";
2
2
  //#region src/dataModel.ts
3
- const blockDataModel = new DataModelBuilder().from("Ver_2026_04_28").init(() => ({ tableState: createPlDataTableStateV2() }));
3
+ const DEFAULT_SCATTER_STATE = {
4
+ title: "",
5
+ template: "dots",
6
+ currentTab: null
7
+ };
8
+ const DEFAULT_HISTOGRAM_STATE = {
9
+ title: "",
10
+ template: "bins",
11
+ currentTab: null,
12
+ layersSettings: { bins: { fillColor: "#99e099" } }
13
+ };
14
+ const blockDataModel = new DataModelBuilder().from("Ver_2026_04_28").migrate("Ver_2026_05_05", (v1) => ({
15
+ ...v1,
16
+ graphStateScatter: { ...DEFAULT_SCATTER_STATE },
17
+ graphStateHistogram: { ...DEFAULT_HISTOGRAM_STATE }
18
+ })).init(() => ({
19
+ tableState: createPlDataTableStateV2(),
20
+ graphStateScatter: { ...DEFAULT_SCATTER_STATE },
21
+ graphStateHistogram: { ...DEFAULT_HISTOGRAM_STATE }
22
+ }));
4
23
  //#endregion
5
24
  export { blockDataModel };
6
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"dataModel.js","names":[],"sources":["../src/dataModel.ts"],"sourcesContent":["import { createPlDataTableStateV2, DataModelBuilder } from \"@platforma-sdk/model\";\nimport type { BlockData } from \"./types\";\n\nexport const blockDataModel = new DataModelBuilder().from<BlockData>(\"Ver_2026_04_28\").init(() => ({\n tableState: createPlDataTableStateV2(),\n}));\n"],"mappings":";;AAGA,MAAa,iBAAiB,IAAI,kBAAkB,CAAC,KAAgB,iBAAiB,CAAC,YAAY,EACjG,YAAY,0BAA0B,EACvC,EAAE"}
1
+ {"version":3,"file":"dataModel.js","names":[],"sources":["../src/dataModel.ts"],"sourcesContent":["import type { GraphMakerState } from \"@milaboratories/graph-maker\";\nimport { createPlDataTableStateV2, DataModelBuilder } from \"@platforma-sdk/model\";\nimport type { BlockData, BlockDataV1 } from \"./types\";\n\nconst DEFAULT_SCATTER_STATE: GraphMakerState = {\n title: \"\",\n template: \"dots\",\n currentTab: null,\n};\n\nconst DEFAULT_HISTOGRAM_STATE: GraphMakerState = {\n title: \"\",\n template: \"bins\",\n currentTab: null,\n layersSettings: {\n bins: { fillColor: \"#99e099\" },\n },\n};\n\nexport const blockDataModel = new DataModelBuilder()\n .from<BlockDataV1>(\"Ver_2026_04_28\")\n .migrate<BlockData>(\"Ver_2026_05_05\", (v1) => ({\n ...v1,\n graphStateScatter: { ...DEFAULT_SCATTER_STATE },\n graphStateHistogram: { ...DEFAULT_HISTOGRAM_STATE },\n }))\n .init(() => ({\n tableState: createPlDataTableStateV2(),\n graphStateScatter: { ...DEFAULT_SCATTER_STATE },\n graphStateHistogram: { ...DEFAULT_HISTOGRAM_STATE },\n }));\n"],"mappings":";;AAIA,MAAM,wBAAyC;CAC7C,OAAO;CACP,UAAU;CACV,YAAY;CACb;AAED,MAAM,0BAA2C;CAC/C,OAAO;CACP,UAAU;CACV,YAAY;CACZ,gBAAgB,EACd,MAAM,EAAE,WAAW,WAAW,EAC/B;CACF;AAED,MAAa,iBAAiB,IAAI,kBAAkB,CACjD,KAAkB,iBAAiB,CACnC,QAAmB,mBAAmB,QAAQ;CAC7C,GAAG;CACH,mBAAmB,EAAE,GAAG,uBAAuB;CAC/C,qBAAqB,EAAE,GAAG,yBAAyB;CACpD,EAAE,CACF,YAAY;CACX,YAAY,0BAA0B;CACtC,mBAAmB,EAAE,GAAG,uBAAuB;CAC/C,qBAAqB,EAAE,GAAG,yBAAyB;CACpD,EAAE"}
package/dist/index.cjs CHANGED
@@ -27,6 +27,9 @@ const platforma = _platforma_sdk_model.BlockModelV3.create(require_dataModel.blo
27
27
  if (ctx.data.inputAnchor === void 0) return void 0;
28
28
  const ownCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
29
29
  if (ownCols === void 0) return void 0;
30
+ const info = ctx.outputs?.resolve("info")?.getDataAsJson();
31
+ if (info === void 0) return void 0;
32
+ const tier = info.coverageTier;
30
33
  const sources = [new _platforma_sdk_model.ArrayColumnProvider(ctx.resultPool.selectColumns((spec) => !spec.annotations?.[_platforma_sdk_model.Annotation.Trace]?.includes("milaboratories.sequence-properties"))), new _platforma_sdk_model.ArrayColumnProvider(ownCols)];
31
34
  return (0, _platforma_sdk_model.createPlDataTableV3)(ctx, {
32
35
  tableState: ctx.data.tableState,
@@ -36,15 +39,63 @@ const platforma = _platforma_sdk_model.BlockModelV3.create(require_dataModel.blo
36
39
  selector: { mode: "enrichment" }
37
40
  },
38
41
  displayOptions: { visibility: [{
42
+ match: (spec) => {
43
+ if (spec.domain?.["pl7.app/vdj/scClonotypeChain/index"] === "secondary") return false;
44
+ if (spec.domain?.["pl7.app/alphabet"] !== "aminoacid") return false;
45
+ const isVdj = spec.name === "pl7.app/vdj/sequence";
46
+ const isUniversal = spec.name === "pl7.app/sequence";
47
+ if (!isVdj && !isUniversal) return false;
48
+ const feature = isVdj ? spec.domain?.["pl7.app/vdj/feature"] : spec.domain?.["pl7.app/feature"];
49
+ if (tier === "peptide") return isUniversal && feature === "peptide";
50
+ const chain = spec.domain?.["pl7.app/vdj/scClonotypeChain"];
51
+ if (chain !== void 0 && chain !== "A") return false;
52
+ if (tier === "full_chain") return feature === "VDJRegion" || feature === "VDJRegionInFrame";
53
+ if (tier === "cdr3_only" || tier === "partial") return feature === "CDR3";
54
+ return false;
55
+ },
56
+ visibility: "default"
57
+ }, {
39
58
  match: (spec) => !spec.annotations?.[_platforma_sdk_model.Annotation.Trace]?.includes("milaboratories.sequence-properties") && spec.annotations?.["pl7.app/isLinkerColumn"] !== "true",
40
59
  visibility: "optional"
41
60
  }] }
42
61
  });
43
- }).title(() => "Sequence Properties").subtitle((ctx) => ctx.data.defaultBlockLabel ?? "").sections(() => [{
44
- type: "link",
45
- href: "/",
46
- label: "Main"
47
- }]).done();
62
+ }).outputWithStatus("propertiesPfHandle", (ctx) => {
63
+ const allPCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
64
+ if (allPCols === void 0) return void 0;
65
+ const pCols = allPCols.filter((c) => c.spec.name !== "pl7.app/aaFraction");
66
+ const inputAnchor = ctx.data.inputAnchor;
67
+ const upstreamMeta = inputAnchor !== void 0 ? (ctx.resultPool.getAnchoredPColumns({ main: inputAnchor }, [{ axes: [{
68
+ anchor: "main",
69
+ idx: 0
70
+ }] }, { axes: [{
71
+ anchor: "main",
72
+ idx: 1
73
+ }] }]) ?? []).filter((c) => !c.spec.annotations?.[_platforma_sdk_model.Annotation.Trace]?.includes("milaboratories.sequence-properties")) : [];
74
+ return ctx.createPFrame([...pCols, ...upstreamMeta]);
75
+ }).output("propertiesPfCols", (ctx) => {
76
+ const pCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
77
+ if (pCols === void 0) return void 0;
78
+ return pCols.map((c) => ({
79
+ columnId: c.id,
80
+ spec: c.spec
81
+ }));
82
+ }).title(() => "Sequence Properties").subtitle((ctx) => ctx.data.defaultBlockLabel ?? "").sections(() => [
83
+ {
84
+ type: "link",
85
+ href: "/",
86
+ label: "Main"
87
+ },
88
+ {
89
+ type: "link",
90
+ href: "/scatter",
91
+ label: "Scatterplot"
92
+ },
93
+ {
94
+ type: "link",
95
+ href: "/histogram",
96
+ label: "Histogram"
97
+ }
98
+ ]).done();
48
99
  //#endregion
49
100
  exports.blockDataModel = require_dataModel.blockDataModel;
50
101
  exports.platforma = platforma;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["BlockModelV3","blockDataModel","ArrayColumnProvider","Annotation"],"sources":["../src/index.ts"],"sourcesContent":["import type { ColumnSource, InferOutputsType } from \"@platforma-sdk/model\";\nimport {\n Annotation,\n ArrayColumnProvider,\n BlockModelV3,\n createPlDataTableV3,\n} from \"@platforma-sdk/model\";\nimport { blockDataModel } from \"./dataModel\";\nimport type { BlockArgs, WorkflowInfo } from \"./types\";\n\nexport type { BlockArgs, BlockData, WorkflowInfo, WorkflowMode, WorkflowReceptor } from \"./types\";\nexport { blockDataModel } from \"./dataModel\";\n\nconst inputAnchorSpecs = [\n // Peptide mode — universal naming\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/variantKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n // Antibody/TCR — legacy MiXCR bulk (cloneId per spec; clonotypeKey per current MiXCR output)\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/cloneId\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/clonotypeKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n // Antibody/TCR — legacy MiXCR single-cell\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/scClonotypeKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n];\n\nexport const platforma = BlockModelV3.create(blockDataModel)\n .args<BlockArgs>((data) => {\n if (data.inputAnchor === undefined) {\n throw new Error(\"Select an input dataset\");\n }\n return {\n inputAnchor: data.inputAnchor,\n };\n })\n .output(\"inputOptions\", (ctx) =>\n ctx.resultPool.getOptions(inputAnchorSpecs, { refsWithEnrichments: true }),\n )\n .output(\"inputSpec\", (ctx) =>\n ctx.data.inputAnchor ? ctx.resultPool.getPColumnSpecByRef(ctx.data.inputAnchor) : undefined,\n )\n .output(\"info\", (ctx) => ctx.outputs?.resolve(\"info\")?.getDataAsJson<WorkflowInfo>())\n .output(\"isRunning\", (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n .output(\"processingLog\", (ctx) => ctx.outputs?.resolve(\"processingLog\")?.getLogHandle())\n .outputWithStatus(\"propertiesTable\", (ctx) => {\n if (ctx.data.inputAnchor === undefined) return undefined;\n const ownCols = ctx.outputs?.resolve(\"propertiesPf\")?.getPColumns();\n if (ownCols === undefined) return undefined;\n\n // Build sources explicitly: upstream cols from the result pool minus\n // anything traced back to this block, plus this block's own cols from\n // `propertiesPf`. The workflow also publishes `exports.properties` —\n // a blockId-stamped score-only variant for downstream consumers like\n // Lead Selection — into the result pool. Filtering by trace excludes\n // it here so score cols don't duplicate the propertiesPf variant.\n const upstreamCols = ctx.resultPool.selectColumns(\n (spec) =>\n !spec.annotations?.[Annotation.Trace]?.includes(\"milaboratories.sequence-properties\"),\n );\n const sources: ColumnSource[] = [\n new ArrayColumnProvider(upstreamCols),\n new ArrayColumnProvider(ownCols),\n ];\n\n return createPlDataTableV3(ctx, {\n tableState: ctx.data.tableState,\n columns: {\n sources,\n anchors: { main: ctx.data.inputAnchor },\n selector: { mode: \"enrichment\" },\n },\n // UX policy (not in spec): default-show only this block's columns;\n // demote upstream cols to optional to keep the table uncluttered.\n // This block's cols fall through unmatched and keep the visibility\n // stamped at workflow-time (`pl7.app/table/visibility`).\n displayOptions: {\n visibility: [\n {\n match: (spec) =>\n !spec.annotations?.[Annotation.Trace]?.includes(\n \"milaboratories.sequence-properties\",\n ) && spec.annotations?.[\"pl7.app/isLinkerColumn\"] !== \"true\",\n visibility: \"optional\",\n },\n ],\n },\n });\n })\n .title(() => \"Sequence Properties\")\n .subtitle((ctx) => ctx.data.defaultBlockLabel ?? \"\")\n .sections(() => [{ type: \"link\" as const, href: \"/\" as const, label: \"Main\" }])\n .done();\n\nexport type BlockOutputs = InferOutputsType<typeof platforma>;\n"],"mappings":";;;;AAaA,MAAM,mBAAmB;CAEvB;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,sBAAsB,CAAC;EACpE,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CA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,CAEsC,EACrC,IAAID,qBAAAA,oBAAoB,QAAQ,CACjC;AAED,SAAA,GAAA,qBAAA,qBAA2B,KAAK;EAC9B,YAAY,IAAI,KAAK;EACrB,SAAS;GACP;GACA,SAAS,EAAE,MAAM,IAAI,KAAK,aAAa;GACvC,UAAU,EAAE,MAAM,cAAc;GACjC;EAKD,gBAAgB,EACd,YAAY,CACV;GACE,QAAQ,SACN,CAAC,KAAK,cAAcC,qBAAAA,WAAW,QAAQ,SACrC,qCACD,IAAI,KAAK,cAAc,8BAA8B;GACxD,YAAY;GACb,CACF,EACF;EACF,CAAC;EACF,CACD,YAAY,sBAAsB,CAClC,UAAU,QAAQ,IAAI,KAAK,qBAAqB,GAAG,CACnD,eAAe,CAAC;CAAE,MAAM;CAAiB,MAAM;CAAc,OAAO;CAAQ,CAAC,CAAC,CAC9E,MAAM"}
1
+ {"version":3,"file":"index.cjs","names":["BlockModelV3","blockDataModel","ArrayColumnProvider","Annotation"],"sources":["../src/index.ts"],"sourcesContent":["import type {\n ColumnSource,\n InferOutputsType,\n PColumnIdAndSpec,\n PFrameHandle,\n} from \"@platforma-sdk/model\";\nimport {\n Annotation,\n ArrayColumnProvider,\n BlockModelV3,\n createPlDataTableV3,\n} from \"@platforma-sdk/model\";\nimport { blockDataModel } from \"./dataModel\";\nimport type { BlockArgs, WorkflowInfo } from \"./types\";\n\nexport type { BlockArgs, BlockData, WorkflowInfo, WorkflowMode, WorkflowReceptor } from \"./types\";\nexport { blockDataModel } from \"./dataModel\";\n\nconst inputAnchorSpecs = [\n // Peptide mode — universal naming\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/variantKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n // Antibody/TCR — legacy MiXCR bulk (cloneId per spec; clonotypeKey per current MiXCR output)\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/cloneId\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/clonotypeKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n // Antibody/TCR — legacy MiXCR single-cell\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/scClonotypeKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n];\n\nexport const platforma = BlockModelV3.create(blockDataModel)\n .args<BlockArgs>((data) => {\n if (data.inputAnchor === undefined) {\n throw new Error(\"Select an input dataset\");\n }\n return {\n inputAnchor: data.inputAnchor,\n };\n })\n .output(\"inputOptions\", (ctx) =>\n ctx.resultPool.getOptions(inputAnchorSpecs, { refsWithEnrichments: true }),\n )\n .output(\"inputSpec\", (ctx) =>\n ctx.data.inputAnchor ? ctx.resultPool.getPColumnSpecByRef(ctx.data.inputAnchor) : undefined,\n )\n .output(\"info\", (ctx) => ctx.outputs?.resolve(\"info\")?.getDataAsJson<WorkflowInfo>())\n .output(\"isRunning\", (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n .output(\"processingLog\", (ctx) => ctx.outputs?.resolve(\"processingLog\")?.getLogHandle())\n .outputWithStatus(\"propertiesTable\", (ctx) => {\n if (ctx.data.inputAnchor === undefined) return undefined;\n const ownCols = ctx.outputs?.resolve(\"propertiesPf\")?.getPColumns();\n if (ownCols === undefined) return undefined;\n // `coverageTier` is set in workflow/main.tpl.tengo and surfaced via the\n // `info` JSON resource. Allowed values are defined in types.ts::WorkflowInfo.\n // Gate on `info` so the table renders consistently with the chosen aa\n // column rather than briefly without it while `info` is still resolving.\n const info = ctx.outputs?.resolve(\"info\")?.getDataAsJson<WorkflowInfo>();\n if (info === undefined) return undefined;\n const tier = info.coverageTier;\n\n // Build sources explicitly: upstream cols from the result pool minus\n // anything traced back to this block, plus this block's own cols from\n // `propertiesPf`. The workflow also publishes `exports.properties` —\n // a blockId-stamped score-only variant for downstream consumers like\n // Lead Selection — into the result pool. Filtering by trace excludes\n // it here so score cols don't duplicate the propertiesPf variant.\n const upstreamCols = ctx.resultPool.selectColumns(\n (spec) =>\n !spec.annotations?.[Annotation.Trace]?.includes(\"milaboratories.sequence-properties\"),\n );\n const sources: ColumnSource[] = [\n new ArrayColumnProvider(upstreamCols),\n new ArrayColumnProvider(ownCols),\n ];\n\n return createPlDataTableV3(ctx, {\n tableState: ctx.data.tableState,\n columns: {\n sources,\n anchors: { main: ctx.data.inputAnchor },\n selector: { mode: \"enrichment\" },\n },\n // Default-visible: this block's columns + a single source amino-acid\n // sequence column matching the analysed coverage tier. Reviewer asked\n // for one sequence next to the properties — full-chain VDJRegion when\n // available (it contains the CDR3); CDR3 alone when that is all the\n // input has; peptide for peptide mode. Chain A (heavy / alpha / gamma)\n // only — chain B stays available via the column picker. Other upstream\n // cols → optional. This block's cols fall through unmatched and keep\n // their workflow-time `pl7.app/table/visibility` annotation.\n displayOptions: {\n visibility: [\n {\n match: (spec) => {\n if (spec.domain?.[\"pl7.app/vdj/scClonotypeChain/index\"] === \"secondary\") {\n return false;\n }\n if (spec.domain?.[\"pl7.app/alphabet\"] !== \"aminoacid\") return false;\n\n const isVdj = spec.name === \"pl7.app/vdj/sequence\";\n const isUniversal = spec.name === \"pl7.app/sequence\";\n if (!isVdj && !isUniversal) return false;\n\n const feature = isVdj\n ? spec.domain?.[\"pl7.app/vdj/feature\"]\n : spec.domain?.[\"pl7.app/feature\"];\n\n if (tier === \"peptide\") {\n return isUniversal && feature === \"peptide\";\n }\n\n const chain = spec.domain?.[\"pl7.app/vdj/scClonotypeChain\"];\n if (chain !== undefined && chain !== \"A\") return false;\n\n if (tier === \"full_chain\") {\n return feature === \"VDJRegion\" || feature === \"VDJRegionInFrame\";\n }\n if (tier === \"cdr3_only\" || tier === \"partial\") {\n return feature === \"CDR3\";\n }\n return false;\n },\n visibility: \"default\",\n },\n {\n match: (spec) =>\n !spec.annotations?.[Annotation.Trace]?.includes(\n \"milaboratories.sequence-properties\",\n ) && spec.annotations?.[\"pl7.app/isLinkerColumn\"] !== \"true\",\n visibility: \"optional\",\n },\n ],\n },\n });\n })\n .outputWithStatus(\"propertiesPfHandle\", (ctx): PFrameHandle | undefined => {\n const allPCols = ctx.outputs?.resolve(\"propertiesPf\")?.getPColumns();\n if (allPCols === undefined) return undefined;\n // Drop the AA fraction column from the pframe entirely. Two-axis\n // (variantKey × aminoAcid), at 50k peptides ~1M cells — enough to trip\n // graph-maker's cell-count guard on its own. The picker already excludes\n // it via `isNumericScalar` (axesSpec.length === 1), so the data was\n // pure overhead.\n const pCols = allPCols.filter((c) => c.spec.name !== \"pl7.app/aaFraction\");\n // Use `ctx.createPFrame` instead of `createPFrameForGraphs`. The latter\n // walks the result pool and pulls in this block's `exports.properties`\n // — a `trace.inject`-stamped re-emission of every column already in\n // `propertiesPf`, published for Lead Selection — so axis dropdowns\n // show e.g. \"Net Charge (pH7) / IG\" twice. Same workaround chosen by\n // cdr3-spectratype, batch-correction, cell-type-annotation, and\n // dimensionality-reduction.\n //\n // Pull single-axis metadata anchored to the input dataset's two axes\n // (idx 0 = sample, idx 1 = entity key) so sample groups / patient IDs /\n // peptide abundance and similar cols remain available for grouping and\n // filtering. Drop self-trace to keep our own exports out.\n const inputAnchor = ctx.data.inputAnchor;\n const upstreamMeta =\n inputAnchor !== undefined\n ? (\n ctx.resultPool.getAnchoredPColumns({ main: inputAnchor }, [\n { axes: [{ anchor: \"main\", idx: 0 }] },\n { axes: [{ anchor: \"main\", idx: 1 }] },\n ]) ?? []\n ).filter(\n (c) =>\n !c.spec.annotations?.[Annotation.Trace]?.includes(\n \"milaboratories.sequence-properties\",\n ),\n )\n : [];\n return ctx.createPFrame([...pCols, ...upstreamMeta]);\n })\n .output(\"propertiesPfCols\", (ctx): PColumnIdAndSpec[] | undefined => {\n const pCols = ctx.outputs?.resolve(\"propertiesPf\")?.getPColumns();\n if (pCols === undefined) return undefined;\n return pCols.map((c) => ({ columnId: c.id, spec: c.spec }) satisfies PColumnIdAndSpec);\n })\n .title(() => \"Sequence Properties\")\n .subtitle((ctx) => ctx.data.defaultBlockLabel ?? \"\")\n .sections(() => [\n { type: \"link\" as const, href: \"/\" as const, label: \"Main\" },\n { type: \"link\" as const, href: \"/scatter\" as const, label: \"Scatterplot\" },\n { type: \"link\" as const, href: \"/histogram\" as const, label: \"Histogram\" },\n ])\n .done();\n\nexport type BlockOutputs = InferOutputsType<typeof platforma>;\n"],"mappings":";;;;AAkBA,MAAM,mBAAmB;CAEvB;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,sBAAsB,CAAC;EACpE,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CAED;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,uBAAuB,CAAC;EACrE,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CACD;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,4BAA4B,CAAC;EAC1E,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CAED;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,8BAA8B,CAAC;EAC5E,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CACF;AAED,MAAa,YAAYA,qBAAAA,aAAa,OAAOC,kBAAAA,eAAe,CACzD,MAAiB,SAAS;AACzB,KAAI,KAAK,gBAAgB,KAAA,EACvB,OAAM,IAAI,MAAM,0BAA0B;AAE5C,QAAO,EACL,aAAa,KAAK,aACnB;EACD,CACD,OAAO,iBAAiB,QACvB,IAAI,WAAW,WAAW,kBAAkB,EAAE,qBAAqB,MAAM,CAAC,CAC3E,CACA,OAAO,cAAc,QACpB,IAAI,KAAK,cAAc,IAAI,WAAW,oBAAoB,IAAI,KAAK,YAAY,GAAG,KAAA,EACnF,CACA,OAAO,SAAS,QAAQ,IAAI,SAAS,QAAQ,OAAO,EAAE,eAA6B,CAAC,CACpF,OAAO,cAAc,QAAQ,IAAI,SAAS,mBAAmB,KAAK,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;EAAuB,OAAO;EAAa;CAC3E,CAAC,CACD,MAAM"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { BlockArgs, BlockData, WorkflowInfo, WorkflowMode, WorkflowReceptor } from "./types.js";
2
2
  import { blockDataModel } from "./dataModel.js";
3
3
  import * as _$_platforma_sdk_model0 from "@platforma-sdk/model";
4
- import { InferOutputsType } from "@platforma-sdk/model";
4
+ import { InferOutputsType, PFrameHandle } from "@platforma-sdk/model";
5
5
  import * as _$_milaboratories_helpers0 from "@milaboratories/helpers";
6
6
 
7
7
  //#region src/index.d.ts
@@ -60,7 +60,7 @@ declare const platforma: _$_platforma_sdk_model0.PlatformaExtended<_$_platforma_
60
60
  propertiesTable: _$_platforma_sdk_model0.ConfigRenderLambda<{
61
61
  sourceId: null | string;
62
62
  fullTableHandle?: _$_platforma_sdk_model0.PTableHandle | undefined;
63
- fullPframeHandle?: _$_platforma_sdk_model0.PFrameHandle | undefined;
63
+ fullPframeHandle?: PFrameHandle | undefined;
64
64
  visibleTableHandle?: _$_platforma_sdk_model0.PTableHandle | undefined;
65
65
  defaultFilters?: _$_milaboratories_helpers0.Nil | {
66
66
  type: "or";
@@ -1706,7 +1706,44 @@ declare const platforma: _$_platforma_sdk_model0.PlatformaExtended<_$_platforma_
1706
1706
  } | undefined> & {
1707
1707
  withStatus: true;
1708
1708
  };
1709
- }>, "/", {}, _$_platforma_sdk_model0.BlockDefaultUiServices>>;
1709
+ } & {
1710
+ propertiesPfHandle: _$_platforma_sdk_model0.ConfigRenderLambda<PFrameHandle | undefined> & {
1711
+ withStatus: true;
1712
+ };
1713
+ } & {
1714
+ propertiesPfCols: _$_platforma_sdk_model0.ConfigRenderLambda<{
1715
+ readonly columnId: _$_platforma_sdk_model0.PObjectId;
1716
+ readonly spec: {
1717
+ readonly kind: "PColumn";
1718
+ readonly name: string;
1719
+ readonly domain?: {
1720
+ [x: string]: string;
1721
+ } | undefined;
1722
+ readonly contextDomain?: {
1723
+ [x: string]: string;
1724
+ } | undefined;
1725
+ readonly annotations?: {
1726
+ [x: string]: string;
1727
+ } | undefined;
1728
+ readonly valueType: "Int" | "Long" | "Float" | "Double" | "String" | "Bytes";
1729
+ readonly parentAxes?: number[] | undefined;
1730
+ readonly axesSpec: {
1731
+ readonly type: _$_platforma_sdk_model0.AxisValueType;
1732
+ readonly name: string;
1733
+ readonly domain?: {
1734
+ [x: string]: string;
1735
+ } | undefined;
1736
+ readonly contextDomain?: {
1737
+ [x: string]: string;
1738
+ } | undefined;
1739
+ readonly annotations?: {
1740
+ [x: string]: string;
1741
+ } | undefined;
1742
+ readonly parentAxes?: number[] | undefined;
1743
+ }[];
1744
+ };
1745
+ }[] | undefined>;
1746
+ }>, "/" | "/scatter" | "/histogram", {}, _$_platforma_sdk_model0.BlockDefaultUiServices>>;
1710
1747
  type BlockOutputs = InferOutputsType<typeof platforma>;
1711
1748
  //#endregion
1712
1749
  export { type BlockArgs, type BlockData, BlockOutputs, type WorkflowInfo, type WorkflowMode, type WorkflowReceptor, blockDataModel, platforma };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;cAmCa,SAAA,EAAS,uBAAA,CAAA,iBAAA,yBAAA,WAAA,CAiEb,SAAA,EAjEa,SAAA,0BAAA,uBAAA;gBAAA,uBAAA,CAAA,kBAAA;IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAAA,uBAAA,CAAA,sBAAA;AAAA,KA6JV,YAAA,GAAe,gBAAA,QAAwB,SAAA"}
package/dist/index.js CHANGED
@@ -26,6 +26,9 @@ const platforma = BlockModelV3.create(blockDataModel).args((data) => {
26
26
  if (ctx.data.inputAnchor === void 0) return void 0;
27
27
  const ownCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
28
28
  if (ownCols === void 0) return void 0;
29
+ const info = ctx.outputs?.resolve("info")?.getDataAsJson();
30
+ if (info === void 0) return void 0;
31
+ const tier = info.coverageTier;
29
32
  const sources = [new ArrayColumnProvider(ctx.resultPool.selectColumns((spec) => !spec.annotations?.[Annotation.Trace]?.includes("milaboratories.sequence-properties"))), new ArrayColumnProvider(ownCols)];
30
33
  return createPlDataTableV3(ctx, {
31
34
  tableState: ctx.data.tableState,
@@ -35,15 +38,63 @@ const platforma = BlockModelV3.create(blockDataModel).args((data) => {
35
38
  selector: { mode: "enrichment" }
36
39
  },
37
40
  displayOptions: { visibility: [{
41
+ match: (spec) => {
42
+ if (spec.domain?.["pl7.app/vdj/scClonotypeChain/index"] === "secondary") return false;
43
+ if (spec.domain?.["pl7.app/alphabet"] !== "aminoacid") return false;
44
+ const isVdj = spec.name === "pl7.app/vdj/sequence";
45
+ const isUniversal = spec.name === "pl7.app/sequence";
46
+ if (!isVdj && !isUniversal) return false;
47
+ const feature = isVdj ? spec.domain?.["pl7.app/vdj/feature"] : spec.domain?.["pl7.app/feature"];
48
+ if (tier === "peptide") return isUniversal && feature === "peptide";
49
+ const chain = spec.domain?.["pl7.app/vdj/scClonotypeChain"];
50
+ if (chain !== void 0 && chain !== "A") return false;
51
+ if (tier === "full_chain") return feature === "VDJRegion" || feature === "VDJRegionInFrame";
52
+ if (tier === "cdr3_only" || tier === "partial") return feature === "CDR3";
53
+ return false;
54
+ },
55
+ visibility: "default"
56
+ }, {
38
57
  match: (spec) => !spec.annotations?.[Annotation.Trace]?.includes("milaboratories.sequence-properties") && spec.annotations?.["pl7.app/isLinkerColumn"] !== "true",
39
58
  visibility: "optional"
40
59
  }] }
41
60
  });
42
- }).title(() => "Sequence Properties").subtitle((ctx) => ctx.data.defaultBlockLabel ?? "").sections(() => [{
43
- type: "link",
44
- href: "/",
45
- label: "Main"
46
- }]).done();
61
+ }).outputWithStatus("propertiesPfHandle", (ctx) => {
62
+ const allPCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
63
+ if (allPCols === void 0) return void 0;
64
+ const pCols = allPCols.filter((c) => c.spec.name !== "pl7.app/aaFraction");
65
+ const inputAnchor = ctx.data.inputAnchor;
66
+ const upstreamMeta = inputAnchor !== void 0 ? (ctx.resultPool.getAnchoredPColumns({ main: inputAnchor }, [{ axes: [{
67
+ anchor: "main",
68
+ idx: 0
69
+ }] }, { axes: [{
70
+ anchor: "main",
71
+ idx: 1
72
+ }] }]) ?? []).filter((c) => !c.spec.annotations?.[Annotation.Trace]?.includes("milaboratories.sequence-properties")) : [];
73
+ return ctx.createPFrame([...pCols, ...upstreamMeta]);
74
+ }).output("propertiesPfCols", (ctx) => {
75
+ const pCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
76
+ if (pCols === void 0) return void 0;
77
+ return pCols.map((c) => ({
78
+ columnId: c.id,
79
+ spec: c.spec
80
+ }));
81
+ }).title(() => "Sequence Properties").subtitle((ctx) => ctx.data.defaultBlockLabel ?? "").sections(() => [
82
+ {
83
+ type: "link",
84
+ href: "/",
85
+ label: "Main"
86
+ },
87
+ {
88
+ type: "link",
89
+ href: "/scatter",
90
+ label: "Scatterplot"
91
+ },
92
+ {
93
+ type: "link",
94
+ href: "/histogram",
95
+ label: "Histogram"
96
+ }
97
+ ]).done();
47
98
  //#endregion
48
99
  export { blockDataModel, platforma };
49
100
 
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { ColumnSource, InferOutputsType } from \"@platforma-sdk/model\";\nimport {\n Annotation,\n ArrayColumnProvider,\n BlockModelV3,\n createPlDataTableV3,\n} from \"@platforma-sdk/model\";\nimport { blockDataModel } from \"./dataModel\";\nimport type { BlockArgs, WorkflowInfo } from \"./types\";\n\nexport type { BlockArgs, BlockData, WorkflowInfo, WorkflowMode, WorkflowReceptor } from \"./types\";\nexport { blockDataModel } from \"./dataModel\";\n\nconst inputAnchorSpecs = [\n // Peptide mode — universal naming\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/variantKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n // Antibody/TCR — legacy MiXCR bulk (cloneId per spec; clonotypeKey per current MiXCR output)\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/cloneId\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/clonotypeKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n // Antibody/TCR — legacy MiXCR single-cell\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/scClonotypeKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n];\n\nexport const platforma = BlockModelV3.create(blockDataModel)\n .args<BlockArgs>((data) => {\n if (data.inputAnchor === undefined) {\n throw new Error(\"Select an input dataset\");\n }\n return {\n inputAnchor: data.inputAnchor,\n };\n })\n .output(\"inputOptions\", (ctx) =>\n ctx.resultPool.getOptions(inputAnchorSpecs, { refsWithEnrichments: true }),\n )\n .output(\"inputSpec\", (ctx) =>\n ctx.data.inputAnchor ? ctx.resultPool.getPColumnSpecByRef(ctx.data.inputAnchor) : undefined,\n )\n .output(\"info\", (ctx) => ctx.outputs?.resolve(\"info\")?.getDataAsJson<WorkflowInfo>())\n .output(\"isRunning\", (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n .output(\"processingLog\", (ctx) => ctx.outputs?.resolve(\"processingLog\")?.getLogHandle())\n .outputWithStatus(\"propertiesTable\", (ctx) => {\n if (ctx.data.inputAnchor === undefined) return undefined;\n const ownCols = ctx.outputs?.resolve(\"propertiesPf\")?.getPColumns();\n if (ownCols === undefined) return undefined;\n\n // Build sources explicitly: upstream cols from the result pool minus\n // anything traced back to this block, plus this block's own cols from\n // `propertiesPf`. The workflow also publishes `exports.properties` —\n // a blockId-stamped score-only variant for downstream consumers like\n // Lead Selection — into the result pool. Filtering by trace excludes\n // it here so score cols don't duplicate the propertiesPf variant.\n const upstreamCols = ctx.resultPool.selectColumns(\n (spec) =>\n !spec.annotations?.[Annotation.Trace]?.includes(\"milaboratories.sequence-properties\"),\n );\n const sources: ColumnSource[] = [\n new ArrayColumnProvider(upstreamCols),\n new ArrayColumnProvider(ownCols),\n ];\n\n return createPlDataTableV3(ctx, {\n tableState: ctx.data.tableState,\n columns: {\n sources,\n anchors: { main: ctx.data.inputAnchor },\n selector: { mode: \"enrichment\" },\n },\n // UX policy (not in spec): default-show only this block's columns;\n // demote upstream cols to optional to keep the table uncluttered.\n // This block's cols fall through unmatched and keep the visibility\n // stamped at workflow-time (`pl7.app/table/visibility`).\n displayOptions: {\n visibility: [\n {\n match: (spec) =>\n !spec.annotations?.[Annotation.Trace]?.includes(\n \"milaboratories.sequence-properties\",\n ) && spec.annotations?.[\"pl7.app/isLinkerColumn\"] !== \"true\",\n visibility: \"optional\",\n },\n ],\n },\n });\n })\n .title(() => \"Sequence Properties\")\n .subtitle((ctx) => ctx.data.defaultBlockLabel ?? \"\")\n .sections(() => [{ type: \"link\" as const, href: \"/\" as const, label: \"Main\" }])\n .done();\n\nexport type BlockOutputs = InferOutputsType<typeof platforma>;\n"],"mappings":";;;AAaA,MAAM,mBAAmB;CAEvB;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,sBAAsB,CAAC;EACpE,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CAED;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,uBAAuB,CAAC;EACrE,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CACD;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,4BAA4B,CAAC;EAC1E,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CAED;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,8BAA8B,CAAC;EAC5E,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CACF;AAED,MAAa,YAAY,aAAa,OAAO,eAAe,CACzD,MAAiB,SAAS;AACzB,KAAI,KAAK,gBAAgB,KAAA,EACvB,OAAM,IAAI,MAAM,0BAA0B;AAE5C,QAAO,EACL,aAAa,KAAK,aACnB;EACD,CACD,OAAO,iBAAiB,QACvB,IAAI,WAAW,WAAW,kBAAkB,EAAE,qBAAqB,MAAM,CAAC,CAC3E,CACA,OAAO,cAAc,QACpB,IAAI,KAAK,cAAc,IAAI,WAAW,oBAAoB,IAAI,KAAK,YAAY,GAAG,KAAA,EACnF,CACA,OAAO,SAAS,QAAQ,IAAI,SAAS,QAAQ,OAAO,EAAE,eAA6B,CAAC,CACpF,OAAO,cAAc,QAAQ,IAAI,SAAS,mBAAmB,KAAK,MAAM,CACxE,OAAO,kBAAkB,QAAQ,IAAI,SAAS,QAAQ,gBAAgB,EAAE,cAAc,CAAC,CACvF,iBAAiB,oBAAoB,QAAQ;AAC5C,KAAI,IAAI,KAAK,gBAAgB,KAAA,EAAW,QAAO,KAAA;CAC/C,MAAM,UAAU,IAAI,SAAS,QAAQ,eAAe,EAAE,aAAa;AACnE,KAAI,YAAY,KAAA,EAAW,QAAO,KAAA;CAYlC,MAAM,UAA0B,CAC9B,IAAI,oBALe,IAAI,WAAW,eACjC,SACC,CAAC,KAAK,cAAc,WAAW,QAAQ,SAAS,qCAAqC,CACxF,CAEsC,EACrC,IAAI,oBAAoB,QAAQ,CACjC;AAED,QAAO,oBAAoB,KAAK;EAC9B,YAAY,IAAI,KAAK;EACrB,SAAS;GACP;GACA,SAAS,EAAE,MAAM,IAAI,KAAK,aAAa;GACvC,UAAU,EAAE,MAAM,cAAc;GACjC;EAKD,gBAAgB,EACd,YAAY,CACV;GACE,QAAQ,SACN,CAAC,KAAK,cAAc,WAAW,QAAQ,SACrC,qCACD,IAAI,KAAK,cAAc,8BAA8B;GACxD,YAAY;GACb,CACF,EACF;EACF,CAAC;EACF,CACD,YAAY,sBAAsB,CAClC,UAAU,QAAQ,IAAI,KAAK,qBAAqB,GAAG,CACnD,eAAe,CAAC;CAAE,MAAM;CAAiB,MAAM;CAAc,OAAO;CAAQ,CAAC,CAAC,CAC9E,MAAM"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type {\n ColumnSource,\n InferOutputsType,\n PColumnIdAndSpec,\n PFrameHandle,\n} from \"@platforma-sdk/model\";\nimport {\n Annotation,\n ArrayColumnProvider,\n BlockModelV3,\n createPlDataTableV3,\n} from \"@platforma-sdk/model\";\nimport { blockDataModel } from \"./dataModel\";\nimport type { BlockArgs, WorkflowInfo } from \"./types\";\n\nexport type { BlockArgs, BlockData, WorkflowInfo, WorkflowMode, WorkflowReceptor } from \"./types\";\nexport { blockDataModel } from \"./dataModel\";\n\nconst inputAnchorSpecs = [\n // Peptide mode — universal naming\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/variantKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n // Antibody/TCR — legacy MiXCR bulk (cloneId per spec; clonotypeKey per current MiXCR output)\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/cloneId\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/clonotypeKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n // Antibody/TCR — legacy MiXCR single-cell\n {\n axes: [{ name: \"pl7.app/sampleId\" }, { name: \"pl7.app/vdj/scClonotypeKey\" }],\n annotations: { \"pl7.app/isAnchor\": \"true\" },\n },\n];\n\nexport const platforma = BlockModelV3.create(blockDataModel)\n .args<BlockArgs>((data) => {\n if (data.inputAnchor === undefined) {\n throw new Error(\"Select an input dataset\");\n }\n return {\n inputAnchor: data.inputAnchor,\n };\n })\n .output(\"inputOptions\", (ctx) =>\n ctx.resultPool.getOptions(inputAnchorSpecs, { refsWithEnrichments: true }),\n )\n .output(\"inputSpec\", (ctx) =>\n ctx.data.inputAnchor ? ctx.resultPool.getPColumnSpecByRef(ctx.data.inputAnchor) : undefined,\n )\n .output(\"info\", (ctx) => ctx.outputs?.resolve(\"info\")?.getDataAsJson<WorkflowInfo>())\n .output(\"isRunning\", (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n .output(\"processingLog\", (ctx) => ctx.outputs?.resolve(\"processingLog\")?.getLogHandle())\n .outputWithStatus(\"propertiesTable\", (ctx) => {\n if (ctx.data.inputAnchor === undefined) return undefined;\n const ownCols = ctx.outputs?.resolve(\"propertiesPf\")?.getPColumns();\n if (ownCols === undefined) return undefined;\n // `coverageTier` is set in workflow/main.tpl.tengo and surfaced via the\n // `info` JSON resource. Allowed values are defined in types.ts::WorkflowInfo.\n // Gate on `info` so the table renders consistently with the chosen aa\n // column rather than briefly without it while `info` is still resolving.\n const info = ctx.outputs?.resolve(\"info\")?.getDataAsJson<WorkflowInfo>();\n if (info === undefined) return undefined;\n const tier = info.coverageTier;\n\n // Build sources explicitly: upstream cols from the result pool minus\n // anything traced back to this block, plus this block's own cols from\n // `propertiesPf`. The workflow also publishes `exports.properties` —\n // a blockId-stamped score-only variant for downstream consumers like\n // Lead Selection — into the result pool. Filtering by trace excludes\n // it here so score cols don't duplicate the propertiesPf variant.\n const upstreamCols = ctx.resultPool.selectColumns(\n (spec) =>\n !spec.annotations?.[Annotation.Trace]?.includes(\"milaboratories.sequence-properties\"),\n );\n const sources: ColumnSource[] = [\n new ArrayColumnProvider(upstreamCols),\n new ArrayColumnProvider(ownCols),\n ];\n\n return createPlDataTableV3(ctx, {\n tableState: ctx.data.tableState,\n columns: {\n sources,\n anchors: { main: ctx.data.inputAnchor },\n selector: { mode: \"enrichment\" },\n },\n // Default-visible: this block's columns + a single source amino-acid\n // sequence column matching the analysed coverage tier. Reviewer asked\n // for one sequence next to the properties — full-chain VDJRegion when\n // available (it contains the CDR3); CDR3 alone when that is all the\n // input has; peptide for peptide mode. Chain A (heavy / alpha / gamma)\n // only — chain B stays available via the column picker. Other upstream\n // cols → optional. This block's cols fall through unmatched and keep\n // their workflow-time `pl7.app/table/visibility` annotation.\n displayOptions: {\n visibility: [\n {\n match: (spec) => {\n if (spec.domain?.[\"pl7.app/vdj/scClonotypeChain/index\"] === \"secondary\") {\n return false;\n }\n if (spec.domain?.[\"pl7.app/alphabet\"] !== \"aminoacid\") return false;\n\n const isVdj = spec.name === \"pl7.app/vdj/sequence\";\n const isUniversal = spec.name === \"pl7.app/sequence\";\n if (!isVdj && !isUniversal) return false;\n\n const feature = isVdj\n ? spec.domain?.[\"pl7.app/vdj/feature\"]\n : spec.domain?.[\"pl7.app/feature\"];\n\n if (tier === \"peptide\") {\n return isUniversal && feature === \"peptide\";\n }\n\n const chain = spec.domain?.[\"pl7.app/vdj/scClonotypeChain\"];\n if (chain !== undefined && chain !== \"A\") return false;\n\n if (tier === \"full_chain\") {\n return feature === \"VDJRegion\" || feature === \"VDJRegionInFrame\";\n }\n if (tier === \"cdr3_only\" || tier === \"partial\") {\n return feature === \"CDR3\";\n }\n return false;\n },\n visibility: \"default\",\n },\n {\n match: (spec) =>\n !spec.annotations?.[Annotation.Trace]?.includes(\n \"milaboratories.sequence-properties\",\n ) && spec.annotations?.[\"pl7.app/isLinkerColumn\"] !== \"true\",\n visibility: \"optional\",\n },\n ],\n },\n });\n })\n .outputWithStatus(\"propertiesPfHandle\", (ctx): PFrameHandle | undefined => {\n const allPCols = ctx.outputs?.resolve(\"propertiesPf\")?.getPColumns();\n if (allPCols === undefined) return undefined;\n // Drop the AA fraction column from the pframe entirely. Two-axis\n // (variantKey × aminoAcid), at 50k peptides ~1M cells — enough to trip\n // graph-maker's cell-count guard on its own. The picker already excludes\n // it via `isNumericScalar` (axesSpec.length === 1), so the data was\n // pure overhead.\n const pCols = allPCols.filter((c) => c.spec.name !== \"pl7.app/aaFraction\");\n // Use `ctx.createPFrame` instead of `createPFrameForGraphs`. The latter\n // walks the result pool and pulls in this block's `exports.properties`\n // — a `trace.inject`-stamped re-emission of every column already in\n // `propertiesPf`, published for Lead Selection — so axis dropdowns\n // show e.g. \"Net Charge (pH7) / IG\" twice. Same workaround chosen by\n // cdr3-spectratype, batch-correction, cell-type-annotation, and\n // dimensionality-reduction.\n //\n // Pull single-axis metadata anchored to the input dataset's two axes\n // (idx 0 = sample, idx 1 = entity key) so sample groups / patient IDs /\n // peptide abundance and similar cols remain available for grouping and\n // filtering. Drop self-trace to keep our own exports out.\n const inputAnchor = ctx.data.inputAnchor;\n const upstreamMeta =\n inputAnchor !== undefined\n ? (\n ctx.resultPool.getAnchoredPColumns({ main: inputAnchor }, [\n { axes: [{ anchor: \"main\", idx: 0 }] },\n { axes: [{ anchor: \"main\", idx: 1 }] },\n ]) ?? []\n ).filter(\n (c) =>\n !c.spec.annotations?.[Annotation.Trace]?.includes(\n \"milaboratories.sequence-properties\",\n ),\n )\n : [];\n return ctx.createPFrame([...pCols, ...upstreamMeta]);\n })\n .output(\"propertiesPfCols\", (ctx): PColumnIdAndSpec[] | undefined => {\n const pCols = ctx.outputs?.resolve(\"propertiesPf\")?.getPColumns();\n if (pCols === undefined) return undefined;\n return pCols.map((c) => ({ columnId: c.id, spec: c.spec }) satisfies PColumnIdAndSpec);\n })\n .title(() => \"Sequence Properties\")\n .subtitle((ctx) => ctx.data.defaultBlockLabel ?? \"\")\n .sections(() => [\n { type: \"link\" as const, href: \"/\" as const, label: \"Main\" },\n { type: \"link\" as const, href: \"/scatter\" as const, label: \"Scatterplot\" },\n { type: \"link\" as const, href: \"/histogram\" as const, label: \"Histogram\" },\n ])\n .done();\n\nexport type BlockOutputs = InferOutputsType<typeof platforma>;\n"],"mappings":";;;AAkBA,MAAM,mBAAmB;CAEvB;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,sBAAsB,CAAC;EACpE,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CAED;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,uBAAuB,CAAC;EACrE,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CACD;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,4BAA4B,CAAC;EAC1E,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CAED;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,EAAE,MAAM,8BAA8B,CAAC;EAC5E,aAAa,EAAE,oBAAoB,QAAQ;EAC5C;CACF;AAED,MAAa,YAAY,aAAa,OAAO,eAAe,CACzD,MAAiB,SAAS;AACzB,KAAI,KAAK,gBAAgB,KAAA,EACvB,OAAM,IAAI,MAAM,0BAA0B;AAE5C,QAAO,EACL,aAAa,KAAK,aACnB;EACD,CACD,OAAO,iBAAiB,QACvB,IAAI,WAAW,WAAW,kBAAkB,EAAE,qBAAqB,MAAM,CAAC,CAC3E,CACA,OAAO,cAAc,QACpB,IAAI,KAAK,cAAc,IAAI,WAAW,oBAAoB,IAAI,KAAK,YAAY,GAAG,KA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