[BioC] Drawing network graphs (i.e. nodes and edges)

Peter bioconductor-mailinglist at maubp.freeserve.co.uk
Thu Feb 2 16:57:35 CET 2006


Does anyone know of any existing R (r-project) code/library/package for 
drawing graphs - the network variety consisting of nodes and edges (or 
points and lines/arrows)?

e.g. Genes and interactions

For example, I might have a list of three edges for four genes:

Gene1 -> Gene2
Gene2 -> Gene3
Gene4 -> Gene3

Which would give the following simple graph:

Gene1 -> Gene2 -> Gene3 <- Gene4

Or perhaps as a matrix, which for four genes would be 4 by 4:

[ 0 1 0 0 ]
[ 0 0 1 0 ]
[ 0 0 0 0 ]
[ 0 0 1 0 ]

Here I have used the "rows" as the "from" and the columns as the "to" 
connections.

I was hoping there was an existing library that would accept this sort 
of network definition and draw a picture of it.  Maybe labelled circles 
for the nodes (genes) with arrows for the edges (interactions).

The hard part of this is the spatial layout of the nodes to avoid the 
edges intersecting unrelated nodes.  One simple answer is to draw the 
nodes equally spaces on a large circle.  Apart from the special case of 
self interactions, all the edges would be inside the circle and thus 
never cross another node.

e.g. This sort of image:

http://www.cs.toronto.edu/~wayne/research/ramsey/r.3.9.35.gif

Of course there is the extra gloss of being able to draw a connection 
weight using line thickness etc.

Any ideas?  I haven't found anything on Google...

Thank you

Peter



More information about the Bioconductor mailing list