MetaCell / virtual-fly-brain

1 stars 1 forks source link

Ribbons for neuron classes in terminfo query summaries #29

Open admclachlan opened 1 year ago

admclachlan commented 1 year ago

Example ribbon from FlyBase - https://flybase.org/reports/FBgn0050446

Idea is ribbon of squares with heat map colours and text for each square.

For now: Badges are currently mostly neurotransmitters, but can use as an example.

Later goals if possible:

admclachlan commented 1 year ago

VFB to provide sample data to MetaCell

Robbie1977 commented 1 year ago

MATCH (a:has_neuron_connectivity {short_form:'VFB_jrchk32l'})<-[r:synapsed_to]-(b:has_neuron_connectivity) UNWIND(labels(b)) as l WITH * WHERE l contains "ergic" OPTIONAL MATCH (c:Class:Neuron) WHERE c.short_form starts with "FBbt_" AND toLower(c.label)=toLower(l+" neuron") RETURN distinct l as Neurotransmitter, c.short_form as link, sum(r.weight[0]) as weight ORDER BY weight Desc http://pdb.virtualflybrain.org/browser/

Robbie1977 commented 1 year ago
Row Neurotransmitter Link weight
1 "GABAergic" "FBbt_00007228" 56
2 "Cholinergic" "FBbt_00007173" 30
3 "Dopaminergic" "FBbt_00005131" 23
4 "Serotonergic" "FBbt_00005133" 19
5 "Octopaminergic" "FBbt_00007364" 2
6 "Glutamatergic" "FBbt_00100291" 1
enicolasgomez commented 1 year ago

@Robbie1977 Hi Robbie, got a couple of questions about this item that popped out whly analyzing.

  1. Will you be providing us an API withing vfb_query that given a short_form (e.g. VFB_jrchk32l) it will return JSON data with the above table.

  2. For that same example, what we expect to render is only 1 ribbon, with 6 labels in which GABAergic would have the strongest color and Glutamatergic the lightest, correct?

  3. Link would reload VFB using that short_term initially?

Robbie1977 commented 1 year ago

1: Yes so the query results schema would need to be extended to support ribbon-type results with all data and any query-level customisations needed. As the ribbons are in place of the preview table of results it would be at that level so it would be pre-computed rather than a call. The full query would return all the results in detail as per usual (no ribbons).

2: Correct

3: we need to support links for short_forms (ids) and links for queries as conceivably this could be a sub-query just showing the results with that neurotransmitter etc.