On Mon, Mar 28, 2011 at 3:05 PM, karena <dr.jz...@gmail.com> wrote:
> I am using 'igraph' package to make some graphs of 'gene-gene interaction'.
>
> I can get a data.frame which has three columns.
> gene1      gene2          pvalue
> AGT         MLR            1.2e-04
> MLR         11BHSD1      1.71e-05
> IFG2        11BHSD2      2.2e-07
> .             .                 .
> .             .                 .
> .             .                 .
> AGTR1     NPPA            3.2e-2
>
> I have several questions:
> 1) How can I make a plot in which the width of the edges can represent the
> significance of the epistasis p values? I am thinking about getting another
> column which is the -log(pvalue), so the larger the value is the more
> significant the p value is.

epiG <- graph.data.frame(epitab)
coords <- layout.fruchterman.reingold(epiG, weights=-log10(E(epiG)$pvalue))
plot(epiG, layout=coords, edge.width=-log10(E(epiG)$pvalue))

> 2) After I get the graph, how can I modify the image. Because all the nodes
> in the image are numbers (0,1,.....,100), how can I add the gene name to
> each node in the image?

You cannot modify the image after the plotting. Well, you can, but it
is a lot esier
to specify all the parameters at the time of the plotting:

plot(epiG, ..., vertex.label=V(epiG)$name, ...)

See ?igraph.plotting for details.

Best,
Gabor

>
> --
> View this message in context: 
> http://r.789695.n4.nabble.com/Questions-about-igraph-package-tp3412734p3412734.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Gabor Csardi <csa...@rmki.kfki.hu>     MTA KFKI RMKI

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to