Last data update: 2014.03.03

R: Exploratory visualization of information spread of biological...
plot.abstract.nodesR Documentation

Exploratory visualization of information spread of biological networks

Description

Modular layout style:

Visualization of modules in an abstract way. In the function plot.abstract.nodes, nodes in a module are replaced by a single node and the relative size of a node is proportional to the total number of nodes in a module. In the functions plot.abstract.module, plot.abstract.nodes, edges between two modules are replaced by a single edge and the total number of edges between two modules are reflected by the relative edge-width.

Usage


## S3 method for class 'abstract.nodes'
plot(x, mod.list=NULL,  rest.module=TRUE, 
color.random=FALSE, nodes.color = NULL, edge.colors=NULL,
layout.function=NULL,tkplot=FALSE,v.sf = 0, e.sf = 0,lab.color=NULL,
lab.cex=NULL, lab.dist=NULL, bg="black", ... )

Arguments

x

x is a graph object created from an adjacency matrix or from a tabular data of two columns using graph() function available in igraph

mod.list

mod.list is a list object each components of mod.list consists a vector of module to be plotted.

random

is a logical value, if modules information is not provided then random nodes for the modules are selected.

rest.module

is a logical value, rest of the nodes to be plotted as a one module (if TRUE) or independently (if FALSE)

color.random

is a logical value, if this option is TRUE it will assign random color to each module or nodes.

nodes.color

assigns colors to nodes of recreated graph

edge.colors

is a vector of colors, assigned to color edges depending on their width from small to large width.

layout.function

is a function class, this corrosponds to a layout function given as an input to plot a graph. Input function should return a two column matrix which has same no of rows as the modules in the graph

tkplot

is a boolean variable, if it is true function will use this option to plot a graph, if it is false function will use plot function with a black background.

v.sf

is a numeric value, this option to increase or decrease the size of nodes

e.sf

is a numeric value, this option to increase or decrease width of edges

lab.color

colors the vertices and edge labels

lab.cex

is anumeric value, increase or decrease the font size of labels

lab.dist

is a numeric value, adjust vertex labels

bg

is a color value to adjust background color of the plot.

...

... parameter for other inputs.

Author(s)

Shailesh Tripathi, Frank Emmert-Streib

References

http://bio-complexity.com/

Examples

  require(igraph)
  data("PPI_Athalina")
  data("modules_PPI_Athalina")
  plot.abstract.nodes(g1, mod.list = lm, 
edge.colors = c("red","green","blue","orange"))

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(netbiov)
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/netbiov/plot.abstract.nodes.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot.abstract.nodes
> ### Title: Exploratory visualization of information spread of biological
> ###   networks
> ### Aliases: plot.abstract.nodes
> 
> ### ** Examples
> 
>   require(igraph)
>   data("PPI_Athalina")
>   data("modules_PPI_Athalina")
>   plot.abstract.nodes(g1, mod.list = lm, 
+ edge.colors = c("red","green","blue","orange"))
$g
IGRAPH UNW- 24 41 -- 
+ attr: name (v/c), label (v/c), weight (e/n)
+ edges (vertex names):
 [1] GO:0007126--GO:0009736 GO:0007126--GO:0009742 GO:0007126--GO:0007389
 [4] GO:0007126--GO:0009626 GO:0009639--GO:0009736 GO:0009639--GO:0045036
 [7] GO:0009639--GO:0031123 GO:0009639--GO:0009742 GO:0009639--GO:0051726
[10] GO:0009639--GO:0008380 GO:0009639--GO:0006355 GO:0009639--GO:0031667
[13] GO:0009639--GO:0030968 GO:0009639--GO:0007243 GO:0009639--GO:0009626
[16] GO:0009639--GO:0051252 GO:0009639--GO:0044257 GO:0009639--GO:0071472
[19] GO:0009736--GO:0009738 GO:0009736--GO:0010374 GO:0009736--GO:0006913
[22] GO:0009736--GO:0010087 GO:0006352--GO:0051726 GO:0006352--GO:0007243
+ ... omitted several edges

$layout
                  [,1]        [,2]
GO:0007126   -9.922799   -7.101355
GO:0009639    5.257291   30.410693
GO:0009736   35.983771  -10.218641
GO:0006352   10.959543  -41.311221
GO:0045036  -35.417103   33.035643
GO:0031123  -48.941435   -8.152928
GO:0009738   43.128044   37.748850
GO:0009742  -17.591155  -63.267412
GO:0051726   71.000824    5.580208
GO:0008380   51.686475  -50.060960
GO:0006355  -58.922101  -43.324444
GO:0006810  -30.988881   73.053596
GO:0031667   30.386976   76.775930
GO:0007389  -81.085898   26.760723
GO:0030968   24.581713  -93.937711
GO:0007243   -1.886630  100.000000
GO:0010374 -100.000000  -12.034310
GO:0006913  -75.311003   69.927969
GO:0009626  100.000000  -25.165001
GO:0010087  -30.819373 -100.000000
GO:0015979   99.106623   35.051830
GO:0051252   73.932334   77.315089
GO:0044257  -81.329380  -73.858667
GO:0071472   79.091715  -77.189747

$vertex.color
 GO:0007126  GO:0009639  GO:0009736  GO:0006352  GO:0045036  GO:0031123 
"#FFFF56BF" "#FF0200BF" "#FFF300BF" "#FFFF56BF" "#FFFF02BF" "#FFFFC0BF" 
 GO:0009738  GO:0009742  GO:0051726  GO:0008380  GO:0006355  GO:0006810 
