@platforma-open/milaboratories.mixcr-shm-trees.workflow 3.6.1 → 3.8.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.
@@ -1,4 +1,5 @@
1
1
  ll := import("@platforma-sdk/workflow-tengo:ll")
2
+ maps := import("@platforma-sdk/workflow-tengo:maps")
2
3
  text := import("text")
3
4
 
4
5
 
@@ -12,8 +13,16 @@ text := import("text")
12
13
 
13
14
  allowNA := true
14
15
 
16
+ addTableAnnotations := func(order, defaultVisibility, label, specAnnotations) {
17
+ return maps.merge(specAnnotations, {
18
+ "pl7.app/table/orderPriority": string(order),
19
+ "pl7.app/table/visibility": defaultVisibility ? "default" : "optional",
20
+ "pl7.app/label": label
21
+ })
22
+ }
23
+
15
24
 
16
- shmTreeTableOptions := func(dataDescription) {
25
+ shmTree := func(dataDescription) {
17
26
  axes := []
18
27
  columns := []
19
28
  cmdArgs := []
@@ -25,12 +34,7 @@ shmTreeTableOptions := func(dataDescription) {
25
34
  spec: {
26
35
  name: "pl7.app/dendrogram/treeId",
27
36
  type: "Long",
28
- domain: { },
29
- annotations: {
30
- "pl7.app/label": "Tree id",
31
- "pl7.app/table/visibility": "default",
32
- "pl7.app/table/orderPriority": "100000"
33
- }
37
+ annotations: addTableAnnotations(100000, true, "Tree id", {})
34
38
  }
35
39
  })
36
40
 
@@ -41,12 +45,7 @@ shmTreeTableOptions := func(dataDescription) {
41
45
  spec: {
42
46
  name: "pl7.app/dendrogram/subtreeId",
43
47
  type: "Long",
44
- domain: { },
45
- annotations: {
46
- "pl7.app/label": "Chain id",
47
- "pl7.app/table/visibility": "default",
48
- "pl7.app/table/orderPriority": "90000"
49
- }
48
+ annotations: addTableAnnotations(90000, true, "Chain id", {})
50
49
  }
51
50
  })
52
51
  }
@@ -60,11 +59,7 @@ shmTreeTableOptions := func(dataDescription) {
60
59
  spec: {
61
60
  name: "pl7.app/vdj/uniqueCellCount",
62
61
  valueType: "Long",
63
- annotations: {
64
- "pl7.app/label": "Number of cells",
65
- "pl7.app/table/visibility": "default",
66
- "pl7.app/table/orderPriority": "70000"
67
- }
62
+ annotations: addTableAnnotations(70000, true, "Number of cells", {})
68
63
  }
69
64
  })
70
65
  }
@@ -78,11 +73,7 @@ shmTreeTableOptions := func(dataDescription) {
78
73
  spec: {
79
74
  name: "pl7.app/vdj/uniqueMoleculeCount",
80
75
  valueType: "Long",
81
- annotations: {
82
- "pl7.app/label": "Number of molecules",
83
- "pl7.app/table/visibility": "default",
84
- "pl7.app/table/orderPriority": "60000"
85
- }
76
+ annotations: addTableAnnotations(60000, true, "Number of molecules", {})
86
77
  }
87
78
  })
88
79
  }
@@ -95,11 +86,7 @@ shmTreeTableOptions := func(dataDescription) {
95
86
  spec: {
96
87
  name: "pl7.app/vdj/numberOfClonesInTree",
97
88
  valueType: "Long",
98
- annotations: {
99
- "pl7.app/label": "Number of clones",
100
- "pl7.app/table/visibility": "default",
101
- "pl7.app/table/orderPriority": "80000"
102
- }
89
+ annotations: addTableAnnotations(80000, true, "Number of clones", {})
103
90
  }
104
91
  })
105
92
 
@@ -111,11 +98,7 @@ shmTreeTableOptions := func(dataDescription) {
111
98
  spec: {
112
99
  name: "pl7.app/vdj/numberOfNodesWithClones",
113
100
  valueType: "Long",
114
- annotations: {
115
- "pl7.app/label": "Number of nodes",
116
- "pl7.app/table/visibility": "default",
117
- "pl7.app/table/orderPriority": "90000"
118
- }
101
+ annotations: addTableAnnotations(90000, true, "Number of nodes", {})
119
102
  }
120
103
  })
121
104
 
