@platforma-open/milaboratories.vj-usage.model 2.1.3 → 2.1.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.
- package/.turbo/turbo-build.log +13 -28
- package/.turbo/turbo-lint.log +5 -0
- package/.turbo/turbo-type-check.log +6 -0
- package/CHANGELOG.md +12 -0
- package/dist/bundle.js +7818 -6865
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +75 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +24 -19
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +75 -73
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +24 -27
- package/src/index.ts +1 -1
- package/tsconfig.json +2 -14
- package/vitest.config.mts +8 -0
- package/dist/index.d.cts +0 -55
- package/vite.config.mts +0 -20
package/dist/index.cjs
CHANGED
|
@@ -2,81 +2,83 @@
|
|
|
2
2
|
|
|
3
3
|
var model$1 = require('@platforma-sdk/model');
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
5
|
+
const model = model$1.BlockModel.create()
|
|
6
|
+
.withArgs({
|
|
7
|
+
scChain: 'A',
|
|
8
|
+
allele: false,
|
|
9
|
+
})
|
|
10
|
+
.withUiState({
|
|
11
|
+
blockTitle: 'V/J Usage',
|
|
12
|
+
weightedFlag: true,
|
|
13
|
+
vUsagePlotState: {
|
|
14
|
+
title: 'V Usage',
|
|
15
|
+
template: 'heatmapClustered',
|
|
16
|
+
currentTab: 'settings',
|
|
17
|
+
layersSettings: {
|
|
18
|
+
heatmapClustered: {
|
|
19
|
+
normalizationDirection: null,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
jUsagePlotState: {
|
|
24
|
+
title: 'V Usage',
|
|
25
|
+
template: 'heatmapClustered',
|
|
26
|
+
currentTab: null,
|
|
27
|
+
layersSettings: {
|
|
28
|
+
heatmapClustered: {
|
|
29
|
+
normalizationDirection: null,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
vjUsagePlotState: {
|
|
34
|
+
title: 'V/J Usage',
|
|
35
|
+
template: 'heatmapClustered',
|
|
36
|
+
currentTab: null,
|
|
37
|
+
layersSettings: {
|
|
38
|
+
heatmapClustered: {
|
|
39
|
+
normalizationDirection: null,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
.argsValid((ctx) => ctx.args.datasetRef !== undefined)
|
|
45
|
+
.output('datasetOptions', (ctx) => ctx.resultPool.getOptions([{
|
|
46
|
+
axes: [
|
|
47
|
+
{ name: 'pl7.app/sampleId' },
|
|
48
|
+
{ name: 'pl7.app/vdj/clonotypeKey' },
|
|
49
|
+
],
|
|
50
|
+
annotations: { 'pl7.app/isAnchor': 'true' },
|
|
51
51
|
}, {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}],
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
axes: [
|
|
53
|
+
{ name: 'pl7.app/sampleId' },
|
|
54
|
+
{ name: 'pl7.app/vdj/scClonotypeKey' },
|
|
55
|
+
],
|
|
56
|
+
annotations: { 'pl7.app/isAnchor': 'true' },
|
|
57
|
+
}], {
|
|
58
|
+
// suppress native label of the column (e.g. "Number of Reads") to show only the dataset label
|
|
59
|
+
label: { includeNativeLabel: false },
|
|
60
|
+
}))
|
|
61
|
+
.output('datasetSpec', (ctx) => {
|
|
62
|
+
if (ctx.args.datasetRef === undefined) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
return ctx.resultPool.getPColumnSpecByRef(ctx.args.datasetRef);
|
|
66
|
+
})
|
|
67
|
+
.outputWithStatus('pf', (ctx) => {
|
|
68
|
+
const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
|
|
69
|
+
if (pCols === undefined) {
|
|
70
|
+
return undefined;
|
|
61
71
|
}
|
|
62
|
-
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
return model$1.createPFrameForGraphs(ctx, pCols);
|
|
74
|
-
}).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).title((ctx) => ctx.uiState?.blockTitle ?? "V/J Usage").sections((_) => [
|
|
75
|
-
{ type: "link", href: "/", label: "V Gene Usage" },
|
|
76
|
-
{ type: "link", href: "/jUsage", label: "J Gene Usage" },
|
|
77
|
-
{ type: "link", href: "/vjUsage", label: "V/J Gene Usage" }
|
|
78
|
-
]).done(2);
|
|
72
|
+
return model$1.createPFrameForGraphs(ctx, pCols);
|
|
73
|
+
})
|
|
74
|
+
.output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
|
|
75
|
+
.title((ctx) => ctx.uiState?.blockTitle ?? 'V/J Usage')
|
|
76
|
+
.sections((_) => [
|
|
77
|
+
{ type: 'link', href: '/', label: 'V Gene Usage' },
|
|
78
|
+
{ type: 'link', href: '/jUsage', label: 'J Gene Usage' },
|
|
79
|
+
{ type: 'link', href: '/vjUsage', label: 'V/J Gene Usage' },
|
|
80
|
+
])
|
|
81
|
+
.done(2);
|
|
79
82
|
|
|
80
83
|
exports.model = model;
|
|
81
84
|
//# sourceMappingURL=index.cjs.map
|
|
82
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import type { GraphMakerState } from '@milaboratories/graph-maker';\nimport type { InferOutputsType, PlRef } from '@platforma-sdk/model';\nimport { BlockModel, createPFrameForGraphs } from '@platforma-sdk/model';\n\nexport type BlockArgs = {\n datasetRef?: PlRef;\n scChain?: string;\n allele?: boolean;\n};\n\nexport type UiState = {\n blockTitle: string;\n weightedFlag: boolean;\n vUsagePlotState: GraphMakerState;\n jUsagePlotState: GraphMakerState;\n vjUsagePlotState: GraphMakerState;\n};\n\nexport const model = BlockModel.create()\n\n .withArgs<BlockArgs>({\n scChain: 'A',\n allele: false,\n })\n\n .withUiState<UiState>({\n blockTitle: 'V/J Usage',\n weightedFlag: true,\n vUsagePlotState: {\n title: 'V Usage',\n template: 'heatmapClustered',\n currentTab: 'settings',\n layersSettings: {\n heatmapClustered: {\n normalizationDirection: null,\n },\n },\n },\n jUsagePlotState: {\n title: 'V Usage',\n template: 'heatmapClustered',\n currentTab: null,\n layersSettings: {\n heatmapClustered: {\n normalizationDirection: null,\n },\n },\n },\n vjUsagePlotState: {\n title: 'V/J Usage',\n template: 'heatmapClustered',\n currentTab: null,\n layersSettings: {\n heatmapClustered: {\n normalizationDirection: null,\n },\n },\n },\n })\n\n .argsValid((ctx) => ctx.args.datasetRef !== undefined)\n\n .output('datasetOptions', (ctx) =>\n ctx.resultPool.getOptions([{\n axes: [\n { name: 'pl7.app/sampleId' },\n { name: 'pl7.app/vdj/clonotypeKey' },\n ],\n annotations: { 'pl7.app/isAnchor': 'true' },\n }, {\n axes: [\n { name: 'pl7.app/sampleId' },\n { name: 'pl7.app/vdj/scClonotypeKey' },\n ],\n annotations: { 'pl7.app/isAnchor': 'true' },\n }],\n {\n // suppress native label of the column (e.g. \"Number of Reads\") to show only the dataset label\n label: { includeNativeLabel: false },\n }),\n )\n\n .output('datasetSpec', (ctx) => {\n if (ctx.args.datasetRef === undefined) {\n return undefined;\n }\n\n return ctx.resultPool.getPColumnSpecByRef(ctx.args.datasetRef);\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 .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n\n .title((ctx) => ctx.uiState?.blockTitle ?? 'V/J Usage')\n\n .sections((_) => [\n { type: 'link', href: '/', label: 'V Gene Usage' },\n { type: 'link', href: '/jUsage', label: 'J Gene Usage' },\n { type: 'link', href: '/vjUsage', label: 'V/J Gene Usage' },\n ])\n\n .done(2);\n\nexport type BlockOutputs = InferOutputsType<typeof model>;\n"],"names":["BlockModel","createPFrameForGraphs"],"mappings":";;;;AAkBO,MAAM,KAAK,GAAGA,kBAAU,CAAC,MAAM;AAEnC,KAAA,QAAQ,CAAY;AACnB,IAAA,OAAO,EAAE,GAAG;AACZ,IAAA,MAAM,EAAE,KAAK;CACd;AAEA,KAAA,WAAW,CAAU;AACpB,IAAA,UAAU,EAAE,WAAW;AACvB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,QAAQ,EAAE,kBAAkB;AAC5B,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,cAAc,EAAE;AACd,YAAA,gBAAgB,EAAE;AAChB,gBAAA,sBAAsB,EAAE,IAAI;AAC7B,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAA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,SAAS;IAClB;AAEA,IAAA,OAAO,GAAG,CAAC,UAAU,CAAC,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC;AAChE,CAAC;AAEA,KAAA,gBAAgB,CAAC,IAAI,EAAE,CAAC,GAAG,KAAI;AAC9B,IAAA,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE;AACvD,IAAA,IAAI,KAAK,KAAK,SAAS,EAAE;AACvB,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,OAAOC,6BAAqB,CAAC,GAAG,EAAE,KAAK,CAAC;AAC1C,CAAC;AAEA,KAAA,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,iBAAiB,EAAE,KAAK,KAAK;AAEvE,KAAA,KAAK,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,OAAO,EAAE,UAAU,IAAI,WAAW;AAErD,KAAA,QAAQ,CAAC,CAAC,CAAC,KAAK;IACf,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE;IAClD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,cAAc,EAAE;IACxD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE;CAC5D;KAEA,IAAI,CAAC,CAAC;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type BlockArgs = {
|
|
1
|
+
import type { GraphMakerState } from '@milaboratories/graph-maker';
|
|
2
|
+
import type { InferOutputsType, PlRef } from '@platforma-sdk/model';
|
|
3
|
+
export type BlockArgs = {
|
|
6
4
|
datasetRef?: PlRef;
|
|
7
5
|
scChain?: string;
|
|
8
6
|
allele?: boolean;
|
|
9
7
|
};
|
|
10
|
-
type UiState = {
|
|
8
|
+
export type UiState = {
|
|
11
9
|
blockTitle: string;
|
|
12
10
|
weightedFlag: boolean;
|
|
13
11
|
vUsagePlotState: GraphMakerState;
|
|
14
12
|
jUsagePlotState: GraphMakerState;
|
|
15
13
|
vjUsagePlotState: GraphMakerState;
|
|
16
14
|
};
|
|
17
|
-
declare const model:
|
|
18
|
-
datasetOptions:
|
|
15
|
+
export declare const model: import("@platforma-sdk/model").PlatformaExtended<import("@platforma-sdk/model").PlatformaV2<BlockArgs, {
|
|
16
|
+
datasetOptions: import("@platforma-sdk/model").OutputWithStatus<{
|
|
19
17
|
readonly ref: {
|
|
20
18
|
readonly __isRef: true;
|
|
21
19
|
readonly blockId: string;
|
|
@@ -23,9 +21,10 @@ declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
|
|
|
23
21
|
readonly requireEnrichments?: true | undefined;
|
|
24
22
|
};
|
|
25
23
|
readonly label: string;
|
|
26
|
-
}[]
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
}[]> & {
|
|
25
|
+
__unwrap: true;
|
|
26
|
+
};
|
|
27
|
+
datasetSpec: import("@platforma-sdk/model").OutputWithStatus<{
|
|
29
28
|
readonly kind: "PColumn";
|
|
30
29
|
readonly name: string;
|
|
31
30
|
readonly domain?: {
|
|
@@ -34,9 +33,10 @@ declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
|
|
|
34
33
|
readonly annotations?: {
|
|
35
34
|
[x: string]: string;
|
|
36
35
|
} | undefined;
|
|
36
|
+
readonly valueType: "Int" | "Long" | "Float" | "Double" | "String" | "Bytes";
|
|
37
37
|
readonly parentAxes?: number[] | undefined;
|
|
38
38
|
readonly axesSpec: {
|
|
39
|
-
readonly type:
|
|
39
|
+
readonly type: import("@platforma-sdk/model").ValueType;
|
|
40
40
|
readonly name: string;
|
|
41
41
|
readonly domain?: {
|
|
42
42
|
[x: string]: string;
|
|
@@ -46,10 +46,15 @@ declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
|
|
|
46
46
|
} | undefined;
|
|
47
47
|
readonly parentAxes?: number[] | undefined;
|
|
48
48
|
}[];
|
|
49
|
-
} | undefined
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
} | undefined> & {
|
|
50
|
+
__unwrap: true;
|
|
51
|
+
};
|
|
52
|
+
pf: import("@platforma-sdk/model").OutputWithStatus<import("@platforma-sdk/model").PFrameHandle> & {
|
|
53
|
+
__unwrap: false;
|
|
54
|
+
};
|
|
55
|
+
isRunning: import("@platforma-sdk/model").OutputWithStatus<boolean> & {
|
|
56
|
+
__unwrap: true;
|
|
57
|
+
};
|
|
58
|
+
}, UiState, "/" | "/jUsage" | "/vjUsage">>;
|
|
59
|
+
export type BlockOutputs = InferOutputsType<typeof model>;
|
|
60
|
+
//# 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,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGpE,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,eAAe,CAAC;IACjC,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,eAAe,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CA2FR,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,KAAK,CAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,80 +1,82 @@
|
|
|
1
1
|
import { BlockModel, createPFrameForGraphs } from '@platforma-sdk/model';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
[{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
3
|
+
const model = BlockModel.create()
|
|
4
|
+
.withArgs({
|
|
5
|
+
scChain: 'A',
|
|
6
|
+
allele: false,
|
|
7
|
+
})
|
|
8
|
+
.withUiState({
|
|
9
|
+
blockTitle: 'V/J Usage',
|
|
10
|
+
weightedFlag: true,
|
|
11
|
+
vUsagePlotState: {
|
|
12
|
+
title: 'V Usage',
|
|
13
|
+
template: 'heatmapClustered',
|
|
14
|
+
currentTab: 'settings',
|
|
15
|
+
layersSettings: {
|
|
16
|
+
heatmapClustered: {
|
|
17
|
+
normalizationDirection: null,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
jUsagePlotState: {
|
|
22
|
+
title: 'V Usage',
|
|
23
|
+
template: 'heatmapClustered',
|
|
24
|
+
currentTab: null,
|
|
25
|
+
layersSettings: {
|
|
26
|
+
heatmapClustered: {
|
|
27
|
+
normalizationDirection: null,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
vjUsagePlotState: {
|
|
32
|
+
title: 'V/J Usage',
|
|
33
|
+
template: 'heatmapClustered',
|
|
34
|
+
currentTab: null,
|
|
35
|
+
layersSettings: {
|
|
36
|
+
heatmapClustered: {
|
|
37
|
+
normalizationDirection: null,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
})
|
|
42
|
+
.argsValid((ctx) => ctx.args.datasetRef !== undefined)
|
|
43
|
+
.output('datasetOptions', (ctx) => ctx.resultPool.getOptions([{
|
|
44
|
+
axes: [
|
|
45
|
+
{ name: 'pl7.app/sampleId' },
|
|
46
|
+
{ name: 'pl7.app/vdj/clonotypeKey' },
|
|
47
|
+
],
|
|
48
|
+
annotations: { 'pl7.app/isAnchor': 'true' },
|
|
49
49
|
}, {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}],
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
axes: [
|
|
51
|
+
{ name: 'pl7.app/sampleId' },
|
|
52
|
+
{ name: 'pl7.app/vdj/scClonotypeKey' },
|
|
53
|
+
],
|
|
54
|
+
annotations: { 'pl7.app/isAnchor': 'true' },
|
|
55
|
+
}], {
|
|
56
|
+
// suppress native label of the column (e.g. "Number of Reads") to show only the dataset label
|
|
57
|
+
label: { includeNativeLabel: false },
|
|
58
|
+
}))
|
|
59
|
+
.output('datasetSpec', (ctx) => {
|
|
60
|
+
if (ctx.args.datasetRef === undefined) {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
return ctx.resultPool.getPColumnSpecByRef(ctx.args.datasetRef);
|
|
64
|
+
})
|
|
65
|
+
.outputWithStatus('pf', (ctx) => {
|
|
66
|
+
const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
|
|
67
|
+
if (pCols === undefined) {
|
|
68
|
+
return undefined;
|
|
59
69
|
}
|
|
60
|
-
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
return createPFrameForGraphs(ctx, pCols);
|
|
72
|
-
}).output("isRunning", (ctx) => ctx.outputs?.getIsReadyOrError() === false).title((ctx) => ctx.uiState?.blockTitle ?? "V/J Usage").sections((_) => [
|
|
73
|
-
{ type: "link", href: "/", label: "V Gene Usage" },
|
|
74
|
-
{ type: "link", href: "/jUsage", label: "J Gene Usage" },
|
|
75
|
-
{ type: "link", href: "/vjUsage", label: "V/J Gene Usage" }
|
|
76
|
-
]).done(2);
|
|
70
|
+
return createPFrameForGraphs(ctx, pCols);
|
|
71
|
+
})
|
|
72
|
+
.output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
|
|
73
|
+
.title((ctx) => ctx.uiState?.blockTitle ?? 'V/J Usage')
|
|
74
|
+
.sections((_) => [
|
|
75
|
+
{ type: 'link', href: '/', label: 'V Gene Usage' },
|
|
76
|
+
{ type: 'link', href: '/jUsage', label: 'J Gene Usage' },
|
|
77
|
+
{ type: 'link', href: '/vjUsage', label: 'V/J Gene Usage' },
|
|
78
|
+
])
|
|
79
|
+
.done(2);
|
|
77
80
|
|
|
78
81
|
export { model };
|
|
79
82
|
//# sourceMappingURL=index.js.map
|
|
80
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { GraphMakerState } from '@milaboratories/graph-maker';\nimport type { InferOutputsType, PlRef } from '@platforma-sdk/model';\nimport { BlockModel, createPFrameForGraphs } from '@platforma-sdk/model';\n\nexport type BlockArgs = {\n datasetRef?: PlRef;\n scChain?: string;\n allele?: boolean;\n};\n\nexport type UiState = {\n blockTitle: string;\n weightedFlag: boolean;\n vUsagePlotState: GraphMakerState;\n jUsagePlotState: GraphMakerState;\n vjUsagePlotState: GraphMakerState;\n};\n\nexport const model = BlockModel.create()\n\n .withArgs<BlockArgs>({\n scChain: 'A',\n allele: false,\n })\n\n .withUiState<UiState>({\n blockTitle: 'V/J Usage',\n weightedFlag: true,\n vUsagePlotState: {\n title: 'V Usage',\n template: 'heatmapClustered',\n currentTab: 'settings',\n layersSettings: {\n heatmapClustered: {\n normalizationDirection: null,\n },\n },\n },\n jUsagePlotState: {\n title: 'V Usage',\n template: 'heatmapClustered',\n currentTab: null,\n layersSettings: {\n heatmapClustered: {\n normalizationDirection: null,\n },\n },\n },\n vjUsagePlotState: {\n title: 'V/J Usage',\n template: 'heatmapClustered',\n currentTab: null,\n layersSettings: {\n heatmapClustered: {\n normalizationDirection: null,\n },\n },\n },\n })\n\n .argsValid((ctx) => ctx.args.datasetRef !== undefined)\n\n .output('datasetOptions', (ctx) =>\n ctx.resultPool.getOptions([{\n axes: [\n { name: 'pl7.app/sampleId' },\n { name: 'pl7.app/vdj/clonotypeKey' },\n ],\n annotations: { 'pl7.app/isAnchor': 'true' },\n }, {\n axes: [\n { name: 'pl7.app/sampleId' },\n { name: 'pl7.app/vdj/scClonotypeKey' },\n ],\n annotations: { 'pl7.app/isAnchor': 'true' },\n }],\n {\n // suppress native label of the column (e.g. \"Number of Reads\") to show only the dataset label\n label: { includeNativeLabel: false },\n }),\n )\n\n .output('datasetSpec', (ctx) => {\n if (ctx.args.datasetRef === undefined) {\n return undefined;\n }\n\n return ctx.resultPool.getPColumnSpecByRef(ctx.args.datasetRef);\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 .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)\n\n .title((ctx) => ctx.uiState?.blockTitle ?? 'V/J Usage')\n\n .sections((_) => [\n { type: 'link', href: '/', label: 'V Gene Usage' },\n { type: 'link', href: '/jUsage', label: 'J Gene Usage' },\n { type: 'link', href: '/vjUsage', label: 'V/J Gene Usage' },\n ])\n\n .done(2);\n\nexport type BlockOutputs = InferOutputsType<typeof model>;\n"],"names":[],"mappings":";;AAkBO,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM;AAEnC,KAAA,QAAQ,CAAY;AACnB,IAAA,OAAO,EAAE,GAAG;AACZ,IAAA,MAAM,EAAE,KAAK;CACd;AAEA,KAAA,WAAW,CAAU;AACpB,IAAA,UAAU,EAAE,WAAW;AACvB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,QAAQ,EAAE,kBAAkB;AAC5B,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,cAAc,EAAE;AACd,YAAA,gBAAgB,EAAE;AAChB,gBAAA,sBAAsB,EAAE,IAAI;AAC7B,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,QAAQ,EAAE,kBAAkB;AAC5B,QAAA,UAAU,EAAE,IAAI;AAChB,QAAA,cAAc,EAAE;AACd,YAAA,gBAAgB,EAAE;AAChB,gBAAA,sBAAsB,EAAE,IAAI;AAC7B,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,gBAAgB,EAAE;AAChB,QAAA,KAAK,EAAE,WAAW;AAClB,QAAA,QAAQ,EAAE,kBAAkB;AAC5B,QAAA,UAAU,EAAE,IAAI;AAChB,QAAA,cAAc,EAAE;AACd,YAAA,gBAAgB,EAAE;AAChB,gBAAA,sBAAsB,EAAE,IAAI;AAC7B,aAAA;AACF,SAAA;AACF,KAAA;CACF;AAEA,KAA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