@abi-software/flatmapvuer 0.5.7-alpha → 0.5.7-alpha.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.common.js +39 -47
- package/dist/flatmapvuer.common.js.map +1 -1
- package/dist/flatmapvuer.css +1 -1
- package/dist/flatmapvuer.umd.js +39 -47
- package/dist/flatmapvuer.umd.js.map +1 -1
- package/dist/flatmapvuer.umd.min.js +2 -2
- package/dist/flatmapvuer.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Tooltip.vue +3 -8
- package/src/services/flatmapQueries.js +9 -14
package/package.json
CHANGED
|
@@ -139,11 +139,6 @@ export default {
|
|
|
139
139
|
pubmedSearchUrl: '',
|
|
140
140
|
loading: false,
|
|
141
141
|
showToolip: false,
|
|
142
|
-
destinations: [],
|
|
143
|
-
origins: [],
|
|
144
|
-
components: [],
|
|
145
|
-
destinationsWithDatasets: [],
|
|
146
|
-
originsWithDatasets: [],
|
|
147
142
|
originDescriptions: {
|
|
148
143
|
'motor': 'is the location of the initial cell body of the circuit',
|
|
149
144
|
'sensory': 'is the location of the initial cell body in the PNS circuit'
|
|
@@ -191,13 +186,13 @@ export default {
|
|
|
191
186
|
window.open(url, '_blank')
|
|
192
187
|
},
|
|
193
188
|
openAll: function(){
|
|
194
|
-
EventBus.$emit('onActionClick', {type:'Facets', labels: this.componentsWithDatasets.map(a=>a.name)})
|
|
189
|
+
EventBus.$emit('onActionClick', {type:'Facets', labels: this.entry.componentsWithDatasets.map(a=>a.name)})
|
|
195
190
|
},
|
|
196
191
|
openAxons: function(){
|
|
197
|
-
EventBus.$emit('onActionClick', {type:'Facets', labels: this.destinationsWithDatasets.map(a=>a.name)})
|
|
192
|
+
EventBus.$emit('onActionClick', {type:'Facets', labels: this.entry.destinationsWithDatasets.map(a=>a.name)})
|
|
198
193
|
},
|
|
199
194
|
openDendrites: function(){
|
|
200
|
-
EventBus.$emit('onActionClick', {type:'Facets', labels: this.originsWithDatasets.map(a=>a.name)})
|
|
195
|
+
EventBus.$emit('onActionClick', {type:'Facets', labels: this.entry.originsWithDatasets.map(a=>a.name)})
|
|
201
196
|
},
|
|
202
197
|
pubmedSearchUrlUpdate: function (val){
|
|
203
198
|
this.pubmedSearchUrl = val
|
|
@@ -45,7 +45,6 @@ let FlatmapQueries = function(){
|
|
|
45
45
|
this.destinations = []
|
|
46
46
|
this.origins = []
|
|
47
47
|
this.components = []
|
|
48
|
-
this.uberons = []
|
|
49
48
|
this.urls = []
|
|
50
49
|
this.controller = undefined
|
|
51
50
|
this.uberons = []
|
|
@@ -97,6 +96,7 @@ let FlatmapQueries = function(){
|
|
|
97
96
|
this.createLabelLookup = function(uberons) {
|
|
98
97
|
return new Promise(resolve=> {
|
|
99
98
|
let uberonMap = {}
|
|
99
|
+
this.uberons = []
|
|
100
100
|
const data = { sql: this.buildLabelSqlStatement(uberons)}
|
|
101
101
|
fetch(`${this.flatmapApi}knowledge/query/`, {
|
|
102
102
|
method: 'POST',
|
|
@@ -112,6 +112,10 @@ let FlatmapQueries = function(){
|
|
|
112
112
|
if (entity > -1 && label > -1) {
|
|
113
113
|
payload.values.forEach(pair => {
|
|
114
114
|
uberonMap[pair[entity]] = pair[label];
|
|
115
|
+
this.uberons.push({
|
|
116
|
+
id: pair[entity],
|
|
117
|
+
name: pair[label]
|
|
118
|
+
})
|
|
115
119
|
});
|
|
116
120
|
}
|
|
117
121
|
resolve(uberonMap)
|
|
@@ -154,8 +158,7 @@ let FlatmapQueries = function(){
|
|
|
154
158
|
found.push(n)
|
|
155
159
|
}
|
|
156
160
|
})
|
|
157
|
-
|
|
158
|
-
return this.uberons
|
|
161
|
+
return [... new Set(found.flat())]
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
this.flattenConntectivity = function (connectivity) {
|
|
@@ -268,20 +271,14 @@ let FlatmapQueries = function(){
|
|
|
268
271
|
let axonsFlat = this.flattenConntectivity(axons)
|
|
269
272
|
let dendritesFlat = this.flattenConntectivity(dendrites)
|
|
270
273
|
|
|
271
|
-
console.log("uber in flattehn find datasets", this.uberons)
|
|
272
|
-
|
|
273
|
-
window.uberons = this.uberons
|
|
274
|
-
window.componentsFlat = componentsFlat
|
|
275
|
-
|
|
276
274
|
// Filter for the anatomy which is annotated on datasets
|
|
277
|
-
this.destinationsWithDatasets = this.uberons.filter(ub => axonsFlat.indexOf(ub) !== -1)
|
|
278
|
-
this.originsWithDatasets = this.uberons.filter(ub => dendritesFlat.indexOf(ub) !== -1)
|
|
279
|
-
this.componentsWithDatasets = this.uberons.filter(ub => componentsFlat.indexOf(ub) !== -1)
|
|
275
|
+
this.destinationsWithDatasets = this.uberons.filter(ub => axonsFlat.indexOf(ub.id) !== -1)
|
|
276
|
+
this.originsWithDatasets = this.uberons.filter(ub => dendritesFlat.indexOf(ub.id) !== -1)
|
|
277
|
+
this.componentsWithDatasets = this.uberons.filter(ub => componentsFlat.indexOf(ub.id) !== -1)
|
|
280
278
|
}
|
|
281
279
|
|
|
282
280
|
this.processConnectivity = function(connectivity){
|
|
283
281
|
return new Promise (resolve=>{
|
|
284
|
-
console.log(connectivity)
|
|
285
282
|
// Filter the origin and destinations from components
|
|
286
283
|
let components = this.findComponents(connectivity)
|
|
287
284
|
|
|
@@ -291,11 +288,9 @@ let FlatmapQueries = function(){
|
|
|
291
288
|
|
|
292
289
|
// Create list of ids to get labels for
|
|
293
290
|
let conIds = this.findAllIdsFromConnectivity(connectivity)
|
|
294
|
-
console.log(conIds)
|
|
295
291
|
|
|
296
292
|
// Create readable labels from the nodes. Setting this to 'this.origins' updates the display
|
|
297
293
|
this.createLabelLookup(conIds).then(lookUp=>{
|
|
298
|
-
console.log("after label lookup", this.uberons)
|
|
299
294
|
this.destinations = axons.map(a=>this.createLabelFromNeuralNode(a,lookUp))
|
|
300
295
|
this.origins = dendrites.map(d=>this.createLabelFromNeuralNode(d,lookUp))
|
|
301
296
|
this.components = components.map(c=>this.createLabelFromNeuralNode(c, lookUp))
|