@abi-software/mapintegratedvuer 0.7.2-vue3.0-alpha.0 → 1.0.1

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.
Files changed (65) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +150 -150
  3. package/assets/styleguide.css +19 -19
  4. package/cypress.config.js +23 -23
  5. package/dist/index.html +17 -17
  6. package/dist/mapintegratedvuer.js +74289 -73840
  7. package/dist/mapintegratedvuer.umd.cjs +878 -515
  8. package/dist/style.css +1 -1
  9. package/package.json +134 -135
  10. package/public/index.html +17 -17
  11. package/reporter-config.json +9 -9
  12. package/src/App.vue +245 -245
  13. package/src/assets/_variables.scss +43 -43
  14. package/src/assets/fonts/mapicon-species.eot +0 -0
  15. package/src/assets/fonts/mapicon-species.ttf +0 -0
  16. package/src/assets/fonts/mapicon-species.woff +0 -0
  17. package/src/assets/header-icon.scss +67 -67
  18. package/src/assets/mapicon-species-style.css +41 -41
  19. package/src/assets/styles.scss +9 -9
  20. package/src/components/ContentBar.vue +376 -376
  21. package/src/components/ContentVuer.vue +217 -217
  22. package/src/components/ContextCard.vue +385 -385
  23. package/src/components/ContextHelp.vue +73 -73
  24. package/src/components/CustomSplitter.vue +151 -151
  25. package/src/components/DatasetHeader.vue +97 -97
  26. package/src/components/DialogToolbarContent.vue +464 -464
  27. package/src/components/EventBus.js +3 -3
  28. package/src/components/FlatmapContextCard.vue +134 -134
  29. package/src/components/MapContent.vue +328 -333
  30. package/src/components/ResizeSensor.vue +47 -47
  31. package/src/components/SearchControls.vue +115 -115
  32. package/src/components/SimulatedData.js +721 -721
  33. package/src/components/SplitDialog.vue +287 -287
  34. package/src/components/SplitFlow.vue +414 -414
  35. package/src/components/index.js +7 -7
  36. package/src/components/markerZoomLevelsHardCoded.js +255 -255
  37. package/src/components/scripts/utilities.js +173 -173
  38. package/src/components/viewers/Flatmap.vue +145 -145
  39. package/src/components/viewers/Iframe.vue +31 -31
  40. package/src/components/viewers/MultiFlatmap.vue +384 -384
  41. package/src/components/viewers/Plot.vue +23 -23
  42. package/src/components/viewers/Scaffold.vue +198 -198
  43. package/src/components/viewers/Simulation.vue +21 -21
  44. package/src/icons/yellowstar.js +1 -1
  45. package/src/main.js +31 -31
  46. package/src/mixins/ContentMixin.js +438 -438
  47. package/src/mixins/DynamicMarkerMixin.js +88 -88
  48. package/src/mixins/S3Bucket.vue +37 -37
  49. package/src/stores/entries.js +40 -40
  50. package/src/stores/index.js +23 -23
  51. package/src/stores/settings.js +144 -144
  52. package/src/stores/splitFlow.js +523 -523
  53. package/static.json +7 -7
  54. package/vite.config.js +70 -70
  55. package/vite.static-build.js +12 -12
  56. package/vitest.workspace.js +3 -3
  57. package/vuese-generator.js +65 -65
  58. package/assets/gazelle-icons-no-background.css +0 -32
  59. package/dist/matterport.pdf +0 -0
  60. package/dist/test.txt +0 -0
  61. package/public/matterport.pdf +0 -0
  62. package/public/test.txt +0 -0
  63. package/q.json +0 -690
  64. package/src/mixins/RetrieveContextCardMixin.js +0 -82
  65. package/tsconfig.json +0 -19