@@ -127,11 +110,7 @@ shmTreeTableOptions := func(dataDescription) {
127
110
  spec: {
128
111
  name: "pl7.app/vdj/totalReadsCountInTree",
129
112
  valueType: "Long",
130
- annotations: {
131
- "pl7.app/label": "Total reads count",
132
- "pl7.app/table/visibility": "default",
133
- "pl7.app/table/orderPriority": "50000"
134
- }
113
+ annotations: addTableAnnotations(50000, true, "Total reads count", {})
135
114
  }
136
115
  })
137
116
 
@@ -146,13 +125,10 @@ shmTreeTableOptions := func(dataDescription) {
146
125
  domain: {
147
126
  "pl7.app/vdj/reference": "VGene"
148
127
  },
149
- annotations: {
128
+ annotations: addTableAnnotations(30000, true, "V gene", {
150
129
  type: "V gene name",
151
- "pl7.app/label": "V gene",
152
- "pl7.app/isDiscreteFilter": "true",
153
- "pl7.app/table/visibility": "default",
154
- "pl7.app/table/orderPriority": "30000"
155
- }
130
+ "pl7.app/isDiscreteFilter": "true"
131
+ })
156
132
  }
157
133
  })
158
134
 
@@ -167,13 +143,10 @@ shmTreeTableOptions := func(dataDescription) {
167
143
  domain: {
168
144
  "pl7.app/vdj/reference": "JGene"
169
145
  },
170
- annotations: {
146
+ annotations: addTableAnnotations(29000, true, "J gene", {
171
147
  type: "J gene name",
172
- "pl7.app/label": "J gene",
173
- "pl7.app/isDiscreteFilter": "true",
174
- "pl7.app/table/visibility": "default",
175
- "pl7.app/table/orderPriority": "29000"
176
- }
148
+ "pl7.app/isDiscreteFilter": "true"
149
+ })
177
150
  }
178
151
  })
179
152
 
@@ -185,13 +158,10 @@ shmTreeTableOptions := func(dataDescription) {
185
158
  spec: {
186
159
  valueType: "String",
187
160
  name: "pl7.app/vdj/chain",
188
- annotations: {
189
- "pl7.app/label": "Chain",
161
+ annotations: addTableAnnotations(40000, true, "Chain", {
190
162
  "pl7.app/isDiscreteFilter": "true",
191
- "pl7.app/discreteValues": "['TRA', 'TRB', 'TRG', 'TRD', 'IGH', 'IGK', 'IGL']",
192
- "pl7.app/table/visibility": "default",
193
- "pl7.app/table/orderPriority": "40000"
194
- }
163
+ "pl7.app/discreteValues": "['TRA', 'TRB', 'TRG', 'TRD', 'IGH', 'IGK', 'IGL']"
164
+ })
195
165
  }
196
166
  })
197
167
  orderPriority := 20000
@@ -214,12 +184,9 @@ shmTreeTableOptions := func(dataDescription) {
214
184
  "pl7.app/vdj/feature": feature,
215
185
  "pl7.app/alphabet": "nucleotide"
216
186
  },
217
- annotations: {
218
- "pl7.app/type": "sequence",
219
- "pl7.app/label": feature + " of MRCA nt",
220
- "pl7.app/table/visibility": visibility,
221
- "pl7.app/table/orderPriority": string(orderPriority)
222
- }
187
+ annotations: addTableAnnotations(orderPriority, visibility == "default", feature + " of MRCA nt", {
188
+ "pl7.app/type": "sequence"
189
+ })
223
190
  }
224
191
  })
225
192
  orderPriority -= 100
@@ -236,12 +203,9 @@ shmTreeTableOptions := func(dataDescription) {
236
203
  "pl7.app/vdj/feature": feature,
237
204
  "pl7.app/alphabet": "aminoacid"
238
205
  },
239
- annotations: {
240
- "pl7.app/type": "sequence",
241
- "pl7.app/label": feature + " of MRCA aa",
242
- "pl7.app/table/visibility": visibility,
243
- "pl7.app/table/orderPriority": string(orderPriority)
244
- }
206
+ annotations: addTableAnnotations(orderPriority, visibility == "default", feature + " of MRCA aa", {
207
+ "pl7.app/type": "sequence"
208
+ })
245
209
  }
246
210
  })
247
211
  orderPriority -= 100
@@ -259,12 +223,9 @@ shmTreeTableOptions := func(dataDescription) {
259
223
  "pl7.app/vdj/feature": assemblingFeature,
260
224
  "pl7.app/alphabet": "nucleotide"
261
225
  },
262
- annotations: {
263
- "pl7.app/type": "sequence",
264
- "pl7.app/label": assemblingFeature + " of MRCA nt",
265
- "pl7.app/table/visibility": "default",
266
- "pl7.app/table/orderPriority": "10000"
267
- }
226
+ annotations: addTableAnnotations(10000, true, assemblingFeature + " of MRCA nt", {
227
+ "pl7.app/type": "sequence"
228
+ })
268
229
  }