"#FFEE00BF" "#FFFF0CBF" "#FFBB00BF" "#FFFD00BF" "#FFDB00BF" "#FFFF7BBF" 
 GO:0031667  GO:0007389  GO:0030968  GO:0007243  GO:0010374  GO:0006913 
"#FFFFD3BF" "#FFFF84BF" "#FFFFE6BF" "#FFFFDCBF" "#FFFFA9BF" "#FFFF92BF" 
 GO:0009626  GO:0010087  GO:0015979  GO:0051252  GO:0044257  GO:0071472 
"#FFFFA9BF" "#FFFF51BF" "#FFFF76BF" "#FFFFC0BF" "#FFFFE1BF" "#FFFFA0BF" 

$edge.color
 [1] "orange" "red"    "red"    "red"    "orange" "blue"   "blue"   "blue"  
 [9] "blue"   "red"    "red"    "orange" "blue"   "blue"   "blue"   "blue"  
[17] "blue"   "orange" "red"    "orange" "red"    "orange" "red"    "red"   
[25] "red"    "orange" "red"    "red"    "blue"   "red"    "red"    "red"   
[33] "red"    "red"    "red"    "red"    "red"    "red"    "red"    "red"   
[41] "red"   

$vertex.size
GO:0007126 GO:0009639 GO:0009736 GO:0006352 GO:0045036 GO:0031123 GO:0009738 
  18.86842   59.00000   24.78947   18.86842   22.81579   13.82456   25.44737 
GO:0009742 GO:0051726 GO:0008380 GO:0006355 GO:0006810 GO:0031667 GO:0007389 
  22.37719   32.68421   23.25439   28.07895   17.11404   11.85088   16.67544 
GO:0030968 GO:0007243 GO:0010374 GO:0006913 GO:0009626 GO:0010087 GO:0015979 
  10.97368   12.50877   14.92105   16.01754   14.92105   19.08772   17.33333 
GO:0051252 GO:0044257 GO:0071472 
  13.82456   11.19298   15.35965 

$edge.arrow.size
[1] 0.3

$vertex.label.cex
[1] 1

$vertex.label
 [1] "GO:0007126 \ntotal nodes: 45"  "GO:0009639 \ntotal nodes: 228"
 [3] "GO:0009736 \ntotal nodes: 72"  "GO:0006352 \ntotal nodes: 45" 
 [5] "GO:0045036 \ntotal nodes: 63"  "GO:0031123 \ntotal nodes: 22" 
 [7] "GO:0009738 \ntotal nodes: 75"  "GO:0009742 \ntotal nodes: 61" 
 [9] "GO:0051726 \ntotal nodes: 108" "GO:0008380 \ntotal nodes: 65" 
[11] "GO:0006355 \ntotal nodes: 87"  "GO:0006810 \ntotal nodes: 37" 
[13] "GO:0031667 \ntotal nodes: 13"  "GO:0007389 \ntotal nodes: 35" 
[15] "GO:0030968 \ntotal nodes: 9"   "GO:0007243 \ntotal nodes: 16" 
[17] "GO:0010374 \ntotal nodes: 27"  "GO:0006913 \ntotal nodes: 32" 
[19] "GO:0009626 \ntotal nodes: 27"  "GO:0010087 \ntotal nodes: 46" 
[21] "GO:0015979 \ntotal nodes: 38"  "GO:0051252 \ntotal nodes: 22" 
[23] "GO:0044257 \ntotal nodes: 10"  "GO:0071472 \ntotal nodes: 29" 

$lab.color
[1] "blue"

$lab.dist
[1] 0.2

$vertex.frame.color
 GO:0007126  GO:0009639  GO:0009736  GO:0006352  GO:0045036  GO:0031123 
"#FFFF56BF" "#FF0200BF" "#FFF300BF" "#FFFF56BF" "#FFFF02BF" "#FFFFC0BF" 
 GO:0009738  GO:0009742  GO:0051726  GO:0008380  GO:0006355  GO:0006810 
"#FFEE00BF" "#FFFF0CBF" "#FFBB00BF" "#FFFD00BF" "#FFDB00BF" "#FFFF7BBF" 
 GO:0031667  GO:0007389  GO:0030968  GO:0007243  GO:0010374  GO:0006913 
"#FFFFD3BF" "#FFFF84BF" "#FFFFE6BF" "#FFFFDCBF" "#FFFFA9BF" "#FFFF92BF" 
 GO:0009626  GO:0010087  GO:0015979  GO:0051252  GO:0044257  GO:0071472 
"#FFFFA9BF" "#FFFF51BF" "#FFFF76BF" "#FFFFC0BF" "#FFFFE1BF" "#FFFFA0BF" 

$edge.width
 [1]  5.000000  1.666667  1.666667  1.666667  5.000000  3.333333  3.333333
 [8]  3.333333  3.333333  1.666667  1.666667 10.000000  3.333333  3.333333
[15]  3.333333  3.333333  3.333333  8.333333  1.666667  5.000000  1.666667
[22]  5.000000  1.666667  1.666667  1.666667  5.000000  1.666667  1.666667
[29]  3.333333  1.666667  1.666667  1.666667  1.666667  1.666667  1.666667
[36]  1.666667  1.666667  1.666667  1.666667  1.666667  1.666667

$bg
[1] "black"

$vertex.label.family
[1] "serif"

$edge.label.color
[1] "blue"

$edge.label.cex
[1] 1

$edge.curved
[1] FALSE

attr(,"class")
[1] "netbiov"
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>