@@ -1,721 +1,721 @@
1
- const nerveMaps = [
2
- {
3
- "id": "ilxtr:neuron-type-keast-13",
4
- "centrelines": [
5
- "n_71"
6
- ]
7
- },
8
- {
9
- "id": "ilxtr:neuron-type-keast-2",
10
- "centrelines": [
11
- "bladder_n"
12
- ]
13
- },
14
- {
15
- "id": "ilxtr:neuron-type-keast-3",
16
- "centrelines": [
17
- "bladder_n",
18
- "hypogastric_n"
19
- ]
20
- },
21
- {
22
- "id": "ilxtr:neuron-type-keast-15",
23
- "centrelines": [
24
- "n_73"
25
- ]
26
- },
27
- {
28
- "id": "ilxtr:neuron-type-keast-1",
29
- "centrelines": [
30
- "bladder_n"
31
- ]
32
- },
33
- {
34
- "id": "ilxtr:neuron-type-keast-7",
35
- "centrelines": [
36
- "L1_ventral_root_ramus",
37
- "L1_spinal_n-1",
38
- "lumbar_splanchnic_n",
39
- "L2_spinal_n",
40
- "L2_ventral_root_ramus"
41
- ]
42
- },
43
- {
44
- "id": "ilxtr:neuron-type-keast-9",
45
- "centrelines": [
46
- "L6_spinal_n-1",
47
- "L6_ventral_root",
48
- "pudendal_n",
49
- "L5_spinal_n",
50
- "L5_ventral_root"
51
- ]
52
- },
53
- {
54
- "id": "ilxtr:neuron-type-keast-10",
55
- "centrelines": [
56
- "S1_dorsal_root",
57
- "S1_spinal_n-2",
58
- "pelvic_splanchnic_n",
59
- "L6_spinal_n-2",
60
- "L6_dorsal_root",
61
- "bladder_n"
62
- ]
63
- },
64
- {
65
- "id": "ilxtr:neuron-type-keast-11",
66
- "centrelines": [
67
- "lumbar_splanchnic_n",
68
- "L2_spinal_n",
69
- "L1_spinal_n-1",
70
- "hypogastric_n",
71
- "bladder_n",
72
- "L1_dorsal_root",
73
- "L2_dorsal_root"
74
- ]
75
- },
76
- {
77
- "id": "ilxtr:neuron-type-keast-12",
78
- "centrelines": [
79
- "L6_spinal_n-1",
80
- "L6_dorsal_root",
81
- "pudendal_n",
82
- "S1_spinal_n-1",
83
- "S1_dorsal_root"
84
- ]
85
- },
86
- {
87
- "id": "ilxtr:neuron-type-keast-8",
88
- "centrelines": [
89
- "L1_ventral_root_paravertebral_ganglion",
90
- "L1-L2_interganglionic_segment",
91
- "sympathetic_trunk_T13-L1",
92
- "L2_ventral_root_paravertebral_ganglion",
93
- "sympathetic_trunk_L2-L3",
94
- "sympathetic_trunk_L4-L5",
95
- "sympathetic_trunk_L3-L4",
96
- "sympathetic_trunk_L5-L6",
97
- "sympathetic_trunk_T12-T13"
98
- ]
99
- },
100
- {
101
- "id": "ilxtr:neuron-type-keast-20",
102
- "centrelines": [
103
- "T1_T2_cns",
104
- "C8_T1_cns",
105
- "T2_T3_cns",
106
- "T10_T11_cns",
107
- "T9_T10_cns",
108
- "T11_T12_cns",
109
- "T8_T9_cns",
110
- "C7_C8_cns",
111
- "C6_C7_cns",
112
- "C4_C5_cns",
113
- "C3_C4_cns",
114
- "C5_C6_cns",
115
- "medulla_C1_cns",
116
- "pons_medulla_cns",
117
- "C1_C2_cns",
118
- "T5_T6_cns",
119
- "T4_T5_cns",
120
- "T6_T7_cns",
121
- "L3_L4_cns",
122
- "L2_L3_cns",
123
- "L4_L5_cns",
124
- "L5_L6_cns",
125
- "T13_L1_cns",
126
- "T12_T13_cns",
127
- "L1_L2_cns",
128
- "T3_T4_cns",
129
- "n_69",
130
- "C2_C3_cns",
131
- "T7_T8_cns"
132
- ]
133
- },
134
- {
135
- "id": "ilxtr:neuron-type-keast-16",
136
- "centrelines": [
137
- "n_74"
138
- ]
139
- },
140
- {
141
- "id": "ilxtr:neuron-type-keast-4",
142
- "centrelines": [
143
- "sympathetic_trunk_L6-S1",
144
- "L6_gray_ramus-spinal_n",
145
- "sympathetic_trunk_L5-L6",
146
- "S1_gray_ramus-spinal_n",
147
- "S1_spinal_n-2",
148
- "pelvic_splanchnic_n",
149
- "L6_spinal_n-2",
150
- "L1-L2_interganglionic_segment",
151
- "sympathetic_trunk_T13-L1",
152
- "sympathetic_trunk_L2-L3",
153
- "bladder_n",
154
- "sympathetic_trunk_L4-L5",
155
- "sympathetic_trunk_L3-L4",
156
- "sympathetic_trunk_T12-T13"
157
- ]
158
- },
159
- {
160
- "id": "ilxtr:neuron-type-keast-17",
161
- "centrelines": [
162
- "n_75"
163
- ]
164
- },
165
- {
166
- "id": "ilxtr:neuron-type-keast-5",
167
- "centrelines": [
168
- "S1_ventral_root",
169
- "S1_spinal_n-2",
170
- "pelvic_splanchnic_n",
171
- "L6_spinal_n-2",
172
- "L6_ventral_root"
173
- ]
174
- },
175
- {
176
- "id": "ilxtr:neuron-type-keast-18",
177
- "centrelines": [
178
- "n_70"
179
- ]
180
- },
181
- {
182
- "id": "ilxtr:neuron-type-keast-6",
183
- "centrelines": [
184
- "L1_ventral_root_ramus",
185
- "L1_spinal_n-1",
186
- "lumbar_splanchnic_n",
187
- "L2_spinal_n",
188
- "hypogastric_n",
189
- "L2_ventral_root_ramus"
190
- ]
191
- },
192
- {
193
- "id": "ilxtr:neuron-type-keast-19",
194
- "centrelines": [
195
- "n_69"
196
- ]
197
- },
198
- {
199
- "id": "ilxtr:neuron-type-keast-14",
200
- "centrelines": [
201
- "n_72"
202
- ]
203
- }
204
- ];
205
-
206
-
207
-
208
- /* eslint-disable no-alert, no-console */
209
- function getGenericMarkerInfo(term ,label, dataset, scaffold, simulations) {
210
- let data = {};
211
- data.dataset = dataset;
212
- data.scaffold = scaffold;
213
- data.simulations = simulations;
214
- if (label)
215
- data.title = label;
216
- else
217
- data.title = term;
218
- data.description = "";
219
- data.actions = [];
220
- if (term) {
221
- switch (term) {
222
- case "ICN":
223
- data.title = "RNA";
224
- data.description = "The distribution of neurons in the intrinsic cardiac nervous system (ICN) were mapped and visualized in a 3D reconstruction of a male rat heart.";
225
- data.actions = {
226
- search: {
227
- title: "Explore data",
228
- resource: "icn",
229
- type: "Search",
230
- label: "ICN",
231
- filter: {
232
- facet: 'genotype',
233
- term: 'heart'
234
- },
235
- },
236
- plot: {
237
- title: "View plot",
238
- label: "ICN",
239
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/ISAN/csv-data/use-case-4/RNA_Seq.csv",
240
- type: "Plot",
241
- plotType: "heatmap",
242
- datasetTitle: "Molecular Phenotype Distribution of Single Rat Intracardiac Neurons",
243
- datasetDescription: "Images collected from serial cryostat sectioning of a cryopreserved heart was used to reconstruct the 3D context. Transcriptional profiles taken from isolated single neurons and mapped back into the previously generated 3D context.",
244
- datasetUrl: "https://discover.pennsieve.io/datasets/29",
245
- datasetImage: "https://assets.discover.pennsieve.io/dataset-assets/29/6/revisions/1/banner.jpg"
246
- },
247
- };
248
- break;
249
- default:
250
- break;
251
- }
252
- } else {
253
- data.actions = [];
254
- }
255
- return data;
256
- }
257
-
258
-
259
- function getHumanData(term, label, dataset, scaffold, simulations) {
260
- if (term || label) {
261
- let data = {};
262
- switch (term) {
263
- case "UBERON:0001157":
264
- data.title = "Colon";
265
- data.description = "";
266
- data.actions = {
267
- search: {
268
- title: "Explore data",
269
- label: "Colon",
270
- resource: "https://sparc.science/data?type=dataset&q=colon",
271
- type: "Search",
272
- filter: {
273
- facet: 'genotype',
274
- term: 'colon'
275
- },
276
- },
277
- scaffold: {
278
- title: "View 3D scaffold",
279
- label: "Colon",
280
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/human/humanColon_metadata.json",
281
- type: "Scaffold"
282
- },
283
- };
284
- break;
285
- case "UBERON:0000948":
286
- case "UBERON:0002080": {
287
- data.title = "Heart";
288
- data.description = "";
289
- data.actions = {
290
- search: {
291
- title: "Explore data",
292
- label: "Heart",
293
- resource: "https://sparc.science/data?type=dataset&q=colon",
294
- type: "Search",
295
- filter: {
296
- facet: 'genotype',
297
- term: 'heart'
298
- },
299
- },
300
- scaffold: {
301
- title: "View 3D scaffold",
302
- label: "Heart",
303
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/human/humanHeart_metadata.json",
304
- type: "Scaffold"
305
- },
306
- };
307
- }
308
- break;
309
- case "UBERON:0002048":
310
- data.title = "Lung";
311
- data.description = "";
312
- data.actions = {
313
- search: {
314
- title: "Explore data",
315
- label: "Lung",
316
- resource: "https://sparc.science/data?type=dataset&q=lung",
317
- type: "Search"
318
- },
319
- scaffold: {
320
- title: "View 3D scaffold",
321
- label: "Lung",
322
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Lungs/human/humanLeftLung_metadata.json",
323
- type: "Scaffold"
324
- },
325
- };
326
- break;
327
- default:
328
- data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
329
- break;
330
- }
331
- return data;
332
- }
333
- return undefined;
334
- }
335
-
336
- function getRatData(term, label, dataset, scaffold, simulations) {
337
- if (term || label) {
338
- let data = {};
339
- switch (term) {
340
- case "UBERON:0000948":
341
- case "UBERON:0002080":
342
- if (!simulations) {
343
- data.title = "Heart";
344
- data.description = "";
345
- data.actions = {
346
- search: {
347
- title: "Explore data",
348
- label: "Heart",
349
- resource: "https://sparc.science/data?type=dataset&q=heart",
350
- type: "Search",
351
- filter: {
352
- facet: 'genotype',
353
- term: 'heart'
354
- },
355
- },
356
- scaffold: {
357
- title: "View 3D scaffold",
358
- label: "Heart",
359
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/rat/ratHeart_metadata.json",
360
- type: "Scaffold"
361
- },
362
- simulation: {
363
- title: "Explore simulations",
364
- label: "Heart",
365
- resource: "https://sparc.science/data?type=simulation&q=heart",
366
- type: "URL"
367
- },
368
- };
369
- } else {
370
- data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
371
- }
372
- break;
373
- case "UBERON:0001156":
374
- data.title = "Colon";
375
- data.description = "";
376
- data.actions = {
377
- search: {
378
- title: "Explore data",
379
- label: "Colon",
380
- resource: "https://sparc.science/data?type=dataset&q=colon",
381
- type: "Search"
382
- },
383
- };
384
- break;
385
- case "UBERON:0002108":
386
- data.title = "Small intestines";
387
- data.description = "";
388
- data.actions = {
389
- search: {
390
- title: "Explore data",
391
- label: "Colon",
392
- resource: "https://sparc.science/data?type=dataset&q=small+intestines",
393
- type: "Search"
394
- },
395
- };
396
- break;
397
- case "UBERON:0001255":
398
- data.title = "Urinary bladder";
399
- data.description = "";
400
- data.actions = {
401
- search: {
402
- title: "Explore data",
403
- label: "Urinary Bladder",
404
- resource: "https://sparc.science/data?type=dataset&q=bladder",
405
- type: "Search"
406
- },
407
- scaffold: {
408
- title: "View 3D scaffold",
409
- label: "Bladder",
410
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Bladder/rat/ratBladder_metadata.json",
411
- type: "Scaffold"
412
- },
413
- };
414
- break;
415
- case "UBERON:0002048":
416
- data.title = "Lung";
417
- data.description = "";
418
- data.actions = {
419
- search: {
420
- title: "Explore data",
421
- label: "Lung",
422
- resource: "https://sparc.science/data?type=dataset&q=lung",
423
- type: "Search"
424
- },
425
- };
426
- break;
427
- case "ICN":
428
- data.title = "RNA";
429
- data.description = "The distribution of neurons in the intrinsic cardiac nervous system (ICN) were mapped and visualized in a 3D reconstruction of a male rat heart.";
430
- data.actions = {
431
- search: {
432
- title: "Explore data",
433
- resource: "icn",
434
- type: "Search"
435
- },
436
- plot: {
437
- title: "View plot",
438
- label: "ICN",
439
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/ISAN/csv-data/use-case-4/RNA_Seq.csv",
440
- type: "Plot",
441
- plotType: "heatmap",
442
- datasetTitle: "Molecular Phenotype Distribution of Single Rat Intracardiac Neurons",
443
- datasetDescription: "Images collected from serial cryostat sectioning of a cryopreserved heart was used to reconstruct the 3D context. Transcriptional profiles taken from isolated single neurons and mapped back into the previously generated 3D context.",
444
- datasetUrl: "https://discover.pennsieve.io/datasets/29",
445
- datasetImage: "https://assets.discover.pennsieve.io/dataset-assets/29/6/revisions/1/banner.jpg"
446
- },
447
- };
448
- break;
449
- case "UBERON:0000945":
450
- case "UBERON:0001160":
451
- case "UBERON:0001161":
452
- data.title = "Stomach";
453
- data.description = "";
454
- data.actions = {
455
- search: {
456
- title: "Explore data",
457
- label: "Stomach",
458
- resource: "https://sparc.science/data?type=dataset&q=stomach",
459
- type: "Search"
460
- },
461
- scaffold: {
462
- title: "View 3D scaffold",
463
- label: "Stomach",
464
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Stomach/rat/ratStomach_metadata.json",
465
- type: "Scaffold"
466
- },
467
- };
468
- break;
469
- case "UBERON:0001759":
470
- if (label)
471
- data.title = label;
472
- else
473
- data.title = "Vagus nerve";
474
- data.actions = {
475
- search: {
476
- title: "Explore data",
477
- label: "Vagus nerve",
478
- resource: "https://sparc.science/data?type=dataset&q=vagus+nerve",
479
- type: "Search"
480
- },
481
- simulation: {
482
- title: "Explore simulations",
483
- label: "Vagus nerve",
484
- resource: "https://sparc.science/data?type=simulation&q=vagus%20nerve",
485
- type: "simulation"
486
- },
487
- };
488
- break;
489
- default:
490
- data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
491
- break;
492
- }
493
- return data;
494
- }
495
- return undefined;
496
- }
497
-
498
- function getMouseData(term, label, dataset, scaffold, simulations) {
499
- if (term || label) {
500
- let data = {};
501
- switch (term) {
502
- case "UBERON:0001156":
503
- data.title = "Colon";
504
- data.description = "";
505
- data.actions = {
506
- search: {
507
- title: "Explore data",
508
- label: "Colon",
509
- resource: "https://sparc.science/data?type=dataset&q=colon",
510
- type: "Search"
511
- },
512
- scaffold: {
513
- title: "View 3D scaffold",
514
- label: "Colon",
515
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/mouse/mouseColon_metadata.json",
516
- type: "Scaffold"
517
- },
518
- };
519
- break;
520
- case "UBERON:0002048":
521
- data.title = "Lung";
522
- data.description = "";
523
- data.actions = {
524
- search: {
525
- title: "Explore data",
526
- label: "Lung",
527
- resource: "https://sparc.science/data?type=dataset&q=lung",
528
- type: "Search"
529
- },
530
- scaffold: {
531
- title: "View 3D scaffold",
532
- label: "Lung",
533
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Lungs/mouse/mouseLeftLung_metadata.json",
534
- type: "Scaffold"
535
- },
536
- };
537
- break;
538
- case "UBERON:0002108":
539
- data.title = "Small intestines";
540
- data.description = "";
541
- data.actions = {
542
- search: {
543
- title: "Explore data",
544
- label: "Colon",
545
- resource: "https://sparc.science/data?type=dataset&q=small+intestines",
546
- type: "Search"
547
- },
548
- };
549
- break;
550
- default:
551
- data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
552
- break;
553
- }
554
- return data;
555
- }
556
- return undefined;
557
- }
558
-
559
- function getPigData(term, label, dataset, scaffold, simulations) {
560
- if (term || label) {
561
- let data = {};
562
- switch (term) {
563
- case "UBERON:0008972":
564
- data.title = "Colon";
565
- data.description = "";
566
- data.actions = {
567
- search: {
568
- title: "Explore data",
569
- label: "Colon",
570
- resource: "https://sparc.science/data?type=dataset&q=colon",
571
- type: "Search"
572
- },
573
- scaffold: {
574
- title: "View 3D scaffold",
575
- label: "Colon",
576
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/pig/pigColon_metadata.json",
577
- type: "Scaffold"
578
- },
579
- };
580
- break;
581
- case "UBERON:0002108":
582
- data.title = "Small intestines";
583
- data.description = "";
584
- data.actions = {
585
- search: {
586
- title: "Explore data",
587
- label: "Colon",
588
- resource: "https://sparc.science/data?type=dataset&q=small+intestines",
589
- type: "Search"
590
- },
591
- };
592
- break;
593
- case "UBERON:0000948":
594
- case "UBERON:0002080": {
595
- data.title = "Heart";
596
- data.description = "";
597
- data.actions = {
598
- search: {
599
- title: "Explore data",
600
- label: "Heart",
601
- resource: "https://sparc.science/data?type=dataset&q=colon",
602
- type: "Search",
603
- filter: {
604
- facet: 'genotype',
605
- term: 'heart'
606
- },
607
- },
608
- scaffold: {
609
- title: "View 3D scaffold",
610
- label: "Heart",
611
- resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/pig/pigHeart_metadata.json",
612
- type: "Scaffold"
613
- },
614
- };
615
- }
616
- break;
617
- default:
618
- data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
619
- break;
620
- }
621
- return data;
622
- }
623
- return undefined;
624
- }
625
-
626
- function simulatedData(term, taxonomy, label, dataset, scaffold, simulations) {
627
- switch (taxonomy) {
628
- case "NCBITaxon:9606":
629
- return getHumanData(term, label, dataset, scaffold, simulations);
630
- case "NCBITaxon:9823":
631
- return getPigData(term, label, dataset, scaffold, simulations);
632
- case "NCBITaxon:10090":
633
- return getMouseData(term, label, dataset, scaffold, simulations);
634
- case "NCBITaxon:10114":
635
- return getRatData(term, label, dataset, scaffold, simulations);
636
- default:
637
- return getGenericMarkerInfo(term, taxonomy, label, dataset, scaffold, simulations);
638
- }
639
- }
640
-
641
- function getRatTerms() {
642
- return [
643
- {id: "UBERON:0000948", name: "Heart", type:"simulation"},
644
- {id: "UBERON:0001156", name: "Colon", type:"simulation"},
645
- {id: "UBERON:0001255", name: "Bladder", type:"simulation"},
646
- {id: "UBERON:0000945", name: "Stomach", type:"simulation"},
647
- {id: "UBERON:0001759", name: "Vagus nerve", type:"simulation"},
648
- {id: "UBERON:0002108", name: "Small intestines", type:"simulation"},
649
- {id: "UBERON:0002107", name: "Liver", type:"simulation"},
650
- ];
651
- }
652
-
653
- export function getAvailableTermsForSpecies() {
654
- return getRatTerms();
655
- }
656
-
657
- // Find the id/centre lines for the matchin centre lines/id
658
- export function getNerveNames(name) {
659
- if (name) {
660
- for (let i = 0; i < nerveMaps.length ; i++) {
661
- if (nerveMaps[i].id == name) {
662
- return nerveMaps[i].centrelines;
663
- }
664
- const found = nerveMaps[i].centrelines.find(element => element === name);
665
- if (found)
666
- return [nerveMaps[i].id];
667
- }
668
- }
669
- return [];
670
- }
671
-
672
- export function getParentsRegion(name) {
673
- if (name) {
674
- const lName = name.toLowerCase()
675
- if (lName.includes('heart')) {
676
- return {id: 'UBERON:0000948', name: 'Heart'};
677
- } else if (lName.includes('liver')) {
678
- return {id: 'UBERON:0002107', name: 'Liver'};
679
- } else if (lName.includes('stomach')) {
680
- return {id: 'UBERON:0000945', name: 'Stomach'};
681
- } else if (lName.includes('colon')) {
682
- return {id: 'UBERON:0001156', name: 'Colon'};
683
- } else if (lName.includes('bladder')) {
684
- return {id: 'UBERON:0001255', name: 'Bladder'};
685
- }
686
- }
687
- return undefined;
688
- }
689
-
690
- export function getInteractiveAction(result, action) {
691
- if (result && result.resource) {
692
- let resource = result.resource;
693
- if (Array.isArray(resource) && resource[0])
694
- resource = resource[0];
695
- let term = undefined;
696
- let label = undefined;
697
- let dataset = undefined;
698
- let scaffold = undefined;
699
- let simulations = undefined;
700
- let taxonomy = resource.taxonomy;
701
- if (resource.data && resource.data.id) {
702
- term = resource.data.id;
703
- label = resource.data.id;
704
- } else if (resource.feature) {
705
- term = resource.feature.models;
706
- label = resource.feature.label;
707
- dataset = resource.feature.dataset;
708
- scaffold = resource.feature.scaffold;
709
- simulations = resource.feature.simulations;
710
- }
711
- if (term || label) {
712
- let data = simulatedData(term, taxonomy, label, dataset, scaffold, simulations);
713
- if (data && data.actions) {
714
- return data.actions[action];
715
- }
716
- }
717
- }
718
- return undefined;
719
- }
720
-
721
- export { simulatedData };
1
+ const nerveMaps = [
2
+ {
3
+ "id": "ilxtr:neuron-type-keast-13",
4
+ "centrelines": [
5
+ "n_71"
6
+ ]
7
+ },
8
+ {
9
+ "id": "ilxtr:neuron-type-keast-2",
10
+ "centrelines": [
11
+ "bladder_n"
12
+ ]
13
+ },
14
+ {
15
+ "id": "ilxtr:neuron-type-keast-3",
16
+ "centrelines": [
17
+ "bladder_n",
18
+ "hypogastric_n"
19
+ ]
20
+ },
21
+ {
22
+ "id": "ilxtr:neuron-type-keast-15",
23
+ "centrelines": [
24
+ "n_73"
25
+ ]
26
+ },
27
+ {
28
+ "id": "ilxtr:neuron-type-keast-1",
29
+ "centrelines": [
30
+ "bladder_n"
31
+ ]
32
+ },
33
+ {
34
+ "id": "ilxtr:neuron-type-keast-7",
35
+ "centrelines": [
36
+ "L1_ventral_root_ramus",
37
+ "L1_spinal_n-1",
38
+ "lumbar_splanchnic_n",
39
+ "L2_spinal_n",
40
+ "L2_ventral_root_ramus"
41
+ ]
42
+ },
43
+ {
44
+ "id": "ilxtr:neuron-type-keast-9",
45
+ "centrelines": [
46
+ "L6_spinal_n-1",
47
+ "L6_ventral_root",
48
+ "pudendal_n",
49
+ "L5_spinal_n",
50
+ "L5_ventral_root"
51
+ ]
52
+ },
53
+ {
54
+ "id": "ilxtr:neuron-type-keast-10",
55
+ "centrelines": [
56
+ "S1_dorsal_root",
57
+ "S1_spinal_n-2",
58
+ "pelvic_splanchnic_n",
59
+ "L6_spinal_n-2",
60
+ "L6_dorsal_root",
61
+ "bladder_n"
62
+ ]
63
+ },
64
+ {
65
+ "id": "ilxtr:neuron-type-keast-11",
66
+ "centrelines": [
67
+ "lumbar_splanchnic_n",
68
+ "L2_spinal_n",
69
+ "L1_spinal_n-1",
70
+ "hypogastric_n",
71
+ "bladder_n",
72
+ "L1_dorsal_root",
73
+ "L2_dorsal_root"
74
+ ]
75
+ },
76
+ {
77
+ "id": "ilxtr:neuron-type-keast-12",
78
+ "centrelines": [
79
+ "L6_spinal_n-1",
80
+ "L6_dorsal_root",
81
+ "pudendal_n",
82
+ "S1_spinal_n-1",
83
+ "S1_dorsal_root"
84
+ ]
85
+ },
86
+ {
87
+ "id": "ilxtr:neuron-type-keast-8",
88
+ "centrelines": [
89
+ "L1_ventral_root_paravertebral_ganglion",
90
+ "L1-L2_interganglionic_segment",
91
+ "sympathetic_trunk_T13-L1",
92
+ "L2_ventral_root_paravertebral_ganglion",
93
+ "sympathetic_trunk_L2-L3",
94
+ "sympathetic_trunk_L4-L5",
95
+ "sympathetic_trunk_L3-L4",
96
+ "sympathetic_trunk_L5-L6",
97
+ "sympathetic_trunk_T12-T13"
98
+ ]
99
+ },
100
+ {
101
+ "id": "ilxtr:neuron-type-keast-20",
102
+ "centrelines": [
103
+ "T1_T2_cns",
104
+ "C8_T1_cns",
105
+ "T2_T3_cns",
106
+ "T10_T11_cns",
107
+ "T9_T10_cns",
108
+ "T11_T12_cns",
109
+ "T8_T9_cns",
110
+ "C7_C8_cns",
111
+ "C6_C7_cns",
112
+ "C4_C5_cns",
113
+ "C3_C4_cns",
114
+ "C5_C6_cns",
115
+ "medulla_C1_cns",
116
+ "pons_medulla_cns",
117
+ "C1_C2_cns",
118
+ "T5_T6_cns",
119
+ "T4_T5_cns",
120
+ "T6_T7_cns",
121
+ "L3_L4_cns",
122
+ "L2_L3_cns",
123
+ "L4_L5_cns",
124
+ "L5_L6_cns",
125
+ "T13_L1_cns",
126
+ "T12_T13_cns",
127
+ "L1_L2_cns",
128
+ "T3_T4_cns",
129
+ "n_69",
130
+ "C2_C3_cns",
131
+ "T7_T8_cns"
132
+ ]
133
+ },
134
+ {
135
+ "id": "ilxtr:neuron-type-keast-16",
136
+ "centrelines": [
137
+ "n_74"
138
+ ]
139
+ },
140
+ {
141
+ "id": "ilxtr:neuron-type-keast-4",
142
+ "centrelines": [
143
+ "sympathetic_trunk_L6-S1",
144
+ "L6_gray_ramus-spinal_n",
145
+ "sympathetic_trunk_L5-L6",
146
+ "S1_gray_ramus-spinal_n",
147
+ "S1_spinal_n-2",
148
+ "pelvic_splanchnic_n",
149
+ "L6_spinal_n-2",
150
+ "L1-L2_interganglionic_segment",
151
+ "sympathetic_trunk_T13-L1",
152
+ "sympathetic_trunk_L2-L3",
153
+ "bladder_n",
154
+ "sympathetic_trunk_L4-L5",
155
+ "sympathetic_trunk_L3-L4",
156
+ "sympathetic_trunk_T12-T13"
157
+ ]
158
+ },
159
+ {
160
+ "id": "ilxtr:neuron-type-keast-17",
161
+ "centrelines": [
162
+ "n_75"
163
+ ]
164
+ },
165
+ {
166
+ "id": "ilxtr:neuron-type-keast-5",
167
+ "centrelines": [
168
+ "S1_ventral_root",
169
+ "S1_spinal_n-2",
170
+ "pelvic_splanchnic_n",
171
+ "L6_spinal_n-2",
172
+ "L6_ventral_root"
173
+ ]
174
+ },
175
+ {
176
+ "id": "ilxtr:neuron-type-keast-18",
177
+ "centrelines": [
178
+ "n_70"
179
+ ]
180
+ },
181
+ {
182
+ "id": "ilxtr:neuron-type-keast-6",
183
+ "centrelines": [
184
+ "L1_ventral_root_ramus",
185
+ "L1_spinal_n-1",
186
+ "lumbar_splanchnic_n",
187
+ "L2_spinal_n",
188
+ "hypogastric_n",
189
+ "L2_ventral_root_ramus"
190
+ ]
191
+ },
192
+ {
193
+ "id": "ilxtr:neuron-type-keast-19",
194
+ "centrelines": [
195
+ "n_69"
196
+ ]
197
+ },
198
+ {
199
+ "id": "ilxtr:neuron-type-keast-14",
200
+ "centrelines": [
201
+ "n_72"
202
+ ]
203
+ }
204
+ ];
205
+
206
+
207
+
208
+ /* eslint-disable no-alert, no-console */
209
+ function getGenericMarkerInfo(term ,label, dataset, scaffold, simulations) {
210
+ let data = {};
211
+ data.dataset = dataset;
212
+ data.scaffold = scaffold;
213
+ data.simulations = simulations;
214
+ if (label)
215
+ data.title = label;
216
+ else
217
+ data.title = term;
218
+ data.description = "";
219
+ data.actions = [];
220
+ if (term) {
221
+ switch (term) {
222
+ case "ICN":
223
+ data.title = "RNA";
224
+ data.description = "The distribution of neurons in the intrinsic cardiac nervous system (ICN) were mapped and visualized in a 3D reconstruction of a male rat heart.";
225
+ data.actions = {
226
+ search: {
227
+ title: "Explore data",
228
+ resource: "icn",
229
+ type: "Search",
230
+ label: "ICN",
231
+ filter: {
232
+ facet: 'genotype',
233
+ term: 'heart'
234
+ },
235
+ },
236
+ plot: {
237
+ title: "View plot",
238
+ label: "ICN",
239
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/ISAN/csv-data/use-case-4/RNA_Seq.csv",
240
+ type: "Plot",
241
+ plotType: "heatmap",
242
+ datasetTitle: "Molecular Phenotype Distribution of Single Rat Intracardiac Neurons",
243
+ datasetDescription: "Images collected from serial cryostat sectioning of a cryopreserved heart was used to reconstruct the 3D context. Transcriptional profiles taken from isolated single neurons and mapped back into the previously generated 3D context.",
244
+ datasetUrl: "https://discover.pennsieve.io/datasets/29",
245
+ datasetImage: "https://assets.discover.pennsieve.io/dataset-assets/29/6/revisions/1/banner.jpg"
246
+ },
247
+ };
248
+ break;
249
+ default:
250
+ break;
251
+ }
252
+ } else {
253
+ data.actions = [];
254
+ }
255
+ return data;
256
+ }
257
+
258
+
259
+ function getHumanData(term, label, dataset, scaffold, simulations) {
260
+ if (term || label) {
261
+ let data = {};
262
+ switch (term) {
263
+ case "UBERON:0001157":
264
+ data.title = "Colon";
265
+ data.description = "";
266
+ data.actions = {
267
+ search: {
268
+ title: "Explore data",
269
+ label: "Colon",
270
+ resource: "https://sparc.science/data?type=dataset&q=colon",
271
+ type: "Search",
272
+ filter: {
273
+ facet: 'genotype',
274
+ term: 'colon'
275
+ },
276
+ },
277
+ scaffold: {
278
+ title: "View 3D scaffold",
279
+ label: "Colon",
280
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/human/humanColon_metadata.json",
281
+ type: "Scaffold"
282
+ },
283
+ };
284
+ break;
285
+ case "UBERON:0000948":
286
+ case "UBERON:0002080": {
287
+ data.title = "Heart";
288
+ data.description = "";
289
+ data.actions = {
290
+ search: {
291
+ title: "Explore data",
292
+ label: "Heart",
293
+ resource: "https://sparc.science/data?type=dataset&q=colon",
294
+ type: "Search",
295
+ filter: {
296
+ facet: 'genotype',
297
+ term: 'heart'
298
+ },
299
+ },
300
+ scaffold: {
301
+ title: "View 3D scaffold",
302
+ label: "Heart",
303
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/human/humanHeart_metadata.json",
304
+ type: "Scaffold"
305
+ },
306
+ };
307
+ }
308
+ break;
309
+ case "UBERON:0002048":
310
+ data.title = "Lung";
311
+ data.description = "";
312
+ data.actions = {
313
+ search: {
314
+ title: "Explore data",
315
+ label: "Lung",
316
+ resource: "https://sparc.science/data?type=dataset&q=lung",
317
+ type: "Search"
318
+ },
319
+ scaffold: {
320
+ title: "View 3D scaffold",
321
+ label: "Lung",
322
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Lungs/human/humanLeftLung_metadata.json",
323
+ type: "Scaffold"
324
+ },
325
+ };
326
+ break;
327
+ default:
328
+ data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
329
+ break;
330
+ }
331
+ return data;
332
+ }
333
+ return undefined;
334
+ }
335
+
336
+ function getRatData(term, label, dataset, scaffold, simulations) {
337
+ if (term || label) {
338
+ let data = {};
339
+ switch (term) {
340
+ case "UBERON:0000948":
341
+ case "UBERON:0002080":
342
+ if (!simulations) {
343
+ data.title = "Heart";
344
+ data.description = "";
345
+ data.actions = {
346
+ search: {
347
+ title: "Explore data",
348
+ label: "Heart",
349
+ resource: "https://sparc.science/data?type=dataset&q=heart",
350
+ type: "Search",
351
+ filter: {
352
+ facet: 'genotype',
353
+ term: 'heart'
354
+ },
355
+ },
356
+ scaffold: {
357
+ title: "View 3D scaffold",
358
+ label: "Heart",
359
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/rat/ratHeart_metadata.json",
360
+ type: "Scaffold"
361
+ },
362
+ simulation: {
363
+ title: "Explore simulations",
364
+ label: "Heart",
365
+ resource: "https://sparc.science/data?type=simulation&q=heart",
366
+ type: "URL"
367
+ },
368
+ };
369
+ } else {
370
+ data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
371
+ }
372
+ break;
373
+ case "UBERON:0001156":
374
+ data.title = "Colon";
375
+ data.description = "";
376
+ data.actions = {
377
+ search: {
378
+ title: "Explore data",
379
+ label: "Colon",
380
+ resource: "https://sparc.science/data?type=dataset&q=colon",
381
+ type: "Search"
382
+ },
383
+ };
384
+ break;
385
+ case "UBERON:0002108":
386
+ data.title = "Small intestines";
387
+ data.description = "";
388
+ data.actions = {
389
+ search: {
390
+ title: "Explore data",
391
+ label: "Colon",
392
+ resource: "https://sparc.science/data?type=dataset&q=small+intestines",
393
+ type: "Search"
394
+ },
395
+ };
396
+ break;
397
+ case "UBERON:0001255":
398
+ data.title = "Urinary bladder";
399
+ data.description = "";
400
+ data.actions = {
401
+ search: {
402
+ title: "Explore data",
403
+ label: "Urinary Bladder",
404
+ resource: "https://sparc.science/data?type=dataset&q=bladder",
405
+ type: "Search"
406
+ },
407
+ scaffold: {
408
+ title: "View 3D scaffold",
409
+ label: "Bladder",
410
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Bladder/rat/ratBladder_metadata.json",
411
+ type: "Scaffold"
412
+ },
413
+ };
414
+ break;
415
+ case "UBERON:0002048":
416
+ data.title = "Lung";
417
+ data.description = "";
418
+ data.actions = {
419
+ search: {
420
+ title: "Explore data",
421
+ label: "Lung",
422
+ resource: "https://sparc.science/data?type=dataset&q=lung",
423
+ type: "Search"
424
+ },
425
+ };
426
+ break;
427
+ case "ICN":
428
+ data.title = "RNA";
429
+ data.description = "The distribution of neurons in the intrinsic cardiac nervous system (ICN) were mapped and visualized in a 3D reconstruction of a male rat heart.";
430
+ data.actions = {
431
+ search: {
432
+ title: "Explore data",
433
+ resource: "icn",
434
+ type: "Search"
435
+ },
436
+ plot: {
437
+ title: "View plot",
438
+ label: "ICN",
439
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/ISAN/csv-data/use-case-4/RNA_Seq.csv",
440
+ type: "Plot",
441
+ plotType: "heatmap",
442
+ datasetTitle: "Molecular Phenotype Distribution of Single Rat Intracardiac Neurons",
443
+ datasetDescription: "Images collected from serial cryostat sectioning of a cryopreserved heart was used to reconstruct the 3D context. Transcriptional profiles taken from isolated single neurons and mapped back into the previously generated 3D context.",
444
+ datasetUrl: "https://discover.pennsieve.io/datasets/29",
445
+ datasetImage: "https://assets.discover.pennsieve.io/dataset-assets/29/6/revisions/1/banner.jpg"
446
+ },
447
+ };
448
+ break;
449
+ case "UBERON:0000945":
450
+ case "UBERON:0001160":
451
+ case "UBERON:0001161":
452
+ data.title = "Stomach";
453
+ data.description = "";
454
+ data.actions = {
455
+ search: {
456
+ title: "Explore data",
457
+ label: "Stomach",
458
+ resource: "https://sparc.science/data?type=dataset&q=stomach",
459
+ type: "Search"
460
+ },
461
+ scaffold: {
462
+ title: "View 3D scaffold",
463
+ label: "Stomach",
464
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Stomach/rat/ratStomach_metadata.json",
465
+ type: "Scaffold"
466
+ },
467
+ };
468
+ break;
469
+ case "UBERON:0001759":
470
+ if (label)
471
+ data.title = label;
472
+ else
473
+ data.title = "Vagus nerve";
474
+ data.actions = {
475
+ search: {
476
+ title: "Explore data",
477
+ label: "Vagus nerve",
478
+ resource: "https://sparc.science/data?type=dataset&q=vagus+nerve",
479
+ type: "Search"
480
+ },
481
+ simulation: {
482
+ title: "Explore simulations",
483
+ label: "Vagus nerve",
484
+ resource: "https://sparc.science/data?type=simulation&q=vagus%20nerve",
485
+ type: "simulation"
486
+ },
487
+ };
488
+ break;
489
+ default:
490
+ data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
491
+ break;
492
+ }
493
+ return data;
494
+ }
495
+ return undefined;
496
+ }
497
+
498
+ function getMouseData(term, label, dataset, scaffold, simulations) {
499
+ if (term || label) {
500
+ let data = {};
501
+ switch (term) {
502
+ case "UBERON:0001156":
503
+ data.title = "Colon";
504
+ data.description = "";
505
+ data.actions = {
506
+ search: {
507
+ title: "Explore data",
508
+ label: "Colon",
509
+ resource: "https://sparc.science/data?type=dataset&q=colon",
510
+ type: "Search"
511
+ },
512
+ scaffold: {
513
+ title: "View 3D scaffold",
514
+ label: "Colon",
515
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/mouse/mouseColon_metadata.json",
516
+ type: "Scaffold"
517
+ },
518
+ };
519
+ break;
520
+ case "UBERON:0002048":
521
+ data.title = "Lung";
522
+ data.description = "";
523
+ data.actions = {
524
+ search: {
525
+ title: "Explore data",
526
+ label: "Lung",
527
+ resource: "https://sparc.science/data?type=dataset&q=lung",
528
+ type: "Search"
529
+ },
530
+ scaffold: {
531
+ title: "View 3D scaffold",
532
+ label: "Lung",
533
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Lungs/mouse/mouseLeftLung_metadata.json",
534
+ type: "Scaffold"
535
+ },
536
+ };
537
+ break;
538
+ case "UBERON:0002108":
539
+ data.title = "Small intestines";
540
+ data.description = "";
541
+ data.actions = {
542
+ search: {
543
+ title: "Explore data",
544
+ label: "Colon",
545
+ resource: "https://sparc.science/data?type=dataset&q=small+intestines",
546
+ type: "Search"
547
+ },
548
+ };
549
+ break;
550
+ default:
551
+ data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
552
+ break;
553
+ }
554
+ return data;
555
+ }
556
+ return undefined;
557
+ }
558
+
559
+ function getPigData(term, label, dataset, scaffold, simulations) {
560
+ if (term || label) {
561
+ let data = {};
562
+ switch (term) {
563
+ case "UBERON:0008972":
564
+ data.title = "Colon";
565
+ data.description = "";
566
+ data.actions = {
567
+ search: {
568
+ title: "Explore data",
569
+ label: "Colon",
570
+ resource: "https://sparc.science/data?type=dataset&q=colon",
571
+ type: "Search"
572
+ },
573
+ scaffold: {
574
+ title: "View 3D scaffold",
575
+ label: "Colon",
576
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/pig/pigColon_metadata.json",
577
+ type: "Scaffold"
578
+ },
579
+ };
580
+ break;
581
+ case "UBERON:0002108":
582
+ data.title = "Small intestines";
583
+ data.description = "";
584
+ data.actions = {
585
+ search: {
586
+ title: "Explore data",
587
+ label: "Colon",
588
+ resource: "https://sparc.science/data?type=dataset&q=small+intestines",
589
+ type: "Search"
590
+ },
591
+ };
592
+ break;
593
+ case "UBERON:0000948":
594
+ case "UBERON:0002080": {
595
+ data.title = "Heart";
596
+ data.description = "";
597
+ data.actions = {
598
+ search: {
599
+ title: "Explore data",
600
+ label: "Heart",
601
+ resource: "https://sparc.science/data?type=dataset&q=colon",
602
+ type: "Search",
603
+ filter: {
604
+ facet: 'genotype',
605
+ term: 'heart'
606
+ },
607
+ },
608
+ scaffold: {
609
+ title: "View 3D scaffold",
610
+ label: "Heart",
611
+ resource: "https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/pig/pigHeart_metadata.json",
612
+ type: "Scaffold"
613
+ },
614
+ };
615
+ }
616
+ break;
617
+ default:
618
+ data = getGenericMarkerInfo(term, label, dataset, scaffold, simulations);
619
+ break;
620
+ }
621
+ return data;
622
+ }
623
+ return undefined;
624
+ }
625
+
626
+ function simulatedData(term, taxonomy, label, dataset, scaffold, simulations) {
627
+ switch (taxonomy) {
628
+ case "NCBITaxon:9606":
629
+ return getHumanData(term, label, dataset, scaffold, simulations);
630
+ case "NCBITaxon:9823":
631
+ return getPigData(term, label, dataset, scaffold, simulations);
632
+ case "NCBITaxon:10090":
633
+ return getMouseData(term, label, dataset, scaffold, simulations);
634
+ case "NCBITaxon:10114":
635
+ return getRatData(term, label, dataset, scaffold, simulations);
636
+ default:
637
+ return getGenericMarkerInfo(term, taxonomy, label, dataset, scaffold, simulations);
638
+ }
639
+ }
640
+
641
+ function getRatTerms() {
642
+ return [
643
+ {id: "UBERON:0000948", name: "Heart", type:"simulation"},
644
+ {id: "UBERON:0001156", name: "Colon", type:"simulation"},
645
+ {id: "UBERON:0001255", name: "Bladder", type:"simulation"},
646
+ {id: "UBERON:0000945", name: "Stomach", type:"simulation"},
647
+ {id: "UBERON:0001759", name: "Vagus nerve", type:"simulation"},
648
+ {id: "UBERON:0002108", name: "Small intestines", type:"simulation"},
649
+ {id: "UBERON:0002107", name: "Liver", type:"simulation"},
650
+ ];
651
+ }
652
+
653
+ export function getAvailableTermsForSpecies() {
654
+ return getRatTerms();
655
+ }
656
+
657
+ // Find the id/centre lines for the matchin centre lines/id
658
+ export function getNerveNames(name) {
659
+ if (name) {
660
+ for (let i = 0; i < nerveMaps.length ; i++) {
661
+ if (nerveMaps[i].id == name) {
662
+ return nerveMaps[i].centrelines;
663
+ }
664
+ const found = nerveMaps[i].centrelines.find(element => element === name);
665
+ if (found)
666
+ return [nerveMaps[i].id];
667
+ }
668
+ }
669
+ return [];
670
+ }
671
+
672
+ export function getParentsRegion(name) {
673
+ if (name) {
674
+ const lName = name.toLowerCase()
675
+ if (lName.includes('heart')) {
676
+ return {id: 'UBERON:0000948', name: 'Heart'};
677
+ } else if (lName.includes('liver')) {
678
+ return {id: 'UBERON:0002107', name: 'Liver'};
679
+ } else if (lName.includes('stomach')) {
680
+ return {id: 'UBERON:0000945', name: 'Stomach'};
681
+ } else if (lName.includes('colon')) {
682
+ return {id: 'UBERON:0001156', name: 'Colon'};
683
+ } else if (lName.includes('bladder')) {
684
+ return {id: 'UBERON:0001255', name: 'Bladder'};
685
+ }
686
+ }
687
+ return undefined;
688
+ }
689
+
690
+ export function getInteractiveAction(result, action) {
691
+ if (result && result.resource) {
692
+ let resource = result.resource;
693
+ if (Array.isArray(resource) && resource[0])
694
+ resource = resource[0];
695
+ let term = undefined;
696
+ let label = undefined;
697
+ let dataset = undefined;
698
+ let scaffold = undefined;
699
+ let simulations = undefined;
700
+ let taxonomy = resource.taxonomy;
701
+ if (resource.data && resource.data.id) {
702
+ term = resource.data.id;
703
+ label = resource.data.id;
704
+ } else if (resource.feature) {
705
+ term = resource.feature.models;
706
+ label = resource.feature.label;
707
+ dataset = resource.feature.dataset;
708
+ scaffold = resource.feature.scaffold;
709
+ simulations = resource.feature.simulations;
710
+ }
711
+ if (term || label) {
712
+ let data = simulatedData(term, taxonomy, label, dataset, scaffold, simulations);
713
+ if (data && data.actions) {
714
+ return data.actions[action];
715
+ }
716
+ }
717
+ }
718
+ return undefined;
719
+ }
720
+
721
+ export { simulatedData };