@abi-software/flatmapvuer 1.8.2-beta.0 → 1.8.2
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 +3441 -3438
- package/dist/flatmapvuer.umd.cjs +67 -67
- package/package.json +2 -2
- package/src/App.vue +4 -0
- package/src/services/flatmapQueries.js +29 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abi-software/flatmapvuer",
|
|
3
|
-
"version": "1.8.2
|
|
3
|
+
"version": "1.8.2",
|
|
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.2",
|
|
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",
|
package/src/App.vue
CHANGED
|
@@ -207,7 +207,7 @@ let FlatmapQueries = function () {
|
|
|
207
207
|
return found.flat()
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
-
this.findComponents = function (connectivity, axons, dendrites) {
|
|
210
|
+
this.findComponents = function (connectivity, axons, dendrites, somas) {
|
|
211
211
|
let dnodes = connectivity.connectivity.flat() // get nodes from edgelist
|
|
212
212
|
let nodes = removeDuplicates(dnodes)
|
|
213
213
|
|
|
@@ -219,6 +219,9 @@ let FlatmapQueries = function () {
|
|
|
219
219
|
if (inArray(axons, node)) {
|
|
220
220
|
terminal = true
|
|
221
221
|
}
|
|
222
|
+
if (somas && inArray(somas, node)) {
|
|
223
|
+
terminal = true
|
|
224
|
+
}
|
|
222
225
|
if (inArray(dendrites, node)) {
|
|
223
226
|
terminal = true
|
|
224
227
|
}
|
|
@@ -399,23 +402,35 @@ let FlatmapQueries = function () {
|
|
|
399
402
|
}
|
|
400
403
|
|
|
401
404
|
this.processConnectivity = function (mapImp, connectivity) {
|
|
402
|
-
const sourceKey = ["ilxtr:hasSomaLocatedIn"]
|
|
403
|
-
const destinationKey = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"]
|
|
404
|
-
|
|
405
405
|
return new Promise((resolve) => {
|
|
406
406
|
let dendrites = []
|
|
407
407
|
let axons = []
|
|
408
|
+
let somas = undefined
|
|
409
|
+
if (connectivity && connectivity["node-phenotypes"]) {
|
|
410
|
+
const sourceKey = ["ilxtr:hasSomaLocatedIn"]
|
|
411
|
+
const destinationKey = ["ilxtr:hasAxonPresynapticElementIn", "ilxtr:hasAxonSensorySubcellularElementIn"]
|
|
412
|
+
sourceKey.forEach((key)=>{
|
|
413
|
+
dendrites.push(...connectivity["node-phenotypes"][key])
|
|
414
|
+
})
|
|
415
|
+
dendrites = removeDuplicates(dendrites)
|
|
416
|
+
destinationKey.forEach((key)=>{
|
|
417
|
+
axons.push(...connectivity["node-phenotypes"][key])
|
|
418
|
+
})
|
|
419
|
+
axons = removeDuplicates(axons)
|
|
420
|
+
} else {
|
|
421
|
+
// Remove duplicates
|
|
422
|
+
axons = removeDuplicates(connectivity.axons)
|
|
423
|
+
//Somas will become part of origins, support this for future proof
|
|
424
|
+
if (connectivity.somas && connectivity.somas.length > 0) {
|
|
425
|
+
dendrites.push(...connectivity.somas)
|
|
426
|
+
}
|
|
427
|
+
if (connectivity.dendrites && connectivity.dendrites.length > 0) {
|
|
428
|
+
dendrites.push(...connectivity.dendrites)
|
|
429
|
+
}
|
|
430
|
+
somas = connectivity.somas
|
|
431
|
+
}
|
|
408
432
|
|
|
409
|
-
|
|
410
|
-
dendrites.push(...connectivity["node-phenotypes"][key])
|
|
411
|
-
})
|
|
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)
|
|
418
|
-
|
|
433
|
+
const components = this.findComponents(connectivity, axons, dendrites, somas)
|
|
419
434
|
// Create list of ids to get labels for
|
|
420
435
|
const conIds = this.findAllIdsFromConnectivity(connectivity)
|
|
421
436
|
// Create readable labels from the nodes. Setting this to 'this.origins' updates the display
|