269
230
  })
270
231
 
@@ -280,12 +241,9 @@ shmTreeTableOptions := func(dataDescription) {
280
241
  "pl7.app/vdj/feature": assemblingFeature,
281
242
  "pl7.app/alphabet": "aminoacid"
282
243
  },
283
- annotations: {
284
- "pl7.app/type": "sequence",
285
- "pl7.app/label": assemblingFeature + " of MRCA aa",
286
- "pl7.app/table/visibility": "default",
287
- "pl7.app/table/orderPriority": "9000"
288
- }
244
+ annotations: addTableAnnotations(9000, true, assemblingFeature + " of MRCA aa", {
245
+ "pl7.app/type": "sequence"
246
+ })
289
247
  }
290
248
  })
291
249
 
@@ -301,7 +259,7 @@ shmTreeTableOptions := func(dataDescription) {
301
259
  }
302
260
 
303
261
 
304
- shmTreeNodesTableOptions := func(dataDescription) {
262
+ shmTreeNodes := func(dataDescription) {
305
263
  axes := []
306
264
  columns := []
307
265
  cmdArgs := []
@@ -313,12 +271,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
313
271
  spec: {
314
272
  name: "pl7.app/dendrogram/treeId",
315
273
  type: "Long",
316
- domain: { },
317
- annotations: {
318
- "pl7.app/label": "Tree id",
319
- "pl7.app/table/visibility": "default",
320
- "pl7.app/table/orderPriority": "100000"
321
- }
274
+ annotations: addTableAnnotations(100000, true, "Tree id", {})
322
275
  }
323
276
  })
324
277
 
@@ -329,12 +282,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
329
282
  spec: {
330
283
  name: "pl7.app/dendrogram/subtreeId",
331
284
  type: "Long",
332
- domain: { },
333
- annotations: {
334
- "pl7.app/label": "Chain id",
335
- "pl7.app/table/visibility": "default",
336
- "pl7.app/table/orderPriority": "90000"
337
- }
285
+ annotations: addTableAnnotations(90000, true, "Chain id", {})
338
286
  }
339
287
  })
340
288
  }
@@ -345,12 +293,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
345
293
  spec: {
346
294
  name: "pl7.app/dendrogram/nodeId",
347
295
  type: "Long",
348
- domain: { },
349
- annotations: {
350
- "pl7.app/label": "Node id",
351
- "pl7.app/table/visibility": "default",
352
- "pl7.app/table/orderPriority": "80000"
353
- }
296
+ annotations: addTableAnnotations(80000, true, "Node id", {})
354
297
  }
355
298
  })
356
299
 
@@ -363,13 +306,10 @@ shmTreeNodesTableOptions := func(dataDescription) {
363
306
  name: "pl7.app/dendrogram/isObserved",
364
307
 
365
308
  valueType: "String",
366
- annotations: {
367
- "pl7.app/label": "Is observed in data",
309
+ annotations: addTableAnnotations(85000, true, "Is observed in data", {
368
310
  "pl7.app/isDiscreteFilter": "true",
369
- "pl7.app/discreteValues": "['true', 'false']",
370
- "pl7.app/table/visibility": "default",
371
- "pl7.app/table/orderPriority": "85000"
372
- }
311
+ "pl7.app/discreteValues": "['true', 'false']"
312
+ })
373
313
  }
374
314
  })
375
315
 
@@ -381,12 +321,9 @@ shmTreeNodesTableOptions := func(dataDescription) {
381
321
  spec: {
382
322
  name: "pl7.app/dendrogram/topology",
383
323
  valueType: "Long",
384
- annotations: {
385
- "pl7.app/label": "Parent node id",
386
- "pl7.app/dendrogram/isTopology": "true",
387
- "pl7.app/table/visibility": "optional",
388
- "pl7.app/table/orderPriority": "10000"
389
- }
324
+ annotations: addTableAnnotations(10000, false, "Parent node id", {
325
+ "pl7.app/dendrogram/isTopology": "true"
326
+ })
390
327
  }
391
328
  })
392
329
 
@@ -401,13 +338,10 @@ shmTreeNodesTableOptions := func(dataDescription) {
401
338
  domain: {
402
339
  "pl7.app/dendrogram/distance/from": "germline"
403
340
  },
404
- annotations: {
405
- "pl7.app/label": "Distanse from germline",
341
+ annotations: addTableAnnotations(9000, false, "Distanse from germline", {
406
342
  "pl7.app/dendrogram/distance/from": "germline", // change to domain only, once can be selected in graphmaker
407
- "pl7.app/dendrogram/isDistance": "true",
408
- "pl7.app/table/visibility": "optional",
409
- "pl7.app/table/orderPriority": "9000"
410
- }
343
+ "pl7.app/dendrogram/isDistance": "true"
344
+ })
411
345
  }
412
346
  })
413
347
 
@@ -422,13 +356,10 @@ shmTreeNodesTableOptions := func(dataDescription) {
422
356
  domain: {
423
357
  "pl7.app/dendrogram/distance/from": "parent"
424
358
  },
425
- annotations: {
426
- "pl7.app/label": "Distanse from parent",
359
+ annotations: addTableAnnotations(8900, false, "Distanse from parent", {
427
360
  "pl7.app/dendrogram/distance/from": "parent", // change to domain only, once can be selected in graphmaker
428
- "pl7.app/dendrogram/isDistance": "true",
429
- "pl7.app/table/visibility": "optional",
430
- "pl7.app/table/orderPriority": "8900"
431
- }
361
+ "pl7.app/dendrogram/isDistance": "true"
362
+ })
432
363
  }
433
364
  })
434
365
 
@@ -444,11 +375,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
444
375
  "pl7.app/vdj/features": text.join(dataDescription.coveredFeatures, ","),
445
376
  "pl7.app/alphabet": "nucleotide"
446
377
  },
447
- annotations: {
448
- "pl7.app/label": "Mutations rate nt",
449
- "pl7.app/table/visibility": "optional",
450
- "pl7.app/table/orderPriority": "8800"
451
- }
378
+ annotations: addTableAnnotations(8800, false, "Mutations rate nt", {})
452
379
  }
453
380
  })
454
381
 
@@ -464,11 +391,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
464
391
  "pl7.app/vdj/features": assemblingFeature,
465
392
  "pl7.app/alphabet": "aminoacid"
466
393
  },
467
- annotations: {
468
- "pl7.app/label": "Mutations rate aa",
469
- "pl7.app/table/visibility": "optional",
470
- "pl7.app/table/orderPriority": "8700"
471
- }
394
+ annotations: addTableAnnotations(8700, false, "Mutations rate aa", {})
472
395
  }
473
396
  })
474
397
 
@@ -480,11 +403,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
480
403
  spec: {
481
404
  name: "pl7.app/vdj/vIdentityPercent",
482
405
  valueType: "Double",
483
- annotations: {
484
- "pl7.app/label": "V gene identity",
485
- "pl7.app/table/visibility": "optional",
486
- "pl7.app/table/orderPriority": "8600"
487
- }
406
+ annotations: addTableAnnotations(8600, false, "V gene identity", {})
488
407
  }
489
408
  })
490
409
 
@@ -496,11 +415,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
496
415
  spec: {
497
416
  name: "pl7.app/vdj/jIdentityPercent",
498
417
  valueType: "Double",
499
- annotations: {
500
- "pl7.app/label": "J gene identity",
501
- "pl7.app/table/visibility": "optional",
502
- "pl7.app/table/orderPriority": "8500"
503
- }
418
+ annotations: addTableAnnotations(8500, false, "J gene identity", {})
504
419
  }
505
420
  })
506
421
 
@@ -516,11 +431,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
516
431
  "pl7.app/vdj/features": assemblingFeature,
517
432
  "pl7.app/alphabet": "nucleotide"
518
433
  },
519
- annotations: {
520
- "pl7.app/label": assemblingFeature+" nt mutations based on MRCA",
521
- "pl7.app/table/visibility": "optional",
522
- "pl7.app/table/orderPriority": "8400"
523
- }
434
+ annotations: addTableAnnotations(8400, false, assemblingFeature+" nt mutations based on MRCA", {})
524
435
  }
525
436
  })
526
437
 
@@ -536,11 +447,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
536
447
  "pl7.app/vdj/features": assemblingFeature,
537
448
  "pl7.app/alphabet": "aminoacid"
538
449
  },
539
- annotations: {
540
- "pl7.app/label": assemblingFeature+" aa mutations based on MRCA",
541
- "pl7.app/table/visibility": "optional",
542
- "pl7.app/table/orderPriority": "8300"
543
- }
450
+ annotations: addTableAnnotations(8300, false, assemblingFeature+" aa mutations based on MRCA", {})
544
451
  }
545
452
  })
546
453
 
@@ -556,11 +463,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
556
463
  "pl7.app/vdj/features": assemblingFeature,
