Skip to content

Commit

Permalink
Updating query to reflect new ID model
Browse files Browse the repository at this point in the history
  • Loading branch information
souzadevinicius committed Aug 22, 2024
1 parent ce360b9 commit 2b5c23b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions queries/genes_to_diseases_ranked_by_otar_score.cypher
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
MATCH (d:disease)<-[r1:`gwas:associated_with`]-(s:`gwas:SNP`)
WHERE d.`grebi:nodeId` = 'mondo:0005044'
MATCH (d:`biolink:Disease`)-[:id]->(id:Id {id: "mondo:0005044"})
WITH d
MATCH (d)<-[r1:`gwas:associated_with`]-(s:`gwas:SNP`)-[]->(g:`hgnc:Gene`)
WITH d,s,r1
MATCH (s)-[r2]-(o:`otar:Evidence`)
WHERE o.`otar:variantEffect` is not null
WITH d,s, o,r1,r2
ORDER BY o.`otar:score` DESC
WITH d,s, COLLECT(o)[..1] as os,r1, COLLECT(r2)[..1] as r2s
MATCH (s)-[r3]-(g:`hgnc:Gene`)
return distinct(g.`hgnc:symbol`[0]) as gene_symbol, d.`grebi:name`[0] as disease_name, os[0].`otar:variantEffect`[0] as variant_effect, toFloat(os[0].`otar:score`[0]) as otar_score
RETURN DISTINCT(g.`hgnc:symbol`[0]) as gene_symbol, d.`grebi:name`[0] as disease_name, os[0].`otar:variantEffect`[0] as variant_effect, toFloat(os[0].`otar:score`[0]) as otar_score
LIMIT 10

0 comments on commit 2b5c23b

Please sign in to comment.