Skip to content

Commit

Permalink
Merge pull request #1457 from VirtualFlyBrain/master-solr-cache
Browse files Browse the repository at this point in the history
Master solr cache
  • Loading branch information
Robbie1977 authored Jan 12, 2024
2 parents 9a22372 + 154b944 commit 6d44535
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ var focusTermConfiguration = {
position: "bottom-start",
dynamicListInjector: {
handlerAction: "subMenuGrouping",
parameters: ["undefined"]
parameters: []
}
}
]
Expand Down
5 changes: 5 additions & 0 deletions components/configuration/VFBMain/searchConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ var searchConfiguration = {
"filter_name": "Synaptic Neuropil",
"enabled": "disabled",
},
{
"key": "hasScRNAseq",
"filter_name": "Has scRNAseq data",
"enabled": "disabled",
},
{
"key": "DataSet",
"filter_name": "Dataset",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,15 @@ var toolbarMenu = {
handlerAction: "openNewTab",
parameters: ["https://neuprint.janelia.org/?dataset=hemibrain%3Av1.2.1&qt=findneurons"]
}
},
{
label: "Adult Male VNC (MANC) NeuPRINT+ (FlyEM, Janelia)",
icon: "",
position: "right-start",
action: {
handlerAction: "openNewTab",
parameters: ["https://neuprint.janelia.org/?dataset=manc%3Av1.0&qt=findneurons"]
}
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion components/configuration/VFBTree/VFBTreeConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var treeCypherQuery = instance => ({
"statement": "MATCH (root:Class)<-[:INSTANCEOF]-(t:Template {short_form:'" + instance + "'})"
+ "<-[:depicts]-(tc:Template)<-[ie:in_register_with]-(c:Individual)-[:depicts]->(image:"
+ "Individual)-[r:INSTANCEOF]->(anat:Class:Anatomy) WHERE exists(ie.index) WITH root, anat,r,image"
+ " MATCH p=allshortestpaths((root)<-[:SUBCLASSOF|part_of*..]-(anat)) "
+ " MATCH p=allshortestpaths((root)<-[:SUBCLASSOF|part_of*..50]-(anat)) "
+ "UNWIND nodes(p) as n UNWIND nodes(p) as m WITH * WHERE id(n) < id(m) "
+ "MATCH path = allShortestPaths( (n)-[:SUBCLASSOF|part_of*..1]-(m) ) "
+ "RETURN collect(distinct { node_id: id(anat), short_form: anat.short_form, image: image.short_form })"
Expand Down
56 changes: 56 additions & 0 deletions model/vfb.xmi
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@
<types xsi:type="gep_1:SimpleType"
id="hasScRNAseq"
name="has Single Cell RNA Seq Results"/>
<types xsi:type="gep_1:SimpleType"
id="Gene"
name="Gene"/>
</libraries>
<libraries
id="vfbLibrary"
Expand Down Expand Up @@ -622,6 +625,41 @@
returnType="//@libraries.3/@types.0"
queryProcessorId="neo4jQueryProcessor"/>
</queries>
<queries
xsi:type="gep_2:CompoundQuery"
id="dataset_scRNAseq_query_compound"
name="dataset_scRNAseq_query">
<queryChain
xsi:type="gep_2:SimpleQuery"
name="Get JSON for dataset scRNAseq query"
description="Get JSON for dataset scRNAseq query"
query="&quot;statement&quot;: &quot;MATCH (c:Individual)-[:has_source]->(ds:scRNAseq_DataSet) WHERE ds.short_form = $id OPTIONAL MATCH (ds)-[:has_reference]->(p:pub) WITH COLLECT({ core: { short_form: p.short_form, label: coalesce(p.label,''), iri: p.iri, types: labels(p), unique_facets: apoc.coll.sort(coalesce(p.uniqueFacets, [])), symbol: coalesce(([]+p.symbol)[0], '')} , PubMed: coalesce(([]+p.PMID)[0], ''), FlyBase: coalesce(([]+p.FlyBase)[0], ''), DOI: coalesce(([]+p.DOI)[0], '') }) AS pubs, c RETURN { core : { short_form: c.short_form, label: coalesce(c.label,''), iri: c.iri, types: labels(c), unique_facets: apoc.coll.sort(coalesce(c.uniqueFacets, [])), symbol: coalesce(([]+c.symbol)[0], '')} , description : coalesce(c.description, []), comment : coalesce(c.comment, []) } AS term, 'Get JSON for dataset scRNAseq query' AS query, 'ma3c0d68' AS version, pubs&quot;, &quot;parameters&quot; : { &quot;id&quot; : &quot;$ID&quot; }"
countQuery="&quot;statement&quot;: &quot;MATCH (c:Individual)-[:has_source]->(ds:scRNAseq_DataSet) WHERE ds.short_form = $id RETURN count(c) as count&quot;, &quot;parameters&quot; : { &quot;id&quot; : &quot;$ID&quot; }"/>
<queryChain
xsi:type="gep_2:ProcessQuery"
name="Process Images"
returnType="//@libraries.3/@types.0"
queryProcessorId="neo4jQueryProcessor"/>
</queries>
<queries
xsi:type="gep_2:CompoundQuery"
id="expression_cluster_query_compound"
name="expression_cluster_query"
description="Get JSON for expression in cluster query">
<queryChain
xsi:type="gep_2:SimpleQuery"
id="cluster_expression_query"
name="Get JSON for cluster expression query"
description="Get JSON for cluster expression query"
query="&quot;statement&quot;: &quot;MATCH (primary:Individual:Cluster)-[e:expresses]->(g:Gene:Class) WHERE g.short_form in [$id] WITH e.expression_level[0] as expression_level, e.expression_extent[0] as expression_extent, { short_form: g.short_form, label: coalesce(g.label,''), iri: g.iri, types: labels(g), unique_facets: apoc.coll.sort(coalesce(g.uniqueFacets, [])), symbol: coalesce(([]+g.symbol)[0], '')} AS gene,primary MATCH (a:Anatomy)&lt;-[:composed_primarily_of]-(primary) WITH { short_form: a.short_form, label: coalesce(a.label,''), iri: a.iri, types: labels(a), unique_facets: apoc.coll.sort(coalesce(a.uniqueFacets, [])), symbol: coalesce(([]+a.symbol)[0], '')} AS anatomy,primary,expression_level,expression_extent,gene RETURN { core : { short_form: primary.short_form, label: coalesce(primary.label,''), iri: primary.iri, types: labels(primary), unique_facets: apoc.coll.sort(coalesce(primary.uniqueFacets, [])), symbol: coalesce(([]+primary.symbol)[0], '')} , description : coalesce(primary.description, []), comment : coalesce(primary.comment, []) } AS term, 'Get JSON for expression in cluster query' AS query, 'ma3c0d68' AS version , expression_level, expression_extent, anatomy&quot;, &quot;parameters&quot; : { &quot;id&quot; : &quot;$ID&quot; }"
countQuery="&quot;statement&quot;: &quot;MATCH (primary:Individual:Cluster)-[e:expresses]->(g:Gene:Class) WHERE g.short_form in [$id] RETURN count(primary) as count&quot;, &quot;parameters&quot; : { &quot;id&quot; : &quot;$ID&quot; }"/>
<queryChain
xsi:type="gep_2:ProcessQuery"
id="vfb_query_schema_processor"
name="Process clusters"
description="vfb_query_schema_processor"
queryProcessorId="neo4jQueryProcessor"/>
</queries>
<fetchVariableQuery
xsi:type="gep_2:CompoundQuery"
name="Compound query for collating term information"
Expand Down Expand Up @@ -1250,6 +1288,24 @@
<matchingCriteria
type="//@libraries.3/@types.0 //@libraries.3/@types.22"/>
</queries>
<queries xsi:type="gep_2:CompoundRefQuery"
id="scRNAdatasetData"
name="Show all data for a scRNAseq dataset"
description="List all data for $NAME"
returnType="//@libraries.3/@types.0"
queryChain="//@dataSources.0/@queries.23">
<matchingCriteria
type="//@libraries.3/@types.24 //@libraries.3/@types.47"/>
</queries>
<queries xsi:type="gep_2:CompoundRefQuery"
id="expressionCluster"
name="expression_cluster"
description="scRNAseq clusters expressing $NAME"
returnType="//@libraries.3/@types.0"
queryChain="//@dataSources.0/@queries.24">
<matchingCriteria
type="//@libraries.3/@types.1 //@libraries.3/@types.48 //@libraries.3/@types.47"/>
</queries>
<queries xsi:type="gep_2:CompoundRefQuery"
id="terminfotest"
name="Term Info Test"
Expand Down

0 comments on commit 6d44535

Please sign in to comment.