557
464
  "pl7.app/alphabet": "nucleotide"
558
465
  },
559
- annotations: {
560
- "pl7.app/label": assemblingFeature+" nt mutations based on germline",
561
- "pl7.app/table/visibility": "optional",
562
- "pl7.app/table/orderPriority": "8200"
563
- }
466
+ annotations: addTableAnnotations(8200, false, assemblingFeature+" nt mutations based on germline", {})
564
467
  }
565
468
  })
566
469
 
@@ -576,11 +479,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
576
479
  "pl7.app/vdj/features": assemblingFeature,
577
480
  "pl7.app/alphabet": "aminoacid"
578
481
  },
579
- annotations: {
580
- "pl7.app/label": assemblingFeature+" aa mutations based on germline",
581
- "pl7.app/table/visibility": "optional",
582
- "pl7.app/table/orderPriority": "8100"
583
- }
482
+ annotations: addTableAnnotations(8100, false, assemblingFeature+" aa mutations based on germline", {})
584
483
  }
585
484
  })
586
485
 
@@ -596,11 +495,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
596
495
  "pl7.app/vdj/features": assemblingFeature,
597
496
  "pl7.app/alphabet": "nucleotide"
598
497
  },
599
- annotations: {
600
- "pl7.app/label": assemblingFeature+" nt mutations count based on MRCA",
601
- "pl7.app/table/visibility": "optional",
602
- "pl7.app/table/orderPriority": "8000"
603
- }
498
+ annotations: addTableAnnotations(8000, false, assemblingFeature+" nt mutations count based on MRCA", {})
604
499
  }
605
500
  })
606
501
 
@@ -616,11 +511,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
616
511
  "pl7.app/vdj/features": assemblingFeature,
617
512
  "pl7.app/alphabet": "aminoacid"
618
513
  },
619
- annotations: {
620
- "pl7.app/label": assemblingFeature+" aa mutations count based on MRCA",
621
- "pl7.app/table/visibility": "optional",
622
- "pl7.app/table/orderPriority": "7900"
623
- }
514
+ annotations: addTableAnnotations(7900, false, assemblingFeature+" aa mutations count based on MRCA", {})
624
515
  }
625
516
  })
626
517
 
@@ -636,11 +527,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
636
527
  "pl7.app/vdj/features": assemblingFeature,
637
528
  "pl7.app/alphabet": "nucleotide"
638
529
  },
639
- annotations: {
640
- "pl7.app/label": assemblingFeature+" nt mutations count based on germline",
641
- "pl7.app/table/visibility": "optional",
642
- "pl7.app/table/orderPriority": "7800"
643
- }
530
+ annotations: addTableAnnotations(7800, false, assemblingFeature+" nt mutations count based on germline", {})
644
531
  }
645
532
  })
646
533
 
@@ -656,11 +543,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
656
543
  "pl7.app/vdj/features": assemblingFeature,
657
544
  "pl7.app/alphabet": "aminoacid"
658
545
  },
659
- annotations: {
660
- "pl7.app/label": assemblingFeature+" aa mutations count based on germline",
661
- "pl7.app/table/visibility": "optional",
662
- "pl7.app/table/orderPriority": "7700"
663
- }
546
+ annotations: addTableAnnotations(7700, false, assemblingFeature+" aa mutations count based on germline", {})
664
547
  }
665
548
  })
666
549
 
@@ -675,13 +558,10 @@ shmTreeNodesTableOptions := func(dataDescription) {
675
558
  domain: {
676
559
  "pl7.app/vdj/reference": "VGene"
677
560
  },
678
- annotations: {
561
+ annotations: addTableAnnotations(49000, true, "V gene", {
679
562
  type: "V gene name",
680
- "pl7.app/label": "V gene",
681
- "pl7.app/isDiscreteFilter": "true",
682
- "pl7.app/table/visibility": "default",
683
- "pl7.app/table/orderPriority": "49000"
684
- }
563
+ "pl7.app/isDiscreteFilter": "true"
564
+ })
685
565
  }
686
566
  })
687
567
 
@@ -696,13 +576,10 @@ shmTreeNodesTableOptions := func(dataDescription) {
696
576
  domain: {
697
577
  "pl7.app/vdj/reference": "JGene"
698
578
  },
699
- annotations: {
579
+ annotations: addTableAnnotations(47000, true, "J gene", {
700
580
  type: "J gene name",
701
- "pl7.app/label": "J gene",
702
- "pl7.app/isDiscreteFilter": "true",
703
- "pl7.app/table/visibility": "default",
704
- "pl7.app/table/orderPriority": "47000"
705
- }
581
+ "pl7.app/isDiscreteFilter": "true"
582
+ })
706
583
  }
