Open Crispae opened 10 months ago
Query: Gene having maximum number of connection in the database and what AOPs are linked to it. Cypher:
MATCH (a:AOP)-[rel:HAS_GENE]->(g:GENE)
WITH g AS geneNode, COUNT(*) AS connections // pass the gene node and thier connection
ORDER BY connections DESC
LIMIT 1
MATCH (selectedGene:GENE)-[rel2:HAS_GENE]-(aop:AOP)
WHERE selectedGene = geneNode
RETURN *
@deepika060193 put the examples query, here later it will be merged
query: what is the life stage of adverse outcome linked with AOP 450
MATCH (a:AOP {id:'450'})-[r1:HAS_ADVERSE_OUTCOME]->(adverse:KEY_EVENT)
MATCH (adverse)-[r2:IS_APPLICABLE]->(l:LIFE_STAGE)
RETURN *
query: AOPs mentioning 'liver' and their linked key events.
WHERE toLower(a.name) =~ '.*liver.*'
MATCH (a)-[rel:HAS_KEY_EVENT]-(ke:KEY_EVENT)
RETURN *
query: Extract top 5 key event relationship nodes and their associated AOPs.
MATCH (aop:AOP)-[r:HAS_KER]-(ker:KEY_EVENT_RELATIONSHIP)
WITH ker,r,aop, COUNT(aop) as aopCount
ORDER BY aopCount DESC
LIMIT 5
RETURN *
AOPs applicable to fish and rat. Then filter only the AOPs which has "fertility" and "reproductive" issue mentioned in adverse outcome. Among these filtered AOP find the shortest path which are connected by key events only.
MATCH (a:AOP)-[rel:IS_APPLICABLE]-(b:TAXONOMY)
WHERE toLower(b.name) =~ '.*fish.*' OR toLower(b.name) =~ '.*rat.*'
MATCH (a)-[rel1:HAS_ADVERSE_OUTCOME]-(c:KEY_EVENT)
WHERE toLower(c.name) =~ '.*fertility.*' OR toLower(c.name) =~ '.*reproductive.*'
WITH collect(a.id) as nodes
//
MATCH (aop1:AOP) WHERE aop1.id IN nodes
MATCH (aop2:AOP) where aop2.id IN nodes AND aop1<>aop2
MATCH path = shortestPath((aop1)-[:HAS_KEY_EVENT*]-(aop2))
RETURN path
Issue to add new query, which is processed wrong by AOPWIKI explorer