Last active
May 30, 2025 00:27
-
-
Save jexp/8d991d1e543c5a576a3f1ee70132ce71 to your computer and use it in GitHub Desktop.
Revisions
-
jexp revised this gist
May 30, 2025 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -27,4 +27,11 @@ call (links) { match (s:Node {node_id:l.source}) match (t:Node {node_id:l.target}) create (s)-[:ACTIVATES {weight:l.weight}]->(t) }; MATCH p=()-[r:ACTIVATES]->() WITH r.weight as w return percentileDisc(w,0.95); match p1=(s:SuperNode)<-[:PART_OF]-(n) match p2=(n)-[r:ACTIVATES]-(m) where r.weight > 0.5 return p1,p2; -
jexp revised this gist
May 30, 2025 . 1 changed file with 30 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ create index for (n:Node) on (n.jsNodeId); create constraint for (n:Node) require (n.node_id) is unique; with "https://gist.github.com/jexp/8d991d1e543c5a576a3f1ee70132ce71/raw/medical-diagnosis.json" as url call apoc.load.json(url) yield value as v with v.metadata as metadata, v.links as links, v.qParams as qParams, v.nodes as nodes merge (m:Metadata {id: metadata.slug + ":" +metadata.scan}) on create set m += metadata merge (m)-[:PARAMS]->(q:QParams) on create set q += qParams {.linkType, .pinnedIds,.clickedId, .sg_pos} with * call (nodes) { unwind nodes as n merge (node:Node {node_id:n.node_id}) on create set node += n } call (qParams) { unwind qParams.supernodes as s merge (sn:SuperNode {name:s[0]}) // on create set s.ids = s[1..] with * unwind s[1..] as sId match (n:Node {jsNodeId:sId}) merge (sn)<-[:PART_OF]-(n) } call (links) { unwind links as l match (s:Node {node_id:l.source}) match (t:Node {node_id:l.target}) create (s)-[:ACTIVATES {weight:l.weight}]->(t) } -
jexp created this gist
May 29, 2025 .There are no files selected for viewing