Description Usage Arguments Value Author(s) References See Also Examples
Modular layout style:
Visualization of graphs in a modular form.
1 2 3 4 5 6 7 8 9 10 11 12 | ## S3 method for class 'modules'
plot(x, layout.function=NULL,mod.list=NULL,
module.function=FALSE, split.graph=7, color.random=FALSE,
modules.color = NULL, col.grad=NULL, mod.edge.col=NULL,
ed.color=NULL,edge.col.random=FALSE, expression = NULL,
exp.by.module=FALSE, tkplot=FALSE, layout.overall = NULL,
sf=0,arrange.bydegree=FALSE,mod.lab=FALSE,node.lab=FALSE,
lab.cex = NULL,lab.color=NULL, lab.dist=NULL, v.size=FALSE,
nodeset=NULL,path.col="green", col.s1="red", col.s2="yellow",
nodes.on.path=TRUE,e.path.width=c(1,1),
scale.module=NULL,v.sf=5,e.width=.5,bg="black",
abstract.graph=TRUE, modules.name.num = TRUE, v.size.path=TRUE,...)
|
x |
|
layout.function |
is a 'function' class or a vector of functions to plot the layout of each module by a function in 'layout.function'. |
mod.list |
|
module.function |
is a logical value for obtaining modules in the network. |
random |
is a boolean variable, if 'mod.list' is null, it picks the nodes for modules randomly. |
split.graph |
|
color.random |
If this option is TRUE it will assign random colors to modules. |
modules.color |
Is a vector of colors to assign a color to each module by the the user. |
col.grad |
is a vector of colors or can be a list of vectors of colors to assign the colors to the nodes for each modules based on their degree from low to high. |
mod.edge.col |
is a vector of color to assign the edge color to the edges of a modules. |
ed.color |
is a scaler of color and assign colors to the edges between modules. |
edge.col.random |
is a boolean variable and assign colors to the edges of each module randomly. |
expression |
|
exp.by.module |
this option is a boolean or a numeric vector which represents the order of modules given as an input in the mod.list option. This option is used to see the variation in expression values of nodes in a particular module by using a range of color from red to blue, red indicate low expression value and blue indicates high expression values. |
tkplot |
it is a boolean variable, if it is true, function will use 'tkplot' function to plot a graph, if it is false function will use plot function with the black background. |
layout.overall |
this option belongs to the class 'function', for this option any function which returns a two column matrix which should have rows equal to the no of modules for the placement of the modules. |
sf |
is an integer variable is used to scale up or scale down the graph plot. |
arrange.bydegree |
is a boolean variable; if true the coordinates of nodes are assigned by their degree, higher degree nodes are plotted towards center and lower degree nodes are plotted outside. |
mod.lab |
is a boolean variable; prints module labels at center of each module if the module's names are available in 'mod.list' as list names. |
node.lab |
is a boolean variable; this option plots the vertex label, if option is TRUE. |
lab.cex |
is a numeric variable; this determines the size of the label of the vertices or the modules. |
lab.color |
is a string variable; this assigns colors to the label of vertices or the modules. |
lab.dist |
is a numeric variable; this adjusts vertices label. |
nodeset |
is a list object contains two vector, it can be a numeric vector also. First vector contains set of start nodes and second vector contains end nodes. In the case of numeric vector which indicates the module id, it is used to show shortest path between two modules. Shortest paths are visualized between start nodes and end nodes. |
path.col |
is a color vector for coloring the shortest path between start nodes and end nodes. |
col.s1 |
is a color vector to color start nodes or modules. |
col.s2 |
is a color vector to color end nodes or modules. |
nodes.on.path |
is a logical value which shows nodes which connect start nodes and end nodes. |
e.path.width |
is a vector containing of size 2. This option sets the edge width of the shortest paths between two modules or two set of nodes. |
scale.module |
is a numeric vector of the size of total number of modules. This option scales the size of each module independently. |
v.size |
is a numeric value or a numeric vector which contains numeric values to assign the size of nodes. |
e.width |
is a numeric value to assign the width to edges. |
v.sf |
is a numeric value. This is used to adjust vertex size when |
bg |
is a color value to adjust background color of the plot. |
abstract.graph |
is a logical value which adjusts the abstract view of modular plot using force-based algorithm or any input function given in |
modules.name.num |
is a logical value for displaying module name or its number |
v.size.path |
is a numeric or logical value which adjusts the size of nodes between which the shortest path to be shown. |
... |
|
returns a list object of 'netbiov' class
Shailesh Tripathi, Frank Emmert-Streib
plot.abstract.nodes, plot.abstract.module
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | data("PPI_Athalina")
data("modules_PPI_Athalina")
## Example 1 #######%
##% Modular layout plot of A. Thalina PPI network, modules
##are colored randomly, module information is given as a list
##object ###%
id <- plot.modules(g1,mod.list = lm,
layout.function=layout.graphopt, color.random = TRUE ,
tkplot=FALSE,node.lab=FALSE,v.size=1)
## Example 2 #######%
##% Modular layout plot of A. Thalina PPI network, modules
##are colored randomly, module information is predicted using
##'fastgreedy' algorithm ###%
id <- plot.modules(g1, layout.function=layout.graphopt,
color.random = TRUE , tkplot=FALSE,node.lab=FALSE,v.size=1)
## Example 3 #######%
##% Modular layout plot of A. Thalina PPI network when
##expression value of genes are given ###%
id <- plot.modules(g1, layout.function=layout.graphopt,
color.random = TRUE, expression=rnorm(vcount(g1)),
tkplot=FALSE,node.lab=FALSE,v.size=1)
## Example 4 #######%
##% Modular layout plot of A. Thalina PPI network when
##expression value of modules 1, 2 and 3 are shown by colors by
##ranking independently from each other ###%
id <- plot.modules(g1, layout.function=layout.graphopt,
modules.color="grey", expression=rnorm(vcount(g1)),
tkplot=FALSE,node.lab=FALSE,v.size=1, exp.by.module=c(1,2,3))
## Example 5 #######%
##% Modular layout plot of A. Thalina PPI network by
##emphasizing module labels ###%
id <- plot.modules(g1, mod.list=lm,
layout.function=layout.graphopt, modules.color="grey",
tkplot=FALSE, mod.lab=TRUE,v.size=1, lab.color="green" )
## Example 6 #######%
##% Modular layout plot of A. Thalina PPI network
##highlighting shortest paths between modules 1, 5 and 7, 18 ###%
id <- plot.modules(g1, mod.list=lm,
layout.function=layout.graphopt, modules.color="grey",
tkplot=FALSE, nodeset=c(1,5,7,18), sf=-10, v.size=1)
## Example 7 #######%
##% Modular layout plot of A. Thalina PPI network combining
##two layouts ###%
fn <- function(g)layout.star(g,
center=which.max(degree(g))-1)
id <- plot.modules(g1,mod.list = lm,
layout.function=layout.graphopt, layout.overall=fn, color.random
= TRUE , tkplot=FALSE,node.lab=FALSE,v.size=1)
## Example 8 #######%
##% Modular layout plot of A. Thalina PPI network by scaling
##up second module and scaling down the expansion of other modules ###%
fn <- function(g)layout.star(g,
center=which.max(degree(g))-1)
sm <- rep(1, length(lm))
sm[2] <- 40
id <- plot.modules(g1,mod.list = lm, layout.function=layout.graphopt,
layout.overall=fn, color.random=TRUE,tkplot=FALSE,v.size=2, scale.module=sm,
mod.edge.col="green")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.