707
584
  })
708
585
 
@@ -726,12 +603,9 @@ shmTreeNodesTableOptions := func(dataDescription) {
726
603
  "pl7.app/vdj/feature": feature,
727
604
  "pl7.app/alphabet": "nucleotide"
728
605
  },
729
- annotations: {
730
- "pl7.app/type": "sequence",
731
- "pl7.app/label": feature + " nt",
732
- "pl7.app/table/visibility": visibility,
733
- "pl7.app/table/orderPriority": string(orderPriority)
734
- }
606
+ annotations: addTableAnnotations(orderPriority, visibility == "default", feature + " nt", {
607
+ "pl7.app/type": "sequence"
608
+ })
735
609
  }
736
610
  })
737
611
  orderPriority -= 100
@@ -747,12 +621,9 @@ shmTreeNodesTableOptions := func(dataDescription) {
747
621
  "pl7.app/vdj/feature": feature,
748
622
  "pl7.app/alphabet": "aminoacid"
749
623
  },
750
- annotations: {
751
- "pl7.app/type": "sequence",
752
- "pl7.app/label": feature + " aa",
753
- "pl7.app/table/visibility": visibility,
754
- "pl7.app/table/orderPriority": string(orderPriority)
755
- }
624
+ annotations: addTableAnnotations(orderPriority, visibility == "default", feature + " aa", {
625
+ "pl7.app/type": "sequence"
626
+ })
756
627
  }
757
628
  })
758
629
  orderPriority -= 100
@@ -770,12 +641,9 @@ shmTreeNodesTableOptions := func(dataDescription) {
770
641
  "pl7.app/vdj/feature": assemblingFeature,
771
642
  "pl7.app/alphabet": "nucleotide"
772
643
  },
773
- annotations: {
774
- "pl7.app/type": "sequence",
775
- "pl7.app/label": assemblingFeature + " nt",
776
- "pl7.app/table/visibility": "default",
777
- "pl7.app/table/orderPriority": "30000"
778
- }
644
+ annotations: addTableAnnotations(30000, true, assemblingFeature + " nt", {
645
+ "pl7.app/type": "sequence"
646
+ })
779
647
  }
780
648
  })
781
649
 
@@ -791,12 +659,9 @@ shmTreeNodesTableOptions := func(dataDescription) {
791
659
  "pl7.app/vdj/feature": assemblingFeature,
792
660
  "pl7.app/alphabet": "aminoacid"
793
661
  },
794
- annotations: {
795
- "pl7.app/type": "sequence",
796
- "pl7.app/label": assemblingFeature + " aa",
797
- "pl7.app/table/visibility": "default",
798
- "pl7.app/table/orderPriority": "29000"
799
- }
662
+ annotations: addTableAnnotations(29000, true, assemblingFeature + " aa", {
663
+ "pl7.app/type": "sequence"
664
+ })
800
665
  }
801
666
  })
802
667
 
@@ -813,7 +678,7 @@ shmTreeNodesTableOptions := func(dataDescription) {
813
678
 
814
679
 
815
680
 
816
- shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
681
+ shmTreeNodesWithClones := func(dataDescription, donorColumn) {
817
682
  donorColumnSpec := donorColumn.spec
818
683
 
819
684
  axes := []
@@ -826,12 +691,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
826
691
  spec: {
827
692
  name: "pl7.app/dendrogram/treeId",
828
693
  type: "Long",
829
- domain: { },
830
- annotations: {
831
- "pl7.app/label": "Tree id",
832
- "pl7.app/table/visibility": "default",
833
- "pl7.app/table/orderPriority": "100000"
834
- }
694
+ annotations: addTableAnnotations(100000, true, "Tree id", {})
835
695
  }
836
696
  })
837
697
 
@@ -842,12 +702,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
842
702
  spec: {
843
703
  name: "pl7.app/dendrogram/subtreeId",
844
704
  type: "Long",
845
- domain: { },
846
- annotations: {
847
- "pl7.app/label": "Chain id",
848
- "pl7.app/table/visibility": "default",
849
- "pl7.app/table/orderPriority": "90000"
850
- }
705
+ annotations: addTableAnnotations(90000, true, "Chain id", {})
851
706
  }
852
707
  })
853
708
  }
@@ -858,12 +713,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
858
713
  spec: {
859
714
  name: "pl7.app/dendrogram/nodeId",
860
715
  type: "Long",
861
- domain: { },
862
- annotations: {
863
- "pl7.app/label": "Node id",
864
- "pl7.app/table/visibility": "default",
865
- "pl7.app/table/orderPriority": "80000"
866
- }
716
+ annotations: addTableAnnotations(80000, true, "Node id", {})
867
717
  }
