@platforma-open/milaboratories.immune-assay-data.model 1.0.1 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.immune-assay-data.model",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Block model",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
package/src/index.ts CHANGED
@@ -12,7 +12,8 @@ import {
12
12
 
13
13
  type Settings = {
14
14
  coverageThreshold: number; // fraction of aligned residues required
15
- coverageMode: 0 | 1 | 2 | 3 | 4 | 5; // MMseqs2 coverage modes
15
+ identity: number;
16
+ similarityType: 'sequence-identity' | 'alignment-score';
16
17
  };
17
18
 
18
19
  export type ImportColumnInfo = {
@@ -29,6 +30,7 @@ export type BlockArgs = {
29
30
  fileExtension?: string;
30
31
  importColumns?: ImportColumnInfo[];
31
32
  sequenceColumnHeader?: string;
33
+ selectedColumns: string[];
32
34
  settings: Settings;
33
35
  };
34
36
 
@@ -42,9 +44,11 @@ export const model = BlockModel.create()
42
44
 
43
45
  .withArgs<BlockArgs>({
44
46
  settings: {
45
- coverageMode: 2, // default to coverage of clone,
46
47
  coverageThreshold: 0.95, // default value matching MMseqs2 default
48
+ identity: 0.9,
49
+ similarityType: 'alignment-score',
47
50
  },
51
+ selectedColumns: [],
48
52
  })
49
53
 
50
54
  .withUiState<UiState>({
@@ -126,6 +130,9 @@ export const model = BlockModel.create()
126
130
  )
127
131
 
128
132
  .output('table', (ctx) => {
133
+ if (ctx.outputs?.resolve('emptyResults')?.getDataAsJson<boolean>()) {
134
+ return undefined;
135
+ }
129
136
  const cols = ctx.outputs?.resolve('table')?.getPColumns();
130
137
  if (cols === undefined)
131
138
  return undefined;