[BioC] Rgraphviz edge weight question

Wolfgang Huber huber at ebi.ac.uk
Sun Jun 11 19:22:12 CEST 2006

Hi Mark,

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 wrong.

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 
doing this?

Also, in the Bioconductor book on p.368 and Fig. 21.15 there is an 
example how can really do anything you want...

Best wishes

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 an answer.
> Thanks,
> Mark
> 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
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber

More information about the Bioconductor mailing list