868
718
  })
869
719
 
@@ -880,12 +730,9 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
880
730
  }
881
731
  ],
882
732
  spec: donorColumnSpec.axesSpec[0],
883
- annotations: {
884
- "pl7.app/label": "Sample name",
885
- "pl7.app/isDiscreteFilter": "true",
886
- "pl7.app/table/visibility": "default",
887
- "pl7.app/table/orderPriority": "110000"
888
- }
733
+ annotations: addTableAnnotations(110000, true, "Sample name", {
734
+ "pl7.app/isDiscreteFilter": "true"
735
+ })
889
736
  })
890
737
 
891
738
  cmdArgs = append(cmdArgs, "-cloneId")
@@ -899,11 +746,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
899
746
  name: "pl7.app/vdj/cloneId",
900
747
  type: "Long",
901
748
 
902
- annotations: {
903
- "pl7.app/label": "Clone id",
904
- "pl7.app/table/visibility": "default",
905
- "pl7.app/table/orderPriority": "70000"
906
- }
749
+ annotations: addTableAnnotations(70000, true, "Clone id", {})
907
750
  }
908
751
  })
909
752
 
@@ -916,11 +759,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
916
759
  spec: {
917
760
  name: "pl7.app/vdj/uniqueCellCount",
918
761
  valueType: "Long",
919
- annotations: {
920
- "pl7.app/label": "Number of cells",
921
- "pl7.app/table/visibility": "default",
922
- "pl7.app/table/orderPriority": "60000"
923
- }
762
+ annotations: addTableAnnotations(60000, true, "Number of cells", {})
924
763
  }
925
764
  })
926
765
  }
@@ -934,11 +773,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
934
773
  spec: {
935
774
  name: "pl7.app/vdj/uniqueMoleculeCount",
936
775
  valueType: "Long",
937
- annotations: {
938
- "pl7.app/label": "Number of molecules",
939
- "pl7.app/table/visibility": "default",
940
- "pl7.app/table/orderPriority": "59000"
941
- }
776
+ annotations: addTableAnnotations(59000, true, "Number of molecules", {})
942
777
  }
943
778
  })
944
779
  }
@@ -951,11 +786,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
951
786
  spec: {
952
787
  name: "pl7.app/vdj/readCount",
953
788
  valueType: "Long",
954
- annotations: {
955
- "pl7.app/label": "Number of Reads",
956
- "pl7.app/table/visibility": "default",
957
- "pl7.app/table/orderPriority": "58000"
958
- }
789
+ annotations: addTableAnnotations(58000, true, "Number of Reads", {})
959
790
  }
960
791
  })
961
792
 
@@ -967,11 +798,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
967
798
  spec: {
968
799
  name: "pl7.app/vdj/readFraction",
969
800
  valueType: "Double",
970
- annotations: {
971
- "pl7.app/label": "Fraction of reads",
972
- "pl7.app/table/visibility": "default",
973
- "pl7.app/table/orderPriority": "57000"
974
- }
801
+ annotations: addTableAnnotations(57000, true, "Fraction of reads", {})
975
802
  }
976
803
  })
977
804
 
@@ -986,13 +813,10 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
986
813
  domain: {
987
814
  "pl7.app/vdj/reference": "DGene"
988
815
  },
989
- annotations: {
816
+ annotations: addTableAnnotations(48000, true, "Best D hit", {
990
817
  type: "D gene name",
991
- "pl7.app/label": "Best D hit",
992
- "pl7.app/isDiscreteFilter": "true",
993
- "pl7.app/table/visibility": "default",
994
- "pl7.app/table/orderPriority": "48000"
995
- }
818
+ "pl7.app/isDiscreteFilter": "true"
819
+ })
996
820
  }
997
821
  })
998
822
 
@@ -1007,13 +831,10 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
1007
831
  domain: {
1008
832
  "pl7.app/vdj/reference": "CGene"
1009
833
  },
1010
- annotations: {
834
+ annotations: addTableAnnotations(46000, true, "Best C hit", {
1011
835
  type: "C gene name",
1012
- "pl7.app/label": "Best C hit",
1013
- "pl7.app/isDiscreteFilter": "true",
1014
- "pl7.app/table/visibility": "default",
1015
- "pl7.app/table/orderPriority": "46000"
1016
- }
836
+ "pl7.app/isDiscreteFilter": "true"
837
+ })
1017
838
  }
1018
839
  })
1019
840
 
