@abi-software/flatmapvuer 1.8.1-beta.3 → 1.8.2-beta.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.
- package/dist/flatmapvuer.js +1900 -1900
- package/dist/flatmapvuer.umd.cjs +59 -59
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/FlatmapVuer.vue +0 -4
- package/src/services/flatmapQueries.js +31 -48
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2-beta.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@abi-software/flatmap-viewer": "3.2.13",
|
|
47
|
-
"@abi-software/map-utilities": "^1.4.
|
|
47
|
+
"@abi-software/map-utilities": "^1.4.0",
|
|
48
48
|
"@abi-software/sparc-annotation": "0.3.2",
|
|
49
49
|
"@abi-software/svg-sprite": "^1.0.1",
|
|
50
50
|
"@element-plus/icons-vue": "^2.3.1",
|
|
@@ -2203,10 +2203,6 @@ export default {
|
|
|
2203
2203
|
// Get connectivity knowledge source | SCKAN release
|
|
2204
2204
|
if (this.mapImp.provenance?.connectivity) {
|
|
2205
2205
|
this.tooltipEntry['knowledge-source'] = getKnowledgeSource(this.mapImp);
|
|
2206
|
-
|
|
2207
|
-
// Map id and uuid to load connectivity information from the map
|
|
2208
|
-
this.tooltipEntry['mapId'] = this.mapImp.provenance.id;
|
|
2209
|
-
this.tooltipEntry['mapuuid'] = this.mapImp.provenance.uuid;
|
|
2210
2206
|
}
|
|
2211
2207
|
this.$emit('connectivity-info-open', this.tooltipEntry);
|
|
2212
2208
|
}
|
|
@@ -193,7 +193,7 @@ let FlatmapQueries = function () {
|
|
|
193
193
|
return [...new Set(found.flat())]
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
this.
|
|
196
|
+
this.flattenConnectivity = function (connectivity) {
|
|
197
197
|
let dnodes = connectivity.flat() // get nodes from edgelist
|
|
198
198
|
let nodes = [...new Set(dnodes)] // remove duplicates
|
|
199
199
|
let found = []
|
|
@@ -207,7 +207,7 @@ let FlatmapQueries = function () {
|
|
|
207
207
|
return found.flat()
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
this.findComponents = function (connectivity) {
|
|
210
|
+
this.findComponents = function (connectivity, axons, dendrites) {
|
|
211
211
|
let dnodes = connectivity.connectivity.flat() // get nodes from edgelist
|
|
212
212
|
let nodes = removeDuplicates(dnodes)
|
|
213
213
|
|
|
@@ -216,13 +216,10 @@ let FlatmapQueries = function () {
|
|
|
216
216
|
nodes.forEach((node) => {
|
|
217
217
|
terminal = false
|
|
218
218
|
// Check if the node is an destination or origin (note that they are labelled dendrite and axon as opposed to origin and destination)
|
|
219
|
-
if (inArray(
|
|
219
|
+
if (inArray(axons, node)) {
|
|
220
220
|
terminal = true
|
|
221
221
|
}
|
|
222
|
-
if (
|
|
223
|
-
terminal = true
|
|
224
|
-
}
|
|
225
|
-
if (inArray(connectivity.dendrites, node)) {
|
|
222
|
+
if (inArray(dendrites, node)) {
|
|
226
223
|
terminal = true
|
|
227
224
|
}
|
|
228
225
|
if (!terminal) {
|
|
@@ -383,86 +380,72 @@ let FlatmapQueries = function () {
|
|
|
383
380
|
return label
|
|
384
381
|
}
|
|
385
382
|
|
|
386
|
-
this.flattenAndFindDatasets = function (components, axons
|
|
383
|
+
this.flattenAndFindDatasets = function (dendrites, components, axons) {
|
|
387
384
|
// process the nodes for finding datasets (Note this is not critical to the tooltip, only for the 'search on components' button)
|
|
388
|
-
let
|
|
389
|
-
let
|
|
390
|
-
let
|
|
385
|
+
let dendritesFlat = this.flattenConnectivity(dendrites)
|
|
386
|
+
let componentsFlat = this.flattenConnectivity(components)
|
|
387
|
+
let axonsFlat = this.flattenConnectivity(axons)
|
|
391
388
|
|
|
392
389
|
// Filter for the anatomy which is annotated on datasets
|
|
393
|
-
this.destinationsWithDatasets = this.uberons.filter(
|
|
394
|
-
(ub) => axonsFlat.indexOf(ub.id) !== -1
|
|
395
|
-
)
|
|
396
390
|
this.originsWithDatasets = this.uberons.filter(
|
|
397
391
|
(ub) => dendritesFlat.indexOf(ub.id) !== -1
|
|
398
392
|
)
|
|
399
393
|
this.componentsWithDatasets = this.uberons.filter(
|
|
400
394
|
(ub) => componentsFlat.indexOf(ub.id) !== -1
|
|
401
395
|
)
|
|
396
|
+
this.destinationsWithDatasets = this.uberons.filter(
|
|
397
|
+
(ub) => axonsFlat.indexOf(ub.id) !== -1
|
|
398
|
+
)
|
|
402
399
|
}
|
|
403
400
|
|
|
404
401
|
this.processConnectivity = function (mapImp, connectivity) {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
let components = this.findComponents(connectivity)
|
|
402
|
+
const sourceKey = ["ilxtr:hasSomaLocatedIn"]
|
|
403
|
+
const destinationKey = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"]
|
|
408
404
|
|
|
409
|
-
|
|
410
|
-
let axons = removeDuplicates(connectivity.axons)
|
|
411
|
-
//Somas will become part of origins, support this for future proof
|
|
405
|
+
return new Promise((resolve) => {
|
|
412
406
|
let dendrites = []
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
}
|
|
407
|
+
let axons = []
|
|
408
|
+
|
|
409
|
+
sourceKey.forEach((key)=>{
|
|
410
|
+
dendrites.push(...connectivity["node-phenotypes"][key])
|
|
411
|
+
})
|
|
419
412
|
dendrites = removeDuplicates(dendrites)
|
|
413
|
+
destinationKey.forEach((key)=>{
|
|
414
|
+
axons.push(...connectivity["node-phenotypes"][key])
|
|
415
|
+
})
|
|
416
|
+
axons = removeDuplicates(axons)
|
|
417
|
+
const components = this.findComponents(connectivity, axons, dendrites)
|
|
420
418
|
|
|
421
419
|
// Create list of ids to get labels for
|
|
422
|
-
|
|
423
|
-
|
|
420
|
+
const conIds = this.findAllIdsFromConnectivity(connectivity)
|
|
424
421
|
// Create readable labels from the nodes. Setting this to 'this.origins' updates the display
|
|
425
422
|
this.createLabelLookup(mapImp, conIds).then((lookUp) => {
|
|
426
|
-
this.destinations = axons.map((a) =>
|
|
427
|
-
this.createLabelFromNeuralNode(a, lookUp)
|
|
428
|
-
)
|
|
429
423
|
this.origins = dendrites.map((d) =>
|
|
430
424
|
this.createLabelFromNeuralNode(d, lookUp)
|
|
431
425
|
)
|
|
432
426
|
this.components = components.map((c) =>
|
|
433
427
|
this.createLabelFromNeuralNode(c, lookUp)
|
|
434
428
|
)
|
|
435
|
-
this.
|
|
429
|
+
this.destinations = axons.map((a) =>
|
|
430
|
+
this.createLabelFromNeuralNode(a, lookUp)
|
|
431
|
+
)
|
|
432
|
+
this.flattenAndFindDatasets(dendrites, components, axons)
|
|
436
433
|
resolve({
|
|
437
434
|
ids: {
|
|
438
|
-
axons: axons,
|
|
439
435
|
dendrites: dendrites,
|
|
440
436
|
components: components,
|
|
437
|
+
axons: axons,
|
|
441
438
|
},
|
|
442
439
|
labels: {
|
|
443
|
-
destinations: this.destinations,
|
|
444
440
|
origins: this.origins,
|
|
445
441
|
components: this.components,
|
|
442
|
+
destinations: this.destinations,
|
|
446
443
|
}
|
|
447
444
|
})
|
|
448
445
|
})
|
|
449
446
|
})
|
|
450
447
|
}
|
|
451
448
|
|
|
452
|
-
this.flattenConntectivity = function (connectivity) {
|
|
453
|
-
let dnodes = connectivity.flat() // get nodes from edgelist
|
|
454
|
-
let nodes = [...new Set(dnodes)] // remove duplicates
|
|
455
|
-
let found = []
|
|
456
|
-
nodes.forEach((n) => {
|
|
457
|
-
if (Array.isArray(n)) {
|
|
458
|
-
found.push(n.flat())
|
|
459
|
-
} else {
|
|
460
|
-
found.push(n)
|
|
461
|
-
}
|
|
462
|
-
})
|
|
463
|
-
return found.flat()
|
|
464
|
-
}
|
|
465
|
-
|
|
466
449
|
this.buildPubmedSqlStatement = function (keastIds) {
|
|
467
450
|
let sql = 'select distinct publication from publications where entity in ('
|
|
468
451
|
if (keastIds.length === 1) {
|