diff --git a/queries/genes_to_diseases_ranked_by_otar_score.cypher b/queries/genes_to_diseases_ranked_by_otar_score.cypher index 3842274..a988bed 100644 --- a/queries/genes_to_diseases_ranked_by_otar_score.cypher +++ b/queries/genes_to_diseases_ranked_by_otar_score.cypher @@ -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 \ No newline at end of file