@@ -1025,12 +846,9 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
1025
846
  spec: {
1026
847
  valueType: "String",
1027
848
  name: "pl7.app/vdj/isotype",
1028
- annotations: {
1029
- "pl7.app/label": "IG isotype",
1030
- "pl7.app/isDiscreteFilter": "true",
1031
- "pl7.app/table/visibility": "default",
1032
- "pl7.app/table/orderPriority": "50000"
1033
- }
849
+ annotations: addTableAnnotations(50000, true, "IG isotype", {
850
+ "pl7.app/isDiscreteFilter": "true"
851
+ })
1034
852
  }
1035
853
  })
1036
854
 
@@ -1045,7 +863,7 @@ shmTreeNodesWithClonesTableOptions := func(dataDescription, donorColumn) {
1045
863
  }
1046
864
  }
1047
865
 
1048
- shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
866
+ shmTreeNodesUniqueIsotype := func(dataDescription) {
1049
867
 
1050
868
  axes := []
1051
869
  columns := []
@@ -1055,12 +873,7 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1055
873
  spec: {
1056
874
  name: "pl7.app/dendrogram/treeId",
1057
875
  type: "Long",
1058
- domain: { },
1059
- annotations: {
1060
- "pl7.app/label": "Tree id",
1061
- "pl7.app/table/visibility": "default",
1062
- "pl7.app/table/orderPriority": "100000"
1063
- }
876
+ annotations: addTableAnnotations(100000, true, "Tree id", {})
1064
877
  }
1065
878
  })
1066
879
 
@@ -1070,12 +883,7 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1070
883
  spec: {
1071
884
  name: "pl7.app/dendrogram/subtreeId",
1072
885
  type: "Long",
1073
- domain: { },
1074
- annotations: {
1075
- "pl7.app/label": "Chain id",
1076
- "pl7.app/table/visibility": "default",
1077
- "pl7.app/table/orderPriority": "90000"
1078
- }
886
+ annotations: addTableAnnotations(90000, true, "Chain id", {})
1079
887
  }
1080
888
  })
1081
889
  }
@@ -1085,12 +893,7 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1085
893
  spec: {
1086
894
  name: "pl7.app/dendrogram/nodeId",
1087
895
  type: "Long",
1088
- domain: { },
1089
- annotations: {
1090
- "pl7.app/label": "Node id",
1091
- "pl7.app/table/visibility": "default",
1092
- "pl7.app/table/orderPriority": "80000"
1093
- }
896
+ annotations: addTableAnnotations(80000, true, "Node id", {})
1094
897
  }
1095
898
  })
1096
899
 
@@ -1101,11 +904,7 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1101
904
  spec: {
1102
905
  name: "pl7.app/vdj/readCount",
1103
906
  valueType: "Long",
1104
- annotations: {
1105
- "pl7.app/label": "Top clone reads number",
1106
- "pl7.app/table/visibility": "optional",
1107
- "pl7.app/table/orderPriority": "58000"
1108
- }
907
+ annotations: addTableAnnotations(58000, false, "Top clone reads number", {})
1109
908
  }
1110
909
  })
1111
910
 
@@ -1116,12 +915,9 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1116
915
  spec: {
1117
916
  valueType: "String",
1118
917
  name: "pl7.app/vdj/isotype",
1119
- annotations: {
1120
- "pl7.app/label": "Top IG isotype",
1121
- "pl7.app/isDiscreteFilter": "true",
1122
- "pl7.app/table/visibility": "optional",
1123
- "pl7.app/table/orderPriority": "50000"
1124
- }
918
+ annotations: addTableAnnotations(50000, false, "Top IG isotype", {
919
+ "pl7.app/isDiscreteFilter": "true"
920
+ })
1125
921
  }
1126
922
  })
1127
923
 
@@ -1137,8 +933,8 @@ shmTreeNodesUniqueIsotypeTableOptions := func(dataDescription) {
1137
933
 
1138
934
 
1139
935
  export ll.toStrict({
1140
- shmTreeTableOptions: shmTreeTableOptions,
1141
- shmTreeNodesTableOptions: shmTreeNodesTableOptions,
1142
- shmTreeNodesWithClonesTableOptions: shmTreeNodesWithClonesTableOptions,
1143
- shmTreeNodesUniqueIsotypeTableOptions: shmTreeNodesUniqueIsotypeTableOptions
936
+ shmTree: shmTree,
937
+ shmTreeNodes: shmTreeNodes,
938
+ shmTreeNodesWithClones: shmTreeNodesWithClones,
939
+ shmTreeNodesUniqueIsotype: shmTreeNodesUniqueIsotype
1144
940
  })