Directed Graph

I would like to use Pipeline Pilot to read in an adjacency matrix (from Excel, e.g.) and then generate a graphical display of the resultant directed graph. It seems fairly simple in concept, but I'm having trouble getting any traction.

Has anyone done something similar or does anyone have suggestions?


Thanks!
Answers 11
HP
HP 2009-02-06
Hello hoosierchem,

I did not see an obvious way to achieve this, but perhaps someone will have a better answer. In the meantime I have posted this as an enhancement request in our official tracking system.

If you would like to have your name associated with the request so that you can be notified if this feature is implemented as a component or protocol in the future, please contact me directly by email so that I can add it to the request.

Best wishes,
Lynn Miller, Accelrys Pipeline Pilot Support
miller@accelrys.com
KB
KB 2009-02-06
If you have the R collection, you might look at the gplot2() R function. There isn't a native component that uses it, but some of the other components in the Charts directory of the R collection may serve as templates if you're interested in creating a custom component.
JK
JK 2009-02-09
There are also some nice Java and ActionScript (for Flash) libraries that support these sorts of displays. It takes a bit of coding, but the results can be great. Some links to try are:

Simple Force-directed example:

http://sawamuland.com/flash/graph.html

Prefuse supports LOTS of advanced data visualization techniques:

http://www.prefuse.org (Java version)
http://flare.prefuse.org (ActionScript version)
MR
MR 2009-02-09
I'd recommend using the "dot" tool that comes as part of the free GraphViz package.

http://www.graphviz.org/

Just write a component that converts your Excel file into dot form (tutorial here http://www.graphviz.org/pdf/dotguide.pdf) and then runs dot on your server. The output (jpg, png, svg, pdf, ps) can then be read back in and displayed. This should be quite straightforward.
HP
HP 2009-02-09
Thank you for the suggestions. I've had to put this on the back burner for now, but I'll update here if/when I have something working.
HV
HV 2009-02-09
another possibility could be to use cytoscape
(first maybe use some perl code to transform the adjacency matrix to a graph in cytoscape format and then visualise with cytoscape)
I saw Pedro made a component to do that, though I didnt test it yet
good luck
SM
SM 2009-02-11
We're using Spotfire DXP which in the latest version 2.2 has a graph drawing tool that supports large graphs.... it's pretty good for a first release. They also have an API for it...

cheers
steve
HP
HP 2010-01-29
Hello,

Since this request was posted we released some new Canvas Components in the Reporting Collection (new with the release of PP 7.5.2 CU2) that should address this nicely.

For an example, see the "Network Diagram" protocol on the Protocols tab under SciTegic Examples.
Best wishes,
Lynn
HP
HP 2010-06-10

There is already an example using GraphViz available on the forum here

https://community.accelrys.com/message/2567

I have used this template to look at some chemical similarity rather than document, simple example attached. The problem I've found with GraphViz is that it scales pretty poorly.

Another tool I've found quite efficient for larger data-sets is igraph, again available through R-stats.


[edit: I just noticed this thread was actually started some time before Stephane posted his components for graphviz]

comment imagecomment image
HP
HP 2010-02-03
Thanks for the updates. I'll take a look.
PD
PD 2010-02-09
Hi,

Actually, you may do this pretty easily using standard PP components. Depending on the matrix format (with or without column and/or row header), you may have to modify the protocol below.

Basically, use excel or text reader to read the matrix, unpivot the data, in my example I unpivot '\d' since column header are numerical, you end-up with a list of source/target edges with an extra boolean column telling you whether source and target are linked. You may filter out proper edges with a custom filter to get the whole list of edgs.

Eventually, you can draw the graph, here I use Discngine Graph Collection to build the graph and export it to GraphViz.

If there is no column names nor row names in your file, you should add an index by adding a 'Count and Index' component before unpivoting, then unpivot on '!Index', and rename targets by replacing 'Column' with ''.
comment imagecomment image