Skip to content

Generic_anatomical_class_results

David Osumi-Sutherland edited this page Apr 21, 2017 · 1 revision

Generic anatomical class results pages

Table

Name Description Gross type Image
Official name(syn, syn) description (microref, microref Gross types* (+parent types?) Thumbnail carousel**

* Gross types come from Geppetto types / Neo4J labels. A JSON file maps between Gross Type names and ontology (FBbt) classes. This file should also mark Gross Types which are relevant to display here (Neuron may be too general; 'glutamatergic neuron' or 'sensory neuron' would be useful to see.) TBD: Should we ever take into account hierarchy/redundancy - probably too complex...) TODO: Mapping currently lives in a Python script. This needs to be split out to a separate JSON file.

** Loads limited number neurons.

Cypher to populate

QUERY STATUS: TESTED, WORKS

TBA: Needs to pull back template, but waiting on tweaks to schema.

MATCH (n:VFB:Class) WHERE n.short_form IN 
['FBbt_00111464', 'FBbt_00007422', 'FBbt_00007225', 'FBbt_00100477'] 
WITH n 
OPTIONAL MATCH (n)<-[:SUBCLASSOF|INSTANCEOF*1..4]-(a:Individual)
<-[:Related { label: 'depicts'}]-(c:Individual)
<-[:Related { label: 'has_signal_channel'}]-(image:Individual) 
WITH n, COLLECT (DISTINCT { anat_ind_name: a.label, image_id: image.short_form}) AS inds
MATCH (n)-[r:has_reference]->(p:pub)
WITH n, inds, COLLECT (DISTINCT { FlyBase: p.FlyBase, miniref:  p.miniref}) AS pubs
RETURN n.label AS class_label, n.description as class_def, n.short_form AS class_id, n.synonym,
pubs, inds[1..6] AS inds