PlotGraphWithModules: Plot a graph with nodes in modules indicated by colors

Description Usage Arguments Value Author(s) See Also Examples

View source: R/PlotGraphWithModules.R

Description

Visualization of a graph with nodes in modules inferred from the clustering dendrogram by PlotDendrogram.

Usage

1
2
3
PlotGraphWithModules(Adj_directed, PlotDendrogramObj, 
                     GV, node.size = 8, arrow.size = 5,
                     label.size = 3,alpha = 1,...)

Arguments

Adj_directed

Adjacency matrix of a graph.

PlotDendrogramObj

The graphical objects from PlotDendrogram.

GV

The number of genetic variants (SNPs/indels/CNVs/eQTL) in the input data matrix. For example, if the data has one SNPs/indels/CNV/eQTL in the first column, then GV = 1, if 2 SNPs/indels/CNVs/eQTL in the 1st and 2nd Column, then GV = 2, and so on. If no GV then GV = 0.

node.size

The size of the nodes in the graph. Defaults to 8.

arrow.size

The size of the arrows for directed network edges, in points. Defaults to 5.

label.size

The size of the node labels in points, as a numeric value, a vector of numeric values, or as a vertex attribute containing numeric values. Defaults to 3.

alpha

The level of transparency of the edges and nodes. Defaults to 1 (no transparency).

...

Other arguments passed to ggnet2.

Value

Author(s)

Md. Bahadur Badsha (mbbadshar@gmail.com)

See Also

PlotDendrogram

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Adjacency matrix from a graph in the example
Adj_directed <- as(data_examples$complex$cont$withGV$graph,
                   "matrix")

# A clustering dendrogram with nodes grouped in colored modules
PlotDendrogramObj <- PlotDendrogram(Adj_directed,
                                    minModuleSize = 5)
                  
# A graph object with nodes in modules
PlotGraphWithModulesObj <- PlotGraphWithModules(Adj_directed,
                                                PlotDendrogramObj,
                                                GV = 14,
                                                node.size = 8,
                                                arrow.size = 5,
                                                label.size = 3,
                                                alpha = 1) 

# Plot the graph with nodes in different colors
plot(PlotGraphWithModulesObj) 

MRPC documentation built on May 2, 2021, 9:06 a.m.