@abi-software/mapintegratedvuer 1.5.0 → 1.5.1-beta-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/mapintegratedvuer",
3
- "version": "1.5.0",
3
+ "version": "1.5.1-beta-1",
4
4
  "license": "Apache-2.0",
5
5
  "scripts": {
6
6
  "serve": "vite --host --force",
@@ -55,7 +55,7 @@
55
55
  "@abi-software/map-utilities": "^1.1.0",
56
56
  "@abi-software/plotvuer": "1.0.0",
57
57
  "@abi-software/scaffoldvuer": "^1.4.1",
58
- "@abi-software/simulationvuer": "1.0.0",
58
+ "@abi-software/simulationvuer": "2.0.6",
59
59
  "@abi-software/svg-sprite": "1.0.0",
60
60
  "@element-plus/icons-vue": "^2.3.1",
61
61
  "@pinia/testing": "^0.1.3",
@@ -66,7 +66,7 @@
66
66
  "mitt": "^3.0.1",
67
67
  "pinia": "^2.1.7",
68
68
  "splitpanes": "^3.1.5",
69
- "vue": "^3.4.15",
69
+ "vue": "^3.5.11",
70
70
  "vue-router": "^4.2.5",
71
71
  "vuex": "^4.1.0",
72
72
  "xss": "^1.0.14"
@@ -203,441 +203,6 @@ const nerveMaps = [
203
203
  }
204
204
  ];
205
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
206
  function getRatTerms() {
642
207
  return [
643
208
  {id: "UBERON:0000948", name: "Heart", type:"simulation"},
@@ -687,35 +252,3 @@ export function getParentsRegion(name) {
687
252
  return undefined;
688
253
  }
689
254
 
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 };
@@ -75,8 +75,7 @@ export default {
75
75
  return this.$refs.flatmap?.mapImp;
76
76
  },
77
77
  flatmaprResourceSelected: function (type, resource) {
78
- this.resourceSelected(
79
- type, resource, (this.$refs.flatmap.viewingMode === "Exploration"));
78
+ this.resourceSelected(type, resource);
80
79
 
81
80
  if (resource.eventType === 'click' && resource.feature.type === 'feature') {
82
81
  const eventData = {
@@ -188,7 +188,7 @@ export default {
188
188
  },
189
189
  flatmaprResourceSelected: function (type, resource) {
190
190
  const map = this.$refs.multiflatmap.getCurrentFlatmap();
191
- this.resourceSelected(type, resource, (map.viewingMode === "Exploration"));
191
+ this.resourceSelected(type, resource);
192
192
 
193
193
  if (resource.eventType === 'click' && resource.feature.type === 'feature') {
194
194
  const eventData = {
@@ -1,5 +1,4 @@
1
1
  import {
2
- getInteractiveAction,
3
2
  getNerveNames,
4
3
  getParentsRegion,
5
4
  } from "../components/SimulatedData.js";
@@ -102,7 +101,7 @@ export default {
102
101
  /**
103
102
  * Callback when the vuers emit a selected event.
104
103
  */
105
- resourceSelected: function (type, resource, augmented) {
104
+ resourceSelected: function (type, resource) {
106
105
  // Skip processing if resources already has actions
107
106
  if (this.resourceHasAction(resource)) {
108
107
  EventBus.emit("PopoverActionClick", resource);
@@ -200,9 +199,6 @@ export default {
200
199
  fireResourceSelected = true;
201
200
  action = "search";
202
201
  }
203
- if ((returnedAction === undefined) && augmented) {
204
- returnedAction = getInteractiveAction(result, action);
205
- }
206
202
  if (returnedAction) EventBus.emit("PopoverActionClick", returnedAction);
207
203
  if (fireResourceSelected) this.$emit("resource-selected", result);
208
204
  },
@@ -12,11 +12,12 @@ export default defineConfig((configEnv) => {
12
12
  fileName: "mapintegratedvuer",
13
13
  },
14
14
  rollupOptions: {
15
- external: ["vue", "pinia"],
15
+ external: ["vue", "pinia", "@abi-software/simulationvuer"],
16
16
  output: {
17
17
  globals: {
18
18
  vue: "Vue",
19
19
  pinia: "pinia",
20
+ "@abi-software/simulationvuer": "simulationvuer",
20
21
  },
21
22
  },
22
23
  },
@@ -1,24 +0,0 @@
1
- import { C as o } from "./plotvuer-X4h-Lj3L.js";
2
- import { C as a } from "./ContentMixin-DG--521q.js";
3
- import { resolveComponent as r, openBlock as n, createBlock as s } from "vue";
4
- import { _ as m } from "./index-BbKW1iaX.js";
5
- const p = {
6
- name: "Plot",
7
- mixins: [a],
8
- components: {
9
- PlotVuer: o
10
- }
11
- };
12
- function l(e, c, u, d, i, f) {
13
- const t = r("PlotVuer");
14
- return n(), s(t, {
15
- "data-source": e.entry.resource.dataSource,
16
- metadata: e.entry.resource.metadata,
17
- "supplemental-data": e.entry.resource.supplementalData,
18
- style: { overflow: "hidden" }
19
- }, null, 8, ["data-source", "metadata", "supplemental-data"]);
20
- }
21
- const $ = /* @__PURE__ */ m(p, [["render", l]]);
22
- export {
23
- $ as default
24
- };