Skip to content

Commit

Permalink
Adding Query for scRNAseq datasets to return clusters and samples
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 committed Jun 12, 2023
1 parent 5d79d0b commit e998502
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions model/vfb.xmi
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,22 @@
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 c.short_form = $id OPTIONAL MATCH (ds)-[:has_reference]->(p:pub) WITH { 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], '')} AS cluster, { short_form: ds.short_form, label: coalesce(ds.label,''), iri: ds.iri, types: labels(ds), unique_facets: apoc.coll.sort(coalesce(ds.uniqueFacets, [])), symbol: coalesce(([]+ds.symbol)[0], '')} AS dataset, 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,primary 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 dataset scRNAseq query' AS query, 'ma3c0d68' AS version , cluster, dataset, pubs&quot;, &quot;parameters&quot; : { &quot;ids&quot; : $ARRAY_ID_RESULTS , &quot;id&quot; : &quot;$ID&quot; }"
countQuery="&quot;statement&quot;: &quot;MATCH (c:Individual)-[:has_source]->(ds:scRNAseq_DataSet) WHERE c.short_form = $id RETURN count(c) as count&quot;, &quot;parameters&quot; : { &quot;ids&quot; : $ARRAY_ID_RESULTS , &quot;id&quot; : &quot;$ID&quot; }"/>
<queryChain
xsi:type="gep_2:ProcessQuery"
name="Process Images"
returnType="//@libraries.3/@types.0"
queryProcessorId="neo4jQueryProcessor"/>
</queries>
<fetchVariableQuery
xsi:type="gep_2:CompoundQuery"
name="Compound query for collating term information"
Expand Down Expand Up @@ -1242,4 +1258,13 @@
<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>
</gep:GeppettoModel>

0 comments on commit e998502

Please sign in to comment.