Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query examples and Cypher #5

Open
Crispae opened this issue Nov 20, 2023 · 6 comments
Open

Query examples and Cypher #5

Crispae opened this issue Nov 20, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@Crispae
Copy link
Collaborator

Crispae commented Nov 20, 2023

Issue to add new query, which is processed wrong by AOPWIKI explorer

@Crispae
Copy link
Collaborator Author

Crispae commented Nov 20, 2023

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 *

@Crispae Crispae self-assigned this Nov 21, 2023
@Crispae Crispae added the enhancement New feature or request label Nov 21, 2023
@Crispae Crispae pinned this issue Nov 21, 2023
@Crispae
Copy link
Collaborator Author

Crispae commented Nov 21, 2023

@deepika060193 put the examples query, here later it will be merged

@Crispae Crispae unpinned this issue Nov 23, 2023
@Crispae
Copy link
Collaborator Author

Crispae commented Nov 29, 2023

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 *  

@Crispae Crispae mentioned this issue Dec 1, 2023
@Crispae
Copy link
Collaborator Author

Crispae commented Dec 19, 2023

query: AOPs mentioning 'liver' and their linked key events.

WHERE toLower(a.name) =~ '.*liver.*'
MATCH (a)-[rel:HAS_KEY_EVENT]-(ke:KEY_EVENT)
RETURN *   

@Crispae
Copy link
Collaborator Author

Crispae commented Dec 20, 2023

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 *  

@Crispae
Copy link
Collaborator Author

Crispae commented Feb 13, 2024

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  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants