@platforma-open/milaboratories.sequence-properties.model 1.1.1
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/.oxfmtrc.json +3 -0
- package/.oxlintrc.json +3 -0
- package/.turbo/turbo-build.log +28 -0
- package/.turbo/turbo-check.log +19 -0
- package/CHANGELOG.md +35 -0
- package/dist/bundle.js +10015 -0
- package/dist/bundle.js.map +1 -0
- package/dist/dataModel.cjs +7 -0
- package/dist/dataModel.cjs.map +1 -0
- package/dist/dataModel.d.ts +8 -0
- package/dist/dataModel.d.ts.map +1 -0
- package/dist/dataModel.js +7 -0
- package/dist/dataModel.js.map +1 -0
- package/dist/index.cjs +52 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +1713 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/dist/model.json +1 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +35 -0
- package/src/dataModel.ts +6 -0
- package/src/index.ts +103 -0
- package/src/types.ts +29 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
let _platforma_sdk_model = require("@platforma-sdk/model");
|
|
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)() }));
|
|
4
|
+
//#endregion
|
|
5
|
+
exports.blockDataModel = blockDataModel;
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=dataModel.cjs.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BlockData } from "./types.js";
|
|
2
|
+
import * as _$_platforma_sdk_model0 from "@platforma-sdk/model";
|
|
3
|
+
|
|
4
|
+
//#region src/dataModel.d.ts
|
|
5
|
+
declare const blockDataModel: _$_platforma_sdk_model0.DataModel<BlockData, {}>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { blockDataModel };
|
|
8
|
+
//# sourceMappingURL=dataModel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataModel.d.ts","names":[],"sources":["../src/dataModel.ts"],"mappings":";;;;cAGa,cAAA,EAAc,uBAAA,CAAA,SAAA,CAAA,SAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DataModelBuilder, createPlDataTableStateV2 } from "@platforma-sdk/model";
|
|
2
|
+
//#region src/dataModel.ts
|
|
3
|
+
const blockDataModel = new DataModelBuilder().from("Ver_2026_04_28").init(() => ({ tableState: createPlDataTableStateV2() }));
|
|
4
|
+
//#endregion
|
|
5
|
+
export { blockDataModel };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=dataModel.js.map
|
|
@@ -0,0 +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"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_dataModel = require("./dataModel.cjs");
|
|
3
|
+
let _platforma_sdk_model = require("@platforma-sdk/model");
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
const inputAnchorSpecs = [
|
|
6
|
+
{
|
|
7
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/variantKey" }],
|
|
8
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/cloneId" }],
|
|
12
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/clonotypeKey" }],
|
|
16
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/scClonotypeKey" }],
|
|
20
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
const platforma = _platforma_sdk_model.BlockModelV3.create(require_dataModel.blockDataModel).args((data) => {
|
|
24
|
+
if (data.inputAnchor === void 0) throw new Error("Select an input dataset");
|
|
25
|
+
return { inputAnchor: data.inputAnchor };
|
|
26
|
+
}).output("inputOptions", (ctx) => ctx.resultPool.getOptions(inputAnchorSpecs, { refsWithEnrichments: true })).output("inputSpec", (ctx) => ctx.data.inputAnchor ? ctx.resultPool.getPColumnSpecByRef(ctx.data.inputAnchor) : void 0).output("info", (ctx) => ctx.outputs?.resolve("info")?.getDataAsJson()).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).output("processingLog", (ctx) => ctx.outputs?.resolve("processingLog")?.getLogHandle()).outputWithStatus("propertiesTable", (ctx) => {
|
|
27
|
+
if (ctx.data.inputAnchor === void 0) return void 0;
|
|
28
|
+
const ownCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
|
|
29
|
+
if (ownCols === void 0) return void 0;
|
|
30
|
+
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
|
+
return (0, _platforma_sdk_model.createPlDataTableV3)(ctx, {
|
|
32
|
+
tableState: ctx.data.tableState,
|
|
33
|
+
columns: {
|
|
34
|
+
sources,
|
|
35
|
+
anchors: { main: ctx.data.inputAnchor },
|
|
36
|
+
selector: { mode: "enrichment" }
|
|
37
|
+
},
|
|
38
|
+
displayOptions: { visibility: [{
|
|
39
|
+
match: (spec) => !spec.annotations?.[_platforma_sdk_model.Annotation.Trace]?.includes("milaboratories.sequence-properties") && spec.annotations?.["pl7.app/isLinkerColumn"] !== "true",
|
|
40
|
+
visibility: "optional"
|
|
41
|
+
}] }
|
|
42
|
+
});
|
|
43
|
+
}).title(() => "Sequence Properties").subtitle((ctx) => ctx.data.defaultBlockLabel ?? "").sections(() => [{
|
|
44
|
+
type: "link",
|
|
45
|
+
href: "/",
|
|
46
|
+
label: "Main"
|
|
47
|
+
}]).done();
|
|
48
|
+
//#endregion
|
|
49
|
+
exports.blockDataModel = require_dataModel.blockDataModel;
|
|
50
|
+
exports.platforma = platforma;
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +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;CAED;EACE,MAAM,CAAC,EAAE,MAAM,oBAAoB,EAAE,E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