@platforma-open/milaboratories.repertoire-diversity-2.model 1.5.3 → 1.5.5

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.
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ const convertMetricsUiToArgs = (metrics) => {
4
+ return metrics.map((metric) => {
5
+ return {
6
+ type: metric.type,
7
+ downsampling: metric.downsampling,
8
+ };
9
+ });
10
+ };
11
+
12
+ exports.convertMetricsUiToArgs = convertMetricsUiToArgs;
13
+ //# sourceMappingURL=converters.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"converters.cjs","sources":["../src/converters.ts"],"sourcesContent":["import type { Metric, MetricUI } from './index';\n\nexport const convertMetricsUiToArgs = (metrics: MetricUI[]): Metric[] => {\n return metrics.map((metric): Metric => {\n return {\n type: metric.type,\n downsampling: metric.downsampling,\n };\n });\n};\n"],"names":[],"mappings":";;AAEO,MAAM,sBAAsB,GAAG,CAAC,OAAmB,KAAc;AACtE,IAAA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,KAAY;QACpC,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,YAAY,EAAE,MAAM,CAAC,YAAY;SAClC;AACH,IAAA,CAAC,CAAC;AACJ;;;;"}
@@ -0,0 +1,3 @@
1
+ import type { Metric, MetricUI } from './index';
2
+ export declare const convertMetricsUiToArgs: (metrics: MetricUI[]) => Metric[];
3
+ //# sourceMappingURL=converters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"converters.d.ts","sourceRoot":"","sources":["../src/converters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,sBAAsB,YAAa,QAAQ,EAAE,KAAG,MAAM,EAOlE,CAAC"}
@@ -0,0 +1,11 @@
1
+ const convertMetricsUiToArgs = (metrics) => {
2
+ return metrics.map((metric) => {
3
+ return {
4
+ type: metric.type,
5
+ downsampling: metric.downsampling,
6
+ };
7
+ });
8
+ };
9
+
10
+ export { convertMetricsUiToArgs };
11
+ //# sourceMappingURL=converters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"converters.js","sources":["../src/converters.ts"],"sourcesContent":["import type { Metric, MetricUI } from './index';\n\nexport const convertMetricsUiToArgs = (metrics: MetricUI[]): Metric[] => {\n return metrics.map((metric): Metric => {\n return {\n type: metric.type,\n downsampling: metric.downsampling,\n };\n });\n};\n"],"names":[],"mappings":"AAEO,MAAM,sBAAsB,GAAG,CAAC,OAAmB,KAAc;AACtE,IAAA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,KAAY;QACpC,OAAO;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,YAAY,EAAE,MAAM,CAAC,YAAY;SAClC;AACH,IAAA,CAAC,CAAC;AACJ;;;;"}
package/dist/index.cjs CHANGED
@@ -1,121 +1,115 @@
1
1
  'use strict';
2
2
 
3
3
  var model$1 = require('@platforma-sdk/model');
4
+ var converters = require('./converters.cjs');
4
5
 
5
- // src/index.ts
6
-
7
- // src/converters.ts
8
- var convertMetricsUiToArgs = (metrics) => {
9
- return metrics.map((metric) => {
10
- return {
11
- type: metric.type,
12
- downsampling: metric.downsampling
13
- };
14
- });
15
- };
16
-
17
- // src/index.ts
18
- var model = model$1.BlockModel.create().withArgs({
19
- metrics: []
20
- }).withUiState({
21
- blockTitle: "Repertoire Diversity",
22
- graphState: {
23
- title: "Repertoire Diversity",
24
- template: "bar",
25
- currentTab: null
26
- },
27
- tableState: model$1.createPlDataTableStateV2(),
28
- metrics: [
29
- {
30
- id: "observed",
31
- type: "observed",
32
- downsampling: {
33
- type: "hypergeometric",
34
- valueChooser: "auto"
35
- },
36
- isExpanded: false
37
- },
38
- {
39
- id: "shannonWiener",
40
- type: "shannonWiener",
41
- downsampling: {
42
- type: "hypergeometric",
43
- valueChooser: "auto"
44
- },
45
- isExpanded: false
6
+ const model = model$1.BlockModel.create()
7
+ .withArgs({
8
+ metrics: [],
9
+ })
10
+ .withUiState({
11
+ blockTitle: 'Repertoire Diversity',
12
+ graphState: {
13
+ title: 'Repertoire Diversity',
14
+ template: 'bar',
15
+ currentTab: null,
46
16
  },
47
- {
48
- id: "chao1",
49
- type: "chao1",
50
- downsampling: {
51
- type: "hypergeometric",
52
- valueChooser: "auto"
53
- },
54
- isExpanded: false
17
+ tableState: model$1.createPlDataTableStateV2(),
18
+ metrics: [
19
+ {
20
+ id: 'observed',
21
+ type: 'observed',
22
+ downsampling: {
23
+ type: 'hypergeometric',
24
+ valueChooser: 'auto',
25
+ },
26
+ isExpanded: false,
27
+ },
28
+ {
29
+ id: 'shannonWiener',
30
+ type: 'shannonWiener',
31
+ downsampling: {
32
+ type: 'hypergeometric',
33
+ valueChooser: 'auto',
34
+ },
35
+ isExpanded: false,
36
+ },
37
+ {
38
+ id: 'chao1',
39
+ type: 'chao1',
40
+ downsampling: {
41
+ type: 'hypergeometric',
42
+ valueChooser: 'auto',
43
+ },
44
+ isExpanded: false,
45
+ },
46
+ {
47
+ id: 'gini',
48
+ type: 'gini',
49
+ downsampling: {
50
+ type: 'hypergeometric',
51
+ valueChooser: 'auto',
52
+ },
53
+ isExpanded: false,
54
+ },
55
+ {
56
+ id: 'd50',
57
+ type: 'd50',
58
+ downsampling: {
59
+ type: 'hypergeometric',
60
+ valueChooser: 'auto',
61
+ },
62
+ isExpanded: false,
63
+ },
64
+ ],
65
+ })
66
+ .argsValid((ctx) => ctx.args.abundanceRef !== undefined
67
+ && ctx.args.metrics.every((metric) => metric.type !== undefined))
68
+ .output('abundanceOptions', (ctx) => ctx.resultPool.getOptions([{
69
+ axes: [
70
+ { name: 'pl7.app/sampleId' },
71
+ {},
72
+ ],
73
+ annotations: {
74
+ 'pl7.app/isAbundance': 'true',
75
+ 'pl7.app/abundance/normalized': 'false',
76
+ 'pl7.app/abundance/isPrimary': 'true',
77
+ },
55
78
  },
56
- {
57
- id: "gini",
58
- type: "gini",
59
- downsampling: {
60
- type: "hypergeometric",
61
- valueChooser: "auto"
62
- },
63
- isExpanded: false
64
- },
65
- {
66
- id: "d50",
67
- type: "d50",
68
- downsampling: {
69
- type: "hypergeometric",
70
- valueChooser: "auto"
71
- },
72
- isExpanded: false
79
+ ]))
80
+ .outputWithStatus('pt', (ctx) => {
81
+ const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
82
+ if (pCols === undefined) {
83
+ return undefined;
84
+ }
85
+ return model$1.createPlDataTableV2(ctx, pCols, ctx.uiState.tableState);
86
+ })
87
+ .outputWithStatus('pf', (ctx) => {
88
+ const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
89
+ if (pCols === undefined) {
90
+ return undefined;
73
91
  }
74
- ]
75
- }).argsValid((ctx) => ctx.args.abundanceRef !== void 0 && ctx.args.metrics.every((metric) => metric.type !== void 0)).output(
76
- "abundanceOptions",
77
- (ctx) => ctx.resultPool.getOptions([
78
- {
79
- axes: [
80
- { name: "pl7.app/sampleId" },
81
- {}
82
- ],
83
- annotations: {
84
- "pl7.app/isAbundance": "true",
85
- "pl7.app/abundance/normalized": "false",
86
- "pl7.app/abundance/isPrimary": "true"
87
- }
92
+ return model$1.createPFrameForGraphs(ctx, pCols);
93
+ })
94
+ // Return a list of Pcols for plot defaults
95
+ .output('pcols', (ctx) => {
96
+ const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
97
+ if (pCols === undefined || pCols.length === 0) {
98
+ return undefined;
88
99
  }
89
- ])
90
- ).output("pt", (ctx) => {
91
- const pCols = ctx.outputs?.resolve("pf")?.getPColumns();
92
- if (pCols === void 0) {
93
- return void 0;
94
- }
95
- return model$1.createPlDataTableV2(ctx, pCols, ctx.uiState.tableState);
96
- }).output("pf", (ctx) => {
97
- const pCols = ctx.outputs?.resolve("pf")?.getPColumns();
98
- if (pCols === void 0) {
99
- return void 0;
100
- }
101
- return model$1.createPFrameForGraphs(ctx, pCols);
102
- }).output("pcols", (ctx) => {
103
- const pCols = ctx.outputs?.resolve("pf")?.getPColumns();
104
- if (pCols === void 0 || pCols.length === 0) {
105
- return void 0;
106
- }
107
- return pCols.map(
108
- (c) => ({
109
- columnId: c.id,
110
- spec: c.spec
111
- })
112
- );
113
- }).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).title((ctx) => ctx.uiState?.blockTitle ?? "Repertoire Diversity").sections((_) => [
114
- { type: "link", href: "/", label: "Main" },
115
- { type: "link", href: "/diversityGraph", label: "Diversity Graph" }
116
- ]).done(2);
100
+ return pCols.map((c) => ({
101
+ columnId: c.id,
102
+ spec: c.spec,
103
+ }));
104
+ })
105
+ .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
106
+ .title((ctx) => ctx.uiState?.blockTitle ?? 'Repertoire Diversity')
107
+ .sections((_) => [
108
+ { type: 'link', href: '/', label: 'Main' },
109
+ { type: 'link', href: '/diversityGraph', label: 'Diversity Graph' },
110
+ ])
111
+ .done(2);
117
112
 
118
- exports.convertMetricsUiToArgs = convertMetricsUiToArgs;
113
+ exports.convertMetricsUiToArgs = converters.convertMetricsUiToArgs;
119
114
  exports.model = model;
120
115
  //# sourceMappingURL=index.cjs.map
121
- //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/converters.ts","../src/index.ts"],"names":["BlockModel","createPlDataTableStateV2","createPlDataTableV2","createPFrameForGraphs"],"mappings":";;;;;;;AAEa,IAAA,sBAAA,GAAyB,CAAC,OAAkC,KAAA;AACvE,EAAO,OAAA,OAAA,CAAQ,GAAI,CAAA,CAAC,MAAmB,KAAA;AACrC,IAAO,OAAA;AAAA,MACL,MAAM,MAAO,CAAA,IAAA;AAAA,MACb,cAAc,MAAO,CAAA;AAAA,KACvB;AAAA,GACD,CAAA;AACH;;;AC2BO,IAAM,KAAQ,GAAAA,kBAAA,CAAW,MAAO,EAAA,CACpC,QAAoB,CAAA;AAAA,EACnB,SAAS;AACX,CAAC,EAEA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,MAAA,IAAa,KAAM,CAAA,MAAA,KAAW,CAAG,EAAA;AAC7C,IAAO,OAAA,MAAA;AAAA;AAGT,EAAA,OAAO,KAAM,CAAA,GAAA;AAAA,IACX,CAAC,CACE,MAAA;AAAA,MACC,UAAU,CAAE,CAAA,EAAA;AAAA,MACZ,MAAM,CAAE,CAAA;AAAA,KACV;AAAA,GACJ;AACF,CAAC,CAAA,CAEA,OAAO,WAAa,EAAA,CAAC,QAAQ,GAAI,CAAA,OAAA,EAAS,mBAAwB,KAAA,KAAK,EAEvE,KAAM,CAAA,CAAC,QAAQ,GAAI,CAAA,OAAA,EAAS,cAAc,sBAAsB,CAAA,CAEhE,QAAS,CAAA,CAAC,CAAM,KAAA;AAAA,EACf,EAAE,IAAM,EAAA,MAAA,EAAQ,IAAM,EAAA,GAAA,EAAK,OAAO,MAAO,EAAA;AAAA,EACzC,EAAE,IAAM,EAAA,MAAA,EAAQ,IAAM,EAAA,iBAAA,EAAmB,OAAO,iBAAkB;AACpE,CAAC,CAAA,CAEA,KAAK,CAAC","file":"index.cjs","sourcesContent":["import type { Metric, MetricUI } from './index';\n\nexport const convertMetricsUiToArgs = (metrics: MetricUI[]): Metric[] => {\n return metrics.map((metric): Metric => {\n return {\n type: metric.type,\n downsampling: metric.downsampling,\n };\n });\n};\n","import type { GraphMakerState } from '@milaboratories/graph-maker';\nimport type { InferOutputsType, PColumnIdAndSpec, PlDataTableStateV2, PlRef } from '@platforma-sdk/model';\nimport { BlockModel, createPFrameForGraphs, createPlDataTableStateV2, createPlDataTableV2 } from '@platforma-sdk/model';\n\nexport * from './converters';\n\nexport type DiversityType = 'chao1' | 'd50' | 'efronThisted' |\n 'observed' | 'shannonWienerIndex' | 'shannonWiener' |\n 'normalizedShannonWiener' | 'inverseSimpson' | 'gini';\n\nexport type Metric = {\n type: DiversityType | undefined;\n downsampling: {\n type?: 'none' | 'top' | 'cumtop' | 'hypergeometric' ;\n valueChooser?: 'min' | 'fixed' | 'max' | 'auto';\n n?: number;\n };\n};\n\nexport type MetricUI = Metric & {\n id: string;\n isExpanded?: boolean;\n};\n\nexport type BlockArgs = {\n abundanceRef?: PlRef;\n metrics: Metric[];\n};\n\nexport type UiState = {\n metrics: MetricUI[];\n blockTitle: string;\n tableState: PlDataTableStateV2;\n graphState: GraphMakerState;\n};\n\nexport const model = BlockModel.create()\n .withArgs<BlockArgs>({\n metrics: [],\n })\n\n .withUiState<UiState>({\n blockTitle: 'Repertoire Diversity',\n graphState: {\n title: 'Repertoire Diversity',\n template: 'bar',\n currentTab: null,\n },\n\n tableState: createPlDataTableStateV2(),\n\n metrics: [\n {\n id: 'observed',\n type: 'observed',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n {\n id: 'shannonWiener',\n type: 'shannonWiener',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n {\n id: 'chao1',\n type: 'chao1',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n {\n id: 'gini',\n type: 'gini',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n {\n id: 'd50',\n type: 'd50',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n ],\n })\n\n .argsValid((ctx) => ctx.args.abundanceRef !== undefined\n && ctx.args.metrics.every((metric) => metric.type !== undefined))\n\n .output('abundanceOptions', (ctx) =>\n ctx.resultPool.getOptions([{\n axes: [\n { name: 'pl7.app/sampleId' },\n { },\n ],\n annotations: {\n 'pl7.app/isAbundance': 'true',\n 'pl7.app/abundance/normalized': 'false',\n 'pl7.app/abundance/isPrimary': 'true',\n },\n },\n ]),\n )\n\n .output('pt', (ctx) => {\n const pCols = ctx.outputs?.resolve('pf')?.getPColumns();\n if (pCols === undefined) {\n return undefined;\n }\n\n return createPlDataTableV2(ctx, pCols, ctx.uiState.tableState);\n })\n\n .output('pf', (ctx) => {\n const pCols = ctx.outputs?.resolve('pf')?.getPColumns();\n if (pCols === undefined) {\n return undefined;\n }\n\n return createPFrameForGraphs(ctx, pCols);\n })\n\n // Return a list of Pcols for plot defaults\n .output('pcols', (ctx) => {\n const pCols = ctx.outputs?.resolve('pf')?.getPColumns();\n\n if (pCols === undefined || pCols.length === 0) {\n return undefined;\n }\n\n return pCols.map(\n (c) =>\n ({\n columnId: c.id,\n spec: c.spec,\n } satisfies PColumnIdAndSpec),\n );\n })\n\n .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n\n .title((ctx) => ctx.uiState?.blockTitle ?? 'Repertoire Diversity')\n\n .sections((_) => [\n { type: 'link', href: '/', label: 'Main' },\n { type: 'link', href: '/diversityGraph', label: 'Diversity Graph' },\n ])\n\n .done(2);\n\nexport type BlockOutputs = InferOutputsType<typeof model>;\n"]}
1
+ {"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { GraphMakerState } from '@milaboratories/graph-maker';\nimport type { InferOutputsType, PColumnIdAndSpec, PlDataTableStateV2, PlRef } from '@platforma-sdk/model';\nimport { BlockModel, createPFrameForGraphs, createPlDataTableStateV2, createPlDataTableV2 } from '@platforma-sdk/model';\n\nexport * from './converters';\n\nexport type DiversityType = 'chao1' | 'd50' | 'efronThisted' |\n 'observed' | 'shannonWienerIndex' | 'shannonWiener' |\n 'normalizedShannonWiener' | 'inverseSimpson' | 'gini';\n\nexport type Metric = {\n type: DiversityType | undefined;\n downsampling: {\n type?: 'none' | 'top' | 'cumtop' | 'hypergeometric' ;\n valueChooser?: 'min' | 'fixed' | 'max' | 'auto';\n n?: number;\n };\n};\n\nexport type MetricUI = Metric & {\n id: string;\n isExpanded?: boolean;\n};\n\nexport type BlockArgs = {\n abundanceRef?: PlRef;\n metrics: Metric[];\n};\n\nexport type UiState = {\n metrics: MetricUI[];\n blockTitle: string;\n tableState: PlDataTableStateV2;\n graphState: GraphMakerState;\n};\n\nexport const model = BlockModel.create()\n .withArgs<BlockArgs>({\n metrics: [],\n })\n\n .withUiState<UiState>({\n blockTitle: 'Repertoire Diversity',\n graphState: {\n title: 'Repertoire Diversity',\n template: 'bar',\n currentTab: null,\n },\n\n tableState: createPlDataTableStateV2(),\n\n metrics: [\n {\n id: 'observed',\n type: 'observed',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n {\n id: 'shannonWiener',\n type: 'shannonWiener',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n {\n id: 'chao1',\n type: 'chao1',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n {\n id: 'gini',\n type: 'gini',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n {\n id: 'd50',\n type: 'd50',\n downsampling: {\n type: 'hypergeometric',\n valueChooser: 'auto',\n },\n isExpanded: false,\n },\n ],\n })\n\n .argsValid((ctx) => ctx.args.abundanceRef !== undefined\n && ctx.args.metrics.every((metric) => metric.type !== undefined))\n\n .output('abundanceOptions', (ctx) =>\n ctx.resultPool.getOptions([{\n axes: [\n { name: 'pl7.app/sampleId' },\n { },\n ],\n annotations: {\n 'pl7.app/isAbundance': 'true',\n 'pl7.app/abundance/normalized': 'false',\n 'pl7.app/abundance/isPrimary': 'true',\n },\n },\n ]),\n )\n\n .outputWithStatus('pt', (ctx) => {\n const pCols = ctx.outputs?.resolve('pf')?.getPColumns();\n if (pCols === undefined) {\n return undefined;\n }\n\n return createPlDataTableV2(ctx, pCols, ctx.uiState.tableState);\n })\n\n .outputWithStatus('pf', (ctx) => {\n const pCols = ctx.outputs?.resolve('pf')?.getPColumns();\n if (pCols === undefined) {\n return undefined;\n }\n\n return createPFrameForGraphs(ctx, pCols);\n })\n\n // Return a list of Pcols for plot defaults\n .output('pcols', (ctx) => {\n const pCols = ctx.outputs?.resolve('pf')?.getPColumns();\n\n if (pCols === undefined || pCols.length === 0) {\n return undefined;\n }\n\n return pCols.map(\n (c) =>\n ({\n columnId: c.id,\n spec: c.spec,\n } satisfies PColumnIdAndSpec),\n );\n })\n\n .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n\n .title((ctx) => ctx.uiState?.blockTitle ?? 'Repertoire Diversity')\n\n .sections((_) => [\n { type: 'link', href: '/', label: 'Main' },\n { type: 'link', href: '/diversityGraph', label: 'Diversity Graph' },\n ])\n\n .done(2);\n\nexport type BlockOutputs = InferOutputsType<typeof model>;\n"],"names":["BlockModel","createPlDataTableStateV2","createPlDataTableV2","createPFrameForGraphs"],"mappings":";;;;;AAoCO,MAAM,KAAK,GAAGA,kBAAU,CAAC,MAAM;AACnC,KAAA,QAAQ,CAAY;AACnB,IAAA,OAAO,EAAE,EAAE;CACZ;AAEA,KAAA,WAAW,CAAU;AACpB,IAAA,UAAU,EAAE,sBAAsB;AAClC,IAAA,UAAU,EAAE;AACV,QAAA,KAAK,EAAE,sBAAsB;AAC7B,QAAA,QAAQ,EAAE,KAAK;AACf,QAAA,UAAU,EAAE,IAAI;AACjB,KAAA;IAED,UAAU,EAAEC,gCAAwB,EAAE;AAEtC,IAAA,OAAO,EAAE;AACP,QAAA;AACE,YAAA,EAAE,EAAE,UAAU;AACd,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,YAAY,EAAE;AACZ,gBAAA,IAAI,EAAE,gBAAgB;AACtB,gBAAA,YAAY,EAAE,MAAM;AACrB,aAAA;AACD,YAAA,UAAU,EAAE,KAAK;AAClB,SAAA;AACD,QAAA;AACE,YAAA,EAAE,EAAE,eAAe;AACnB,YAAA,IAAI,EAAE,eAAe;AACrB,YAAA,YAAY,EAAE;AACZ,gBAAA,IAAI,EAAE,gBAAgB;AACtB,gBAAA,YAAY,EAAE,MAAM;AACrB,aAAA;AACD,YAAA,UAAU,EAAE,KAAK;AAClB,SAAA;AACD,QAAA;AACE,YAAA,EAAE,EAAE,OAAO;AACX,YAAA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AAG,EAAE,KAAK,EAAE,MAAM,EAAE;IAC1C,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;CACpE;KAEA,IAAI,CAAC,CAAC;;;;;"}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,8 @@
1
- import * as _platforma_sdk_model from '@platforma-sdk/model';
2
- import { PlRef, PlDataTableStateV2, InferOutputsType } from '@platforma-sdk/model';
3
- import { GraphMakerState } from '@milaboratories/graph-maker';
4
-
5
- declare const convertMetricsUiToArgs: (metrics: MetricUI[]) => Metric[];
6
-
7
- type DiversityType = 'chao1' | 'd50' | 'efronThisted' | 'observed' | 'shannonWienerIndex' | 'shannonWiener' | 'normalizedShannonWiener' | 'inverseSimpson' | 'gini';
8
- type Metric = {
1
+ import type { GraphMakerState } from '@milaboratories/graph-maker';
2
+ import type { InferOutputsType, PlDataTableStateV2, PlRef } from '@platforma-sdk/model';
3
+ export * from './converters';
4
+ export type DiversityType = 'chao1' | 'd50' | 'efronThisted' | 'observed' | 'shannonWienerIndex' | 'shannonWiener' | 'normalizedShannonWiener' | 'inverseSimpson' | 'gini';
5
+ export type Metric = {
9
6
  type: DiversityType | undefined;
10
7
  downsampling: {
11
8
  type?: 'none' | 'top' | 'cumtop' | 'hypergeometric';
@@ -13,22 +10,22 @@ type Metric = {
13
10
  n?: number;
14
11
  };
15
12
  };
16
- type MetricUI = Metric & {
13
+ export type MetricUI = Metric & {
17
14
  id: string;
18
15
  isExpanded?: boolean;
19
16
  };
20
- type BlockArgs = {
17
+ export type BlockArgs = {
21
18
  abundanceRef?: PlRef;
22
19
  metrics: Metric[];
23
20
  };
24
- type UiState = {
21
+ export type UiState = {
25
22
  metrics: MetricUI[];
26
23
  blockTitle: string;
27
24
  tableState: PlDataTableStateV2;
28
25
  graphState: GraphMakerState;
29
26
  };
30
- declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
31
- abundanceOptions: _platforma_sdk_model.ValueOrErrors<{
27
+ export declare const model: import("@platforma-sdk/model").PlatformaExtended<import("@platforma-sdk/model").PlatformaV2<BlockArgs, {
28
+ abundanceOptions: import("@platforma-sdk/model").OutputWithStatus<{
32
29
  readonly ref: {
33
30
  readonly __isRef: true;
34
31
  readonly blockId: string;
@@ -36,17 +33,22 @@ declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
36
33
  readonly requireEnrichments?: true | undefined;
37
34
  };
38
35
  readonly label: string;
39
- }[]>;
40
- pt: _platforma_sdk_model.ValueOrErrors<{
36
+ }[]> & {
37
+ __unwrap: true;
38
+ };
39
+ pt: import("@platforma-sdk/model").OutputWithStatus<{
41
40
  sourceId: string | null;
42
- fullTableHandle: _platforma_sdk_model.PTableHandle;
43
- visibleTableHandle: _platforma_sdk_model.PTableHandle;
44
- } | undefined>;
45
- pf: _platforma_sdk_model.ValueOrErrors<_platforma_sdk_model.PFrameHandle | undefined>;
46
- pcols: _platforma_sdk_model.ValueOrErrors<{
47
- columnId: _platforma_sdk_model.PObjectId;
41
+ fullTableHandle: import("@platforma-sdk/model").PTableHandle;
42
+ visibleTableHandle: import("@platforma-sdk/model").PTableHandle;
43
+ }> & {
44
+ __unwrap: false;
45
+ };
46
+ pf: import("@platforma-sdk/model").OutputWithStatus<import("@platforma-sdk/model").PFrameHandle> & {
47
+ __unwrap: false;
48
+ };
49
+ pcols: import("@platforma-sdk/model").OutputWithStatus<{
50
+ columnId: import("@platforma-sdk/model").PObjectId;
48
51
  spec: {
49
- readonly valueType: _platforma_sdk_model.ValueType;
50
52
  readonly kind: "PColumn";
51
53
  readonly name: string;
52
54
  readonly domain?: {
@@ -55,9 +57,10 @@ declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
55
57
  readonly annotations?: {
56
58
  [x: string]: string;
57
59
  } | undefined;
60
+ readonly valueType: "Int" | "Long" | "Float" | "Double" | "String" | "Bytes";
58
61
  readonly parentAxes?: number[] | undefined;
59
62
  readonly axesSpec: {
60
- readonly type: _platforma_sdk_model.ValueType;
63
+ readonly type: import("@platforma-sdk/model").ValueType;
61
64
  readonly name: string;
62
65
  readonly domain?: {
63
66
  [x: string]: string;
@@ -68,9 +71,12 @@ declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
68
71
  readonly parentAxes?: number[] | undefined;
69
72
  }[];
70
73
  };
71
- }[] | undefined>;
72
- isRunning: _platforma_sdk_model.ValueOrErrors<boolean>;
73
- }, UiState, "/" | "/diversityGraph">;
74
- type BlockOutputs = InferOutputsType<typeof model>;
75
-
76
- export { type BlockArgs, type BlockOutputs, type DiversityType, type Metric, type MetricUI, type UiState, convertMetricsUiToArgs, model };
74
+ }[] | undefined> & {
75
+ __unwrap: true;
76
+ };
77
+ isRunning: import("@platforma-sdk/model").OutputWithStatus<boolean> & {
78
+ __unwrap: true;
79
+ };
80
+ }, UiState, "/" | "/diversityGraph">>;
81
+ export type BlockOutputs = InferOutputsType<typeof model>;
82
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAoB,kBAAkB,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAG1G,cAAc,cAAc,CAAC;AAE7B,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,KAAK,GAAG,cAAc,GAC1D,UAAU,GAAG,oBAAoB,GAAG,eAAe,GACnD,yBAAyB,GAAG,gBAAgB,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,YAAY,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,gBAAgB,CAAE;QACrD,YAAY,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;QAChD,CAAC,CAAC,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,kBAAkB,CAAC;IAC/B,UAAU,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA8HR,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,KAAK,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -1,118 +1,112 @@
1
1
  import { BlockModel, createPlDataTableStateV2, createPlDataTableV2, createPFrameForGraphs } from '@platforma-sdk/model';
2
+ export { convertMetricsUiToArgs } from './converters.js';
2
3
 
3
- // src/index.ts
4
-
5
- // src/converters.ts
6
- var convertMetricsUiToArgs = (metrics) => {
7
- return metrics.map((metric) => {
8
- return {
9
- type: metric.type,
10
- downsampling: metric.downsampling
11
- };
12
- });
13
- };
14
-
15
- // src/index.ts
16
- var model = BlockModel.create().withArgs({
17
- metrics: []
18
- }).withUiState({
19
- blockTitle: "Repertoire Diversity",
20
- graphState: {
21
- title: "Repertoire Diversity",
22
- template: "bar",
23
- currentTab: null
24
- },
25
- tableState: createPlDataTableStateV2(),
26
- metrics: [
27
- {
28
- id: "observed",
29
- type: "observed",
30
- downsampling: {
31
- type: "hypergeometric",
32
- valueChooser: "auto"
33
- },
34
- isExpanded: false
35
- },
36
- {
37
- id: "shannonWiener",
38
- type: "shannonWiener",
39
- downsampling: {
40
- type: "hypergeometric",
41
- valueChooser: "auto"
42
- },
43
- isExpanded: false
4
+ const model = BlockModel.create()
5
+ .withArgs({
6
+ metrics: [],
7
+ })
8
+ .withUiState({
9
+ blockTitle: 'Repertoire Diversity',
10
+ graphState: {
11
+ title: 'Repertoire Diversity',
12
+ template: 'bar',
13
+ currentTab: null,
44
14
  },
45
- {
46
- id: "chao1",
47
- type: "chao1",
48
- downsampling: {
49
- type: "hypergeometric",
50
- valueChooser: "auto"
51
- },
52
- isExpanded: false
15
+ tableState: createPlDataTableStateV2(),
16
+ metrics: [
17
+ {
18
+ id: 'observed',
19
+ type: 'observed',
20
+ downsampling: {
21
+ type: 'hypergeometric',
22
+ valueChooser: 'auto',
23
+ },
24
+ isExpanded: false,
25
+ },
26
+ {
27
+ id: 'shannonWiener',
28
+ type: 'shannonWiener',
29
+ downsampling: {
30
+ type: 'hypergeometric',
31
+ valueChooser: 'auto',
32
+ },
33
+ isExpanded: false,
34
+ },
35
+ {
36
+ id: 'chao1',
37
+ type: 'chao1',
38
+ downsampling: {
39
+ type: 'hypergeometric',
40
+ valueChooser: 'auto',
41
+ },
42
+ isExpanded: false,
43
+ },
44
+ {
45
+ id: 'gini',
46
+ type: 'gini',
47
+ downsampling: {
48
+ type: 'hypergeometric',
49
+ valueChooser: 'auto',
50
+ },
51
+ isExpanded: false,
52
+ },
53
+ {
54
+ id: 'd50',
55
+ type: 'd50',
56
+ downsampling: {
57
+ type: 'hypergeometric',
58
+ valueChooser: 'auto',
59
+ },
60
+ isExpanded: false,
61
+ },
62
+ ],
63
+ })
64
+ .argsValid((ctx) => ctx.args.abundanceRef !== undefined
65
+ && ctx.args.metrics.every((metric) => metric.type !== undefined))
66
+ .output('abundanceOptions', (ctx) => ctx.resultPool.getOptions([{
67
+ axes: [
68
+ { name: 'pl7.app/sampleId' },
69
+ {},
70
+ ],
71
+ annotations: {
72
+ 'pl7.app/isAbundance': 'true',
73
+ 'pl7.app/abundance/normalized': 'false',
74
+ 'pl7.app/abundance/isPrimary': 'true',
75
+ },
53
76
  },
54
- {
55
- id: "gini",
56
- type: "gini",
57
- downsampling: {
58
- type: "hypergeometric",
59
- valueChooser: "auto"
60
- },
61
- isExpanded: false
62
- },
63
- {
64
- id: "d50",
65
- type: "d50",
66
- downsampling: {
67
- type: "hypergeometric",
68
- valueChooser: "auto"
69
- },
70
- isExpanded: false
77
+ ]))
78
+ .outputWithStatus('pt', (ctx) => {
79
+ const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
80
+ if (pCols === undefined) {
81
+ return undefined;
82
+ }
83
+ return createPlDataTableV2(ctx, pCols, ctx.uiState.tableState);
84
+ })
85
+ .outputWithStatus('pf', (ctx) => {
86
+ const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
87
+ if (pCols === undefined) {
88
+ return undefined;
71
89
  }
72
- ]
73
- }).argsValid((ctx) => ctx.args.abundanceRef !== void 0 && ctx.args.metrics.every((metric) => metric.type !== void 0)).output(
74
- "abundanceOptions",
75
- (ctx) => ctx.resultPool.getOptions([
76
- {
77
- axes: [
78
- { name: "pl7.app/sampleId" },
79
- {}
80
- ],
81
- annotations: {
82
- "pl7.app/isAbundance": "true",
83
- "pl7.app/abundance/normalized": "false",
84
- "pl7.app/abundance/isPrimary": "true"
85
- }
90
+ return createPFrameForGraphs(ctx, pCols);
91
+ })
92
+ // Return a list of Pcols for plot defaults
93
+ .output('pcols', (ctx) => {
94
+ const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
95
+ if (pCols === undefined || pCols.length === 0) {
96
+ return undefined;
86
97
  }
87
- ])
88
- ).output("pt", (ctx) => {
89
- const pCols = ctx.outputs?.resolve("pf")?.getPColumns();
90
- if (pCols === void 0) {
91
- return void 0;
92
- }
93
- return createPlDataTableV2(ctx, pCols, ctx.uiState.tableState);
94
- }).output("pf", (ctx) => {
95
- const pCols = ctx.outputs?.resolve("pf")?.getPColumns();
96
- if (pCols === void 0) {
97
- return void 0;
98
- }
99
- return createPFrameForGraphs(ctx, pCols);
100
- }).output("pcols", (ctx) => {
101
- const pCols = ctx.outputs?.resolve("pf")?.getPColumns();
102
- if (pCols === void 0 || pCols.length === 0) {
103
- return void 0;
104
- }
105
- return pCols.map(
106
- (c) => ({
107
- columnId: c.id,
108
- spec: c.spec
109
- })
110
- );
111
- }).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).title((ctx) => ctx.uiState?.blockTitle ?? "Repertoire Diversity").sections((_) => [
112
- { type: "link", href: "/", label: "Main" },
113
- { type: "link", href: "/diversityGraph", label: "Diversity Graph" }
114
- ]).done(2);
98
+ return pCols.map((c) => ({
99
+ columnId: c.id,
100
+ spec: c.spec,
101
+ }));
102
+ })
103
+ .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
104
+ .title((ctx) => ctx.uiState?.blockTitle ?? 'Repertoire Diversity')
105
+ .sections((_) => [
106
+ { type: 'link', href: '/', label: 'Main' },
107
+ { type: 'link', href: '/diversityGraph', label: 'Diversity Graph' },
108
+ ])
109
+ .done(2);
115
110
 
116
- export { convertMetricsUiToArgs, model };
111
+ export { model };
117
112
  //# sourceMappingURL=index.js.map
118
- //# sourceMappingURL=index.js.map