Index > Examples Edit on GitHub

Examples SPARC queries

Table of Contents

Regions with processes from neuron population

Show all regions that contain some part of a given neuron population. Here, Neuron type keast 5

// neurites
MATCH (neupop:Class{iri: "http://uri.interlex.org/tgbugs/uris/readable/neuron-type-keast-5"})
-[:apinatomy:annotates*0..1]->(neugrp:NamedIndividual{`https://apinatomy.org/uris/readable/description`: "dynamic"})
-[:apinatomy:links]->(link)
-[:apinatomy:fasciculatesIn|apinatomy:endsIn*0..1]->(lyph_or_layer)
-[:apinatomy:layerIn*0..1]->(lyph)
-[:apinatomy:ontologyTerms]->(region)
RETURN region

UNION

// somas
MATCH (neupop:Class{iri: "http://uri.interlex.org/tgbugs/uris/readable/neuron-type-keast-5"})
-[:apinatomy:annotates*0..1]->(neugrp:NamedIndividual{`https://apinatomy.org/uris/readable/description`: "dynamic"})
-[:apinatomy:lyphs]->(lyph)
-[:apinatomy:internalIn]->()
-[:apinatomy:ontologyTerms]->(region)
RETURN region
SELECT DISTINCT
?region
(str(?l) as ?label)
WHERE {
  VALUES ?neupop { ilxtr:neuron-type-keast-5 }
  ?neupop apinatomy:annotates ?neugrp .
  ?neugrp a elements:Group .  # externals annotate the whole model
  {
    ?neugrp apinatomy:links / ( apinatomy:fasciculatesIn | apinatomy:endsIn ) ?rlyph .
    ?rlyph apinatomy:ontologyTerms ?region .
    filter not exists { ?rlyph apinatomy:layer ?_ }  # require if ?region where not specified
  } UNION {
    ?neugrp apinatomy:links / ( apinatomy:fasciculatesIn | apinatomy:endsIn ) /
            apinatomy:layerIn / apinatomy:ontologyTerms ?region .
  }
  OPTIONAL { ?region rdfs:label ?l }
}
ORDER BY ?region
region label
ILX:0738432 Sixth lumbar spinal cord segment
ILX:0792853 Anterior root of first sacral nerve
ILX:0793615 Ventral root of the sixth lumbar nerve
UBERON:0006460 first sacral spinal cord segment
UBERON:0016508 pelvic ganglion
UBERON:0018675 pelvic splanchnic nerve

Neuron populations with processes in region

Show all neuron populations that have some part in a given region. In this case the inferior mesenteric ganglion. See this catalog entry for the generalized form of this query.

// neurites
MATCH (neupop:Class)
-[:apinatomy:annotates*0..1]->(neugrp:NamedIndividual{`https://apinatomy.org/uris/readable/description`: "dynamic"})
-[:apinatomy:links]->(link)
-[:apinatomy:fasciculatesIn|apinatomy:endsIn*0..1]->(lyph_or_layer)
-[:apinatomy:layerIn*0..1]->(lyph)
-[:apinatomy:ontologyTerms*0..1]->(region:Class{iri: "UBERON:0005453"})
RETURN neupop

UNION

// somas
MATCH (neupop:Class)
-[:apinatomy:annotates*0..1]->(neugrp:NamedIndividual{`https://apinatomy.org/uris/readable/description`: "dynamic"})
-[:apinatomy:lyphs]->(lyph)
-[:apinatomy:internalIn]->()
-[:apinatomy:ontologyTerms*0..1]->(region:Class{iri: "UBERON:0005453"})
RETURN neupop
SELECT DISTINCT
?neupop
(str(?l) as ?label)
(str(?pl) as ?prefLabel)
WHERE {
  VALUES (?region ?neuron) { (UBERON:0005453 SAO:1417703748) }
  ?neupop rdfs:subClassOf+ ?neuron ;
          rdfs:label ?l ;
          apinatomy:annotates ?neugrp .
  OPTIONAL { ?neupop skos:prefLabel ?pl }
  ?neugrp a elements:Group .  # externals annotate the whole model
  {
    ?neugrp apinatomy:links / ( apinatomy:fasciculatesIn | apinatomy:endsIn ) ?rlyph .
    ?rlyph apinatomy:ontologyTerms ?region .
    filter not exists { ?rlyph apinatomy:layer ?_ }  # require if ?region where not specified
  } UNION {
    ?neugrp apinatomy:links / ( apinatomy:fasciculatesIn | apinatomy:endsIn ) /
            apinatomy:layerIn / apinatomy:ontologyTerms ?region .
  }
}
ORDER BY ?neupop
neupop label prefLabel
ilxtr:neuron-type-keast-3 neuron type kblad 3 inferior mesenteric ganglion neuron (kblad)
ilxtr:neuron-type-keast-6 neuron type kblad 6 sympathetic preganglionic neuron innervating pelvic ganglion neuron (kblad)
ilxtr:neuron-type-keast-7 neuron type kblad 7 sympathetic preganglionic neuron innervating inferior mesenteric ganglion neuron (kblad)
ilxtr:neuron-type-keast-11 neuron type kblad 11 L1-L2 sensory neuron innervating bladder
ilxtr:neuron-type-sdcol-b neuron type sdcol b  
ilxtr:neuron-type-sdcol-d neuron type sdcol d  
ilxtr:neuron-type-sdcol-f neuron type sdcol f  
ilxtr:neuron-type-sdcol-g neuron type sdcol g  
ilxtr:neuron-type-sdcol-h neuron type sdcol h  
ilxtr:neuron-type-sdcol-q neuron type sdcol q  
ilxtr:neuron-type-sdcol-q-prime neuron type sdcol q'  

Date: 2022-12-21T16:18:44-05:00

Author: Tom Gillespie

Created: 2022-12-22 Thu 01:38

Validate