cluster nodes based on distance

Apr 26, 2012 at 11:29 PM

Hi there,

I am trying to build a protein expression network. I am currently using a n^2 symmetrical matrix, my main problem is that I cannot work out how to set the distances between nodes based upon the corresponding values in the matrix. For instance a simplified version:

           A         B         C        

A         1          3          1         

B         3          1          2         

C         1          2          1

What I would want is A and C to be clustered together closer than A & B if that makes sense.

Is this sort of thing possible in nodeXL?



Apr 27, 2012 at 5:37 AM


If you use the Fruchterman-Reingold layout (NodeXL, Graph, Layout), and you add an Edge Weight column to the Edges worksheet (the column name has to be spelled exactly like that), then edges with a larger edge weight will exert a stronger "force" on each other and will tend to end up closer to each other when you refresh the graph.  (Fruchterman-Reingold is what's called a "force-directed" layout algorithm.)  The effect varies quite a bit with the number of vertices, number of edges, and the way they are connected, but it might be worth a try in your case.

If your matrix is in a plain Excel workbook and you use NodeXL, Data, Import From Open Matrix Workbook to get your data into NodeXL, then NodeXL will add the Edge Weight column for you.

-- Tony