@platforma-open/milaboratories.humanization-score.model 0.3.1 → 0.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.humanization-score.model",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Block model",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -6,10 +6,8 @@ import type {
6
6
  PlRef,
7
7
  } from '@platforma-sdk/model';
8
8
  import {
9
- ArrayColumnProvider,
10
9
  BlockModelV3,
11
- DataModelBuilder,
12
- createPFrameForGraphs,
10
+ DataModelBuilder, createPFrameForGraphs,
13
11
  createPlDataTableStateV2,
14
12
  createPlDataTableV3,
15
13
  } from '@platforma-sdk/model';
@@ -104,21 +102,21 @@ export const platforma = BlockModelV3.create(dataModel)
104
102
  if (pCols === undefined) {
105
103
  return undefined;
106
104
  }
105
+
106
+ const anchorCol = pCols[0];
107
+ if (anchorCol === undefined) {
108
+ return undefined;
109
+ }
110
+
107
111
  return createPlDataTableV3(ctx, {
108
112
  tableState: ctx.data.tableState,
109
- columns: new ArrayColumnProvider(pCols)
110
- .getAllColumns()
111
- .map((column) => ({ column, isPrimary: true })),
113
+ columns: {
114
+ anchors: { main: anchorCol.spec },
115
+ selector: { mode: 'enrichment' },
116
+ },
112
117
  });
113
118
  })
114
119
 
115
- // --- Score distribution (histogram) ---------------------------------------
116
- // One row per clonotype, so the histogram counts UNIQUE clonotypes by humanness
117
- // score — it is deliberately NOT weighted by clonotype abundance. The question it
118
- // answers is "how many distinct candidates sit below/above a humanness level"
119
- // (i.e. how much humanization work is there), not "how human is the repertoire by
120
- // read mass". No human-like threshold line is drawn: this score is a 9-mer
121
- // fraction rescaled to 0..100, not a cutoff validated against therapeutic mAbs.
122
120
  .outputWithStatus('histogramPf', (ctx): PFrameHandle | undefined => {
123
121
  const pCols = ctx.outputs?.resolve('outputHumanness')?.getPColumns();
124
122
  if (pCols === undefined) return undefined;