@platforma-open/milaboratories.vj-usage.model 2.1.4 → 2.1.6

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/dist/index.cjs CHANGED
@@ -1,82 +1,91 @@
1
1
  'use strict';
2
2
 
3
3
  var model$1 = require('@platforma-sdk/model');
4
+ var label = require('./label.cjs');
4
5
 
5
- // src/index.ts
6
- var model = model$1.BlockModel.create().withArgs({
7
- scChain: "A",
8
- allele: false
9
- }).withUiState({
10
- blockTitle: "V/J Usage",
11
- weightedFlag: true,
12
- vUsagePlotState: {
13
- title: "V Usage",
14
- template: "heatmapClustered",
15
- currentTab: "settings",
16
- layersSettings: {
17
- heatmapClustered: {
18
- normalizationDirection: null
19
- }
20
- }
21
- },
22
- jUsagePlotState: {
23
- title: "V Usage",
24
- template: "heatmapClustered",
25
- currentTab: null,
26
- layersSettings: {
27
- heatmapClustered: {
28
- normalizationDirection: null
29
- }
30
- }
31
- },
32
- vjUsagePlotState: {
33
- title: "V/J Usage",
34
- template: "heatmapClustered",
35
- currentTab: null,
36
- layersSettings: {
37
- heatmapClustered: {
38
- normalizationDirection: null
39
- }
40
- }
41
- }
42
- }).argsValid((ctx) => ctx.args.datasetRef !== void 0).output(
43
- "datasetOptions",
44
- (ctx) => ctx.resultPool.getOptions(
45
- [{
46
- axes: [
47
- { name: "pl7.app/sampleId" },
48
- { name: "pl7.app/vdj/clonotypeKey" }
49
- ],
50
- annotations: { "pl7.app/isAnchor": "true" }
6
+ const model = model$1.BlockModel.create()
7
+ .withArgs({
8
+ defaultBlockLabel: label.getDefaultBlockLabel({
9
+ allele: false,
10
+ isSingleCell: false,
11
+ }),
12
+ customBlockLabel: '',
13
+ scChain: 'A',
14
+ allele: false,
15
+ })
16
+ .withUiState({
17
+ weightedFlag: true,
18
+ vUsagePlotState: {
19
+ title: 'V Usage',
20
+ template: 'heatmapClustered',
21
+ currentTab: 'settings',
22
+ layersSettings: {
23
+ heatmapClustered: {
24
+ normalizationDirection: null,
25
+ },
26
+ },
27
+ },
28
+ jUsagePlotState: {
29
+ title: 'J Usage',
30
+ template: 'heatmapClustered',
31
+ currentTab: null,
32
+ layersSettings: {
33
+ heatmapClustered: {
34
+ normalizationDirection: null,
35
+ },
36
+ },
37
+ },
38
+ vjUsagePlotState: {
39
+ title: 'V/J Usage',
40
+ template: 'heatmapClustered',
41
+ currentTab: null,
42
+ layersSettings: {
43
+ heatmapClustered: {
44
+ normalizationDirection: null,
45
+ },
46
+ },
47
+ },
48
+ })
49
+ .argsValid((ctx) => ctx.args.datasetRef !== undefined)
50
+ .output('datasetOptions', (ctx) => ctx.resultPool.getOptions([{
51
+ axes: [
52
+ { name: 'pl7.app/sampleId' },
53
+ { name: 'pl7.app/vdj/clonotypeKey' },
54
+ ],
55
+ annotations: { 'pl7.app/isAnchor': 'true' },
51
56
  }, {
52
- axes: [
53
- { name: "pl7.app/sampleId" },
54
- { name: "pl7.app/vdj/scClonotypeKey" }
55
- ],
56
- annotations: { "pl7.app/isAnchor": "true" }
57
- }],
58
- {
59
- // suppress native label of the column (e.g. "Number of Reads") to show only the dataset label
60
- label: { includeNativeLabel: false }
57
+ axes: [
58
+ { name: 'pl7.app/sampleId' },
59
+ { name: 'pl7.app/vdj/scClonotypeKey' },
60
+ ],
61
+ annotations: { 'pl7.app/isAnchor': 'true' },
62
+ }], {
63
+ // suppress native label of the column (e.g. "Number of Reads") to show only the dataset label
64
+ label: { includeNativeLabel: false },
65
+ }))
66
+ .output('datasetSpec', (ctx) => {
67
+ if (ctx.args.datasetRef === undefined) {
68
+ return undefined;
69
+ }
70
+ return ctx.resultPool.getPColumnSpecByRef(ctx.args.datasetRef);
71
+ })
72
+ .outputWithStatus('pf', (ctx) => {
73
+ const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
74
+ if (pCols === undefined) {
75
+ return undefined;
61
76
  }
62
- )
63
- ).output("datasetSpec", (ctx) => {
64
- if (ctx.args.datasetRef === void 0) {
65
- return void 0;
66
- }
67
- return ctx.resultPool.getPColumnSpecByRef(ctx.args.datasetRef);
68
- }).output("pf", (ctx) => {
69
- const pCols = ctx.outputs?.resolve("pf")?.getPColumns();
70
- if (pCols === void 0) {
71
- return void 0;
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);
77
+ return model$1.createPFrameForGraphs(ctx, pCols);
78
+ })
79
+ .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
80
+ .title(() => 'V/J Usage')
81
+ .subtitle((ctx) => ctx.args.customBlockLabel || ctx.args.defaultBlockLabel)
82
+ .sections((_) => [
83
+ { type: 'link', href: '/', label: 'V Gene Usage' },
84
+ { type: 'link', href: '/jUsage', label: 'J Gene Usage' },
85
+ { type: 'link', href: '/vjUsage', label: 'V/J Gene Usage' },
86
+ ])
87
+ .done(2);
79
88
 
89
+ exports.getDefaultBlockLabel = label.getDefaultBlockLabel;
80
90
  exports.model = model;
81
91
  //# sourceMappingURL=index.cjs.map
82
- //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["BlockModel","createPFrameForGraphs"],"mappings":";;;;;AAkBO,IAAM,KAAQ,GAAAA,kBAAA,CAAW,MAAO,EAAA,CAEpC,QAAoB,CAAA;AAAA,EACnB,OAAS,EAAA,GAAA;AAAA,EACT,MAAQ,EAAA;AACV,CAAC,EAEA,WAAqB,CAAA;AAAA,EACpB,UAAY,EAAA,WAAA;AAAA,EACZ,YAAc,EAAA,IAAA;AAAA,EACd,eAAiB,EAAA;AAAA,IACf,KAAO,EAAA,SAAA;AAAA,IACP,QAAU,EAAA,kBAAA;A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AAQ,KAAA;AAC9B,EAAI,IAAA,GAAA,CAAI,IAAK,CAAA,UAAA,KAAe,MAAW,EAAA;AACrC,IAAO,OAAA,MAAA;AAAA;AAGT,EAAA,OAAO,GAAI,CAAA,UAAA,CAAW,mBAAoB,CAAA,GAAA,CAAI,KAAK,UAAU,CAAA;AAC/D,CAAC,CAEA,CAAA,MAAA,CAAO,IAAM,EAAA,CAAC,GAAQ,KAAA;AACrB,EAAA,MAAM,QAAQ,GAAI,CAAA,OAAA,EAAS,OAAQ,CAAA,IAAI,GAAG,WAAY,EAAA;AACtD,EAAA,IAAI,UAAU,MAAW,EAAA;AACvB,IAAO,OAAA,MAAA;AAAA;AAGT,EAAO,OAAAC,6BAAA,CAAsB,KAAK,KAAK,CAAA;AACzC,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,WAAW,CAAA,CAErD,QAAS,CAAA,CAAC,CAAM,KAAA;AAAA,EACf,EAAE,IAAM,EAAA,MAAA,EAAQ,IAAM,EAAA,GAAA,EAAK,OAAO,cAAe,EAAA;AAAA,EACjD,EAAE,IAAM,EAAA,MAAA,EAAQ,IAAM,EAAA,SAAA,EAAW,OAAO,cAAe,EAAA;AAAA,EACvD,EAAE,IAAM,EAAA,MAAA,EAAQ,IAAM,EAAA,UAAA,EAAY,OAAO,gBAAiB;AAC5D,CAAC,CAAA,CAEA,KAAK,CAAC","file":"index.cjs","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 .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 .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"]}
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';\nimport { getDefaultBlockLabel } from './label';\n\nexport type BlockArgs = {\n defaultBlockLabel: string;\n customBlockLabel: string;\n datasetRef?: PlRef;\n scChain?: string;\n allele?: boolean;\n};\n\nexport type UiState = {\n weightedFlag: boolean;\n vUsagePlotState: GraphMakerState;\n jUsagePlotState: GraphMakerState;\n vjUsagePlotState: GraphMakerState;\n};\n\nexport const model = BlockModel.create()\n\n .withArgs<BlockArgs>({\n defaultBlockLabel: getDefaultBlockLabel({\n allele: false,\n isSingleCell: false,\n }),\n customBlockLabel: '',\n scChain: 'A',\n allele: false,\n })\n\n .withUiState<UiState>({\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: 'J 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(() => 'V/J Usage')\n\n .subtitle((ctx) => ctx.args.customBlockLabel || ctx.args.defaultBlockLabel)\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\nexport { getDefaultBlockLabel } from './label';\n"],"names":["BlockModel","getDefaultBlockLabel","createPFrameForGraphs"],"mappings":";;;;;AAoBO,MAAM,KAAK,GAAGA,kBAAU,CAAC,MAAM;AAEnC,KAAA,QAAQ,CAAY;IACnB,iBAAiB,EAAEC,0BAAoB,CAAC;AACtC,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,YAAY,EAAE,KAAK;KACpB,CAAC;AACF,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,OAAO,EAAE,GAAG;AACZ,IAAA,MAAM,EAAE,KAAK;CACd;AAEA,KAAA,WAAW,CAAU;AACpB,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,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import { GraphMakerState } from '@milaboratories/graph-maker';
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 = {
4
+ defaultBlockLabel: string;
5
+ customBlockLabel: string;
6
6
  datasetRef?: PlRef;
7
7
  scChain?: string;
8
8
  allele?: boolean;
9
9
  };
10
- type UiState = {
11
- blockTitle: string;
10
+ export type UiState = {
12
11
  weightedFlag: boolean;
13
12
  vUsagePlotState: GraphMakerState;
14
13
  jUsagePlotState: GraphMakerState;
15
14
  vjUsagePlotState: GraphMakerState;
16
15
  };
17
- declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
18
- datasetOptions: _platforma_sdk_model.ValueOrErrors<{
16
+ export declare const model: import("@platforma-sdk/model").PlatformaExtended<import("@platforma-sdk/model").PlatformaV2<BlockArgs, import("@platforma-sdk/model").InferOutputsFromConfigs<BlockArgs, {
17
+ datasetOptions: import("@platforma-sdk/model").ConfigRenderLambda<{
19
18
  readonly ref: {
20
19
  readonly __isRef: true;
21
20
  readonly blockId: string;
@@ -24,8 +23,8 @@ declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
24
23
  };
25
24
  readonly label: string;
26
25
  }[]>;
27
- datasetSpec: _platforma_sdk_model.ValueOrErrors<{
28
- readonly valueType: _platforma_sdk_model.ValueType;
26
+ } & {
27
+ datasetSpec: import("@platforma-sdk/model").ConfigRenderLambda<{
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: _platforma_sdk_model.ValueType;
39
+ readonly type: import("@platforma-sdk/model").ValueType;
40
40
  readonly name: string;
41
41
  readonly domain?: {
42
42
  [x: string]: string;
@@ -47,9 +47,13 @@ declare const model: _platforma_sdk_model.PlatformaV2<BlockArgs, {
47
47
  readonly parentAxes?: number[] | undefined;
48
48
  }[];
49
49
  } | undefined>;
50
- pf: _platforma_sdk_model.ValueOrErrors<_platforma_sdk_model.PFrameHandle | undefined>;
51
- isRunning: _platforma_sdk_model.ValueOrErrors<boolean>;
52
- }, UiState, "/" | "/jUsage" | "/vjUsage">;
53
- type BlockOutputs = InferOutputsType<typeof model>;
54
-
55
- export { type BlockArgs, type BlockOutputs, type UiState, model };
50
+ } & {
51
+ pf: import("@platforma-sdk/model").ConfigRenderLambda<import("@platforma-sdk/model").PFrameHandle | undefined> & {
52
+ withStatus: true;
53
+ };
54
+ } & {
55
+ isRunning: import("@platforma-sdk/model").ConfigRenderLambda<boolean>;
56
+ }, UiState>, UiState, "/" | "/jUsage" | "/vjUsage">>;
57
+ export type BlockOutputs = InferOutputsType<typeof model>;
58
+ export { getDefaultBlockLabel } from './label';
59
+ //# 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;AAIpE,MAAM,MAAM,SAAS,GAAG;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,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,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAiGR,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,gBAAgB,CAAC,OAAO,KAAK,CAAC,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -1,80 +1,88 @@
1
1
  import { BlockModel, createPFrameForGraphs } from '@platforma-sdk/model';
2
+ import { getDefaultBlockLabel } from './label.js';
2
3
 
3
- // src/index.ts
4
- var model = BlockModel.create().withArgs({
5
- scChain: "A",
6
- allele: false
7
- }).withUiState({
8
- blockTitle: "V/J Usage",
9
- weightedFlag: true,
10
- vUsagePlotState: {
11
- title: "V Usage",
12
- template: "heatmapClustered",
13
- currentTab: "settings",
14
- layersSettings: {
15
- heatmapClustered: {
16
- normalizationDirection: null
17
- }
18
- }
19
- },
20
- jUsagePlotState: {
21
- title: "V Usage",
22
- template: "heatmapClustered",
23
- currentTab: null,
24
- layersSettings: {
25
- heatmapClustered: {
26
- normalizationDirection: null
27
- }
28
- }
29
- },
30
- vjUsagePlotState: {
31
- title: "V/J Usage",
32
- template: "heatmapClustered",
33
- currentTab: null,
34
- layersSettings: {
35
- heatmapClustered: {
36
- normalizationDirection: null
37
- }
38
- }
39
- }
40
- }).argsValid((ctx) => ctx.args.datasetRef !== void 0).output(
41
- "datasetOptions",
42
- (ctx) => ctx.resultPool.getOptions(
43
- [{
44
- axes: [
45
- { name: "pl7.app/sampleId" },
46
- { name: "pl7.app/vdj/clonotypeKey" }
47
- ],
48
- annotations: { "pl7.app/isAnchor": "true" }
4
+ const model = BlockModel.create()
5
+ .withArgs({
6
+ defaultBlockLabel: getDefaultBlockLabel({
7
+ allele: false,
8
+ isSingleCell: false,
9
+ }),
10
+ customBlockLabel: '',
11
+ scChain: 'A',
12
+ allele: false,
13
+ })
14
+ .withUiState({
15
+ weightedFlag: true,
16
+ vUsagePlotState: {
17
+ title: 'V Usage',
18
+ template: 'heatmapClustered',
19
+ currentTab: 'settings',
20
+ layersSettings: {
21
+ heatmapClustered: {
22
+ normalizationDirection: null,
23
+ },
24
+ },
25
+ },
26
+ jUsagePlotState: {
27
+ title: 'J Usage',
28
+ template: 'heatmapClustered',
29
+ currentTab: null,
30
+ layersSettings: {
31
+ heatmapClustered: {
32
+ normalizationDirection: null,
33
+ },
34
+ },
35
+ },
36
+ vjUsagePlotState: {
37
+ title: 'V/J Usage',
38
+ template: 'heatmapClustered',
39
+ currentTab: null,
40
+ layersSettings: {
41
+ heatmapClustered: {
42
+ normalizationDirection: null,
43
+ },
44
+ },
45
+ },
46
+ })
47
+ .argsValid((ctx) => ctx.args.datasetRef !== undefined)
48
+ .output('datasetOptions', (ctx) => ctx.resultPool.getOptions([{
49
+ axes: [
50
+ { name: 'pl7.app/sampleId' },
51
+ { name: 'pl7.app/vdj/clonotypeKey' },
52
+ ],
53
+ annotations: { 'pl7.app/isAnchor': 'true' },
49
54
  }, {
50
- axes: [
51
- { name: "pl7.app/sampleId" },
52
- { name: "pl7.app/vdj/scClonotypeKey" }
53
- ],
54
- annotations: { "pl7.app/isAnchor": "true" }
55
- }],
56
- {
57
- // suppress native label of the column (e.g. "Number of Reads") to show only the dataset label
58
- label: { includeNativeLabel: false }
55
+ axes: [
56
+ { name: 'pl7.app/sampleId' },
57
+ { name: 'pl7.app/vdj/scClonotypeKey' },
58
+ ],
59
+ annotations: { 'pl7.app/isAnchor': 'true' },
60
+ }], {
61
+ // suppress native label of the column (e.g. "Number of Reads") to show only the dataset label
62
+ label: { includeNativeLabel: false },
63
+ }))
64
+ .output('datasetSpec', (ctx) => {
65
+ if (ctx.args.datasetRef === undefined) {
66
+ return undefined;
67
+ }
68
+ return ctx.resultPool.getPColumnSpecByRef(ctx.args.datasetRef);
69
+ })
70
+ .outputWithStatus('pf', (ctx) => {
71
+ const pCols = ctx.outputs?.resolve('pf')?.getPColumns();
72
+ if (pCols === undefined) {
73
+ return undefined;
59
74
  }
60
- )
61
- ).output("datasetSpec", (ctx) => {
62
- if (ctx.args.datasetRef === void 0) {
63
- return void 0;
64
- }
65
- return ctx.resultPool.getPColumnSpecByRef(ctx.args.datasetRef);
66
- }).output("pf", (ctx) => {
67
- const pCols = ctx.outputs?.resolve("pf")?.getPColumns();
68
- if (pCols === void 0) {
69
- return void 0;
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);
75
+ return createPFrameForGraphs(ctx, pCols);
76
+ })
77
+ .output('isRunning', (ctx) => ctx.outputs?.getIsReadyOrError() === false)
78
+ .title(() => 'V/J Usage')
79
+ .subtitle((ctx) => ctx.args.customBlockLabel || ctx.args.defaultBlockLabel)
80
+ .sections((_) => [
81
+ { type: 'link', href: '/', label: 'V Gene Usage' },
82
+ { type: 'link', href: '/jUsage', label: 'J Gene Usage' },
83
+ { type: 'link', href: '/vjUsage', label: 'V/J Gene Usage' },
84
+ ])
85
+ .done(2);
77
86
 
78
- export { model };
87
+ export { getDefaultBlockLabel, model };
79
88
  //# sourceMappingURL=index.js.map
80
- //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;AAkBO,IAAM,KAAQ,GAAA,UAAA,CAAW,MAAO,EAAA,CAEpC,QAAoB,CAAA;AAAA,EACnB,OAAS,EAAA,GAAA;AAAA,EACT,MAAQ,EAAA;AACV,CAAC,EAEA,WAAqB,CAAA;AAAA,EACpB,UAAY,EAAA,WAAA;AAAA,EACZ,YAAc,EAAA,IAAA;AAAA,EACd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,EAAoB,KAAM;AAAA;AACrC;AACF,CAEC,CAAA,MAAA,CAAO,aAAe,EAAA,CAAC,GAAQ,KAAA;AAC9B,EAAI,IAAA,GAAA,CAAI,IAAK,CAAA,UAAA,KAAe,MAAW,EAAA;AACrC,IAAO,OAAA,MAAA;AAAA;AAGT,EAAA,OAAO,GAAI,CAAA,UAAA,CAAW,mBAAoB,CAAA,GAAA,CAAI,KAAK,UAAU,CAAA;AAC/D,CAAC,CAEA,CAAA,MAAA,CAAO,IAAM,EAAA,CAAC,GAAQ,KAAA;AACrB,EAAA,MAAM,QAAQ,GAAI,CAAA,OAAA,EAAS,OAAQ,CAAA,IAAI,GAAG,WAAY,EAAA;AACtD,EAAA,IAAI,UAAU,MAAW,EAAA;AACvB,IAAO,OAAA,MAAA;AAAA;AAGT,EAAO,OAAA,qBAAA,CAAsB,KAAK,KAAK,CAAA;AACzC,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,WAAW,CAAA,CAErD,QAAS,CAAA,CAAC,CAAM,KAAA;AAAA,EACf,EAAE,IAAM,EAAA,MAAA,EAAQ,IAAM,EAAA,GAAA,EAAK,OAAO,cAAe,EAAA;AAAA,EACjD,EAAE,IAAM,EAAA,MAAA,EAAQ,IAAM,EAAA,SAAA,EAAW,OAAO,cAAe,EAAA;AAAA,EACvD,EAAE,IAAM,EAAA,MAAA,EAAQ,IAAM,EAAA,UAAA,EAAY,OAAO,gBAAiB;AAC5D,CAAC,CAAA,CAEA,KAAK,CAAC","file":"index.js","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 .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 .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"]}
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';\nimport { getDefaultBlockLabel } from './label';\n\nexport type BlockArgs = {\n defaultBlockLabel: string;\n customBlockLabel: string;\n datasetRef?: PlRef;\n scChain?: string;\n allele?: boolean;\n};\n\nexport type UiState = {\n weightedFlag: boolean;\n vUsagePlotState: GraphMakerState;\n jUsagePlotState: GraphMakerState;\n vjUsagePlotState: GraphMakerState;\n};\n\nexport const model = BlockModel.create()\n\n .withArgs<BlockArgs>({\n defaultBlockLabel: getDefaultBlockLabel({\n allele: false,\n isSingleCell: false,\n }),\n customBlockLabel: '',\n scChain: 'A',\n allele: false,\n })\n\n .withUiState<UiState>({\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: 'J 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(() => 'V/J Usage')\n\n .subtitle((ctx) => ctx.args.customBlockLabel || ctx.args.defaultBlockLabel)\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\nexport { getDefaultBlockLabel } from './label';\n"],"names":[],"mappings":";;;AAoBO,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM;AAEnC,KAAA,QAAQ,CAAY;IACnB,iBAAiB,EAAE,oBAAoB,CAAC;AACtC,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,YAAY,EAAE,KAAK;KACpB,CAAC;AACF,IAAA,gBAAgB,EAAE,EAAE;AACpB,IAAA,OAAO,EAAE,GAAG;AACZ,IAAA,MAAM,EAAE,KAAK;CACd;AAEA,KAAA,WAAW,CAAU;AACpB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,QAAQ,EAAE,kBAAkB;AAC5B,QAAA,UAAU,EAAE,UAAU;A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
5
+ // Add dataset name
6
+ if (data.datasetLabel) {
7
+ parts.push(data.datasetLabel);
8
+ }
9
+ // Add allele/gene
10
+ parts.push(data.allele ? 'Allele' : 'Gene');
11
+ // Add chain info for single-cell datasets
12
+ if (data.isSingleCell && data.chainLabel) {
13
+ parts.push(data.chainLabel);
14
+ }
15
+ return parts.join(' - ');
16
+ }
17
+
18
+ exports.getDefaultBlockLabel = getDefaultBlockLabel;
19
+ //# sourceMappingURL=label.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.cjs","sources":["../src/label.ts"],"sourcesContent":["export function getDefaultBlockLabel(data: {\n datasetLabel?: string;\n allele: boolean;\n isSingleCell: boolean;\n chainLabel?: string;\n}) {\n const parts: string[] = [];\n\n // Add dataset name\n if (data.datasetLabel) {\n parts.push(data.datasetLabel);\n }\n\n // Add allele/gene\n parts.push(data.allele ? 'Allele' : 'Gene');\n\n // Add chain info for single-cell datasets\n if (data.isSingleCell && data.chainLabel) {\n parts.push(data.chainLabel);\n }\n\n return parts.join(' - ');\n}\n"],"names":[],"mappings":";;AAAM,SAAU,oBAAoB,CAAC,IAKpC,EAAA;IACC,MAAM,KAAK,GAAa,EAAE;;AAG1B,IAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACrB,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IAC/B;;AAGA,IAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;;IAG3C,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU,EAAE;AACxC,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IAC7B;AAEA,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAC1B;;;;"}
@@ -0,0 +1,7 @@
1
+ export declare function getDefaultBlockLabel(data: {
2
+ datasetLabel?: string;
3
+ allele: boolean;
4
+ isSingleCell: boolean;
5
+ chainLabel?: string;
6
+ }): string;
7
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../src/label.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,UAiBA"}
package/dist/label.js ADDED
@@ -0,0 +1,17 @@
1
+ function getDefaultBlockLabel(data) {
2
+ const parts = [];
3
+ // Add dataset name
4
+ if (data.datasetLabel) {
5
+ parts.push(data.datasetLabel);
6
+ }
7
+ // Add allele/gene
8
+ parts.push(data.allele ? 'Allele' : 'Gene');
9
+ // Add chain info for single-cell datasets
10
+ if (data.isSingleCell && data.chainLabel) {
11
+ parts.push(data.chainLabel);
12
+ }
13
+ return parts.join(' - ');
14
+ }
15
+
16
+ export { getDefaultBlockLabel };
17
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.js","sources":["../src/label.ts"],"sourcesContent":["export function getDefaultBlockLabel(data: {\n datasetLabel?: string;\n allele: boolean;\n isSingleCell: boolean;\n chainLabel?: string;\n}) {\n const parts: string[] = [];\n\n // Add dataset name\n if (data.datasetLabel) {\n parts.push(data.datasetLabel);\n }\n\n // Add allele/gene\n parts.push(data.allele ? 'Allele' : 'Gene');\n\n // Add chain info for single-cell datasets\n if (data.isSingleCell && data.chainLabel) {\n parts.push(data.chainLabel);\n }\n\n return parts.join(' - ');\n}\n"],"names":[],"mappings":"AAAM,SAAU,oBAAoB,CAAC,IAKpC,EAAA;IACC,MAAM,KAAK,GAAa,EAAE;;AAG1B,IAAA,IAAI,IAAI,CAAC,YAAY,EAAE;AACrB,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;IAC/B;;AAGA,IAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;;IAG3C,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,UAAU,EAAE;AACxC,QAAA,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC;IAC7B;AAEA,IAAA,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AAC1B;;;;"}