@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 @@
|
|
|
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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAAA,uBAAA,CAAA,sBAAA;AAAA,KAmEV,YAAA,GAAe,gBAAA,QAAwB,SAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { blockDataModel } from "./dataModel.js";
|
|
2
|
+
import { Annotation, ArrayColumnProvider, BlockModelV3, createPlDataTableV3 } from "@platforma-sdk/model";
|
|
3
|
+
//#region src/index.ts
|
|
4
|
+
const inputAnchorSpecs = [
|
|
5
|
+
{
|
|
6
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/variantKey" }],
|
|
7
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/cloneId" }],
|
|
11
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/clonotypeKey" }],
|
|
15
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
axes: [{ name: "pl7.app/sampleId" }, { name: "pl7.app/vdj/scClonotypeKey" }],
|
|
19
|
+
annotations: { "pl7.app/isAnchor": "true" }
|
|
20
|
+
}
|
|
21
|
+
];
|
|
22
|
+
const platforma = BlockModelV3.create(blockDataModel).args((data) => {
|
|
23
|
+
if (data.inputAnchor === void 0) throw new Error("Select an input dataset");
|
|
24
|
+
return { inputAnchor: data.inputAnchor };
|
|
25
|
+
}).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) => {
|
|
26
|
+
if (ctx.data.inputAnchor === void 0) return void 0;
|
|
27
|
+
const ownCols = ctx.outputs?.resolve("propertiesPf")?.getPColumns();
|
|
28
|
+
if (ownCols === void 0) return void 0;
|
|
29
|
+
const sources = [new ArrayColumnProvider(ctx.resultPool.selectColumns((spec) => !spec.annotations?.[Annotation.Trace]?.includes("milaboratories.sequence-properties"))), new ArrayColumnProvider(ownCols)];
|
|
30
|
+
return createPlDataTableV3(ctx, {
|
|
31
|
+
tableState: ctx.data.tableState,
|
|
32
|
+
columns: {
|
|
33
|
+
sources,
|
|
34
|
+
anchors: { main: ctx.data.inputAnchor },
|
|
35
|
+
selector: { mode: "enrichment" }
|
|
36
|
+
},
|
|
37
|
+
displayOptions: { visibility: [{
|
|
38
|
+
match: (spec) => !spec.annotations?.[Annotation.Trace]?.includes("milaboratories.sequence-properties") && spec.annotations?.["pl7.app/isLinkerColumn"] !== "true",
|
|
39
|
+
visibility: "optional"
|
|
40
|
+
}] }
|
|
41
|
+
});
|
|
42
|
+
}).title(() => "Sequence Properties").subtitle((ctx) => ctx.data.defaultBlockLabel ?? "").sections(() => [{
|
|
43
|
+
type: "link",
|
|
44
|
+
href: "/",
|
|
45
|
+
label: "Main"
|
|
46
|
+
}]).done();
|
|
47
|
+
//#endregion
|
|
48
|
+
export { blockDataModel, platforma };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,KA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