createUnipartiteNet: Plot microRNA co-expression network.

Description Usage Arguments Value See Also Examples

View source: R/createUnipartiteNet.R

Description

createUnipartiteNet generates an undirected microRNA co-expression netwwork with vertices assigned different colors to observe the community structure.

Usage

1
2
3
4
5
6
7
createUnipartiteNet(
  adjm,
  filename = NULL,
  layout = layout_nicely,
  Vsize = 7,
  Vcolor
)

Arguments

adjm

The adjacency matrix.

filename

The name specified to the output igraph object and figure.

layout

The layout function to apply to a graph, refer to layout_ for more detail.

Vsize

Numeric, the size of the vertices.

Vcolor

A vector, with entries specifying colors of vertices.

Value

A 'rda' file with the igraph object, and a 'pdf' file with the plotted graph.

See Also

igraph for all available layouts.

Examples

1
2
3
4
5
6
7
8
9
# prepare an adjacency matrix
set.seed(3)
adj.m <- matrix(sample(c(0, 1), 25, replace = TRUE), nrow = 5, ncol = 5)

# prepare the color vector
color.v <- c('blue', 'blue', 'blue', 'red', 'blue')

# generate the network
createUnipartiteNet(adjm = adj.m, Vcolor = color.v, filename = 'example')

YC3/mirNet documentation built on Sept. 3, 2020, 3:25 a.m.