Hi community,
I used algo.unionFind in graph algorithm package for community detection, and got the community detection result.
Here is my code:
CALL algo.unionFind('HMGS', 'jaccard', {weightProperty:'jaccard_weight', defaultValue:0.0, threshold:0.03, concurrency: 1, write:true, writeProperty:'cluster'})
Here is my community detection result
My problem is I want to visulize the result in neo4j, but I fail.
I want the nodes carrying same set id gathering together.
I did try
MATCH (n:HMGS)
WHERE n.cluster
RETURN n
This gave me an clienterror
Don't know how to treat that as a predicate: Long(0)
I am just wondering am I doing right to visulize the community detection result?
Or there is another way to do it?
Thanks for advance
neo4j version: 3.5.14
graph algorithm package: neo4j-graph-algorithms-3.5.14
neo4j browser version: 3.2.26
USING PERIODIC COMMIT 1000
LOAD CSV WITH HEADERS FROM 'file:///hmgs.csv' AS hmgenesets
MERGE (hmgs:HMGS{name: hmgenesets.hallmark_genesets})
WITH hmgs
MATCH (hmgs)
RETURN (hmgs)
USING PERIODIC COMMIT 1000
LOAD CSV WITH HEADERS FROM 'file:///ji.csv' AS jaccard_index
WITH jaccard_index
MATCH (set1:HMGS{name:jaccard_index.Set1}), (set2:HMGS{name:jaccard_index.Set2})
MERGE (set1) -[ji:jaccard {jaccard_weight: jaccard_index.weight}]-> (set2)
SET ji.jaccard_weight=toFloat(ji.jaccard_weight)
CALL algo.unionFind('HMGS', 'jaccard', {weightProperty:'jaccard_weight', defaultValue:0.0, threshold:0.03, concurrency: 1, write:true, writeProperty:'cluster'})