[BioC] Rgraphviz edge weight question
Kimpel, Mark William
mkimpel at iupui.edu
Mon Jun 12 02:23:03 CEST 2006
I spent some time today trying to figure out how to accomplish what you
outlined below and I believe there is a roadblock with the C code of
.Call("Rgraphviz_agopen"....) . In agopen, the lwd slot of edgeAttrs
Ace~Cat Ace~Cs Adcyap1~Avp Adcyap1~Gal Adcyap1~Ghrh
Akt1~Igf1 Akt1~Insr Akt1~Src Akt1~Vegfa Avp~Gal
4 4 4 4 4
4 4 4 4 4 4
Which is correct for the test code I am using. Once the C function is
which indicates to me that the C code is not translating the "lwd"
parameter from the graph to the Ragraph object.
Jeff, am I correct? If so, is this something that you can address? If
so, while you are at it, could you also get the function to pass along
the "lty" parameter as well?
If I'm all wet here, please pardon my ignorance, I'm a novice
Mark W. Kimpel MD
(317) 490-5129 Home, Work, & Mobile
From: Wolfgang Huber [mailto:huber at ebi.ac.uk]
Sent: Sunday, June 11, 2006 1:22 PM
To: Kimpel, Mark William
Cc: Bioconductor Newsgroup
Subject: Re: [BioC] Rgraphviz edge weight question
I believe that is not currently possible (Rgraphviz 1.11.0) without
changing some of the code in Rgraphviz (or overwriting exisitings
methods with your own ones). Seth, Jeff, please correct me if I am
The method "lines" for "AgEdge" objects (defined in
Rgraphviz/R/Ragraph.R) has and honours a parameter "lwd". Its default
is the global option par("lwd").
However, that parameter is not set (or read from any kind of graph
attribute or function call parameter) by the plot method for the
"graphNEL" class (which in turn calls the plot method for the class
"Ragraph"). Both of these are defined in Rgraphviz/R/graph.R.
It should be relatively straightforward to modify these latter two
methods to honor an element "lwd" in the edgeAttrs list and pass it on
to "lines" (for "AgEdge").
Mark, if you feel adventurous, you could try to contribute a patch for
Also, in the Bioconductor book on p.368 and Fig. 21.15 there is an
example how can really do anything you want...
PS - for the purists, when I said method for class X, I meant a method
whose signature contains X in the first position.
Kimpel, Mark William wrote:
> I am visualizing graphNEL objects using Rgraphviz. I would like to set
the thickness of the edge lines, in points, proportional to the edge
weights. Is this an attribute that can be set? I have looked through the
Rgraphviz documentation as well as the Graphviz website without finding
> Mark W. Kimpel MD
> Official Business Address:
> Department of Psychiatry
> Indiana University School of Medicine
> Biotechnology, Research, & Training Center
> 1345 W. 16th Street
> Indianapolis, IN 46202
> Preferred Mailing Address:
> 15032 Hunter Court
> Westfield, IN 46074
> (317) 490-5129 Home, Work, & Mobile
> 1-(317)-536-2730 FAX
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> Search the archives:
Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber
More information about the Bioconductor