eclust (version 0.1.0)

plot.similarity: Function to generate heatmap

Description

Plots a heatmap of a similarity matrix such as a correlation matrix or a TOM matrix. This function is a plotting method for an object of class similarity. These objects are returned by the s_generate_data and s_generate_data_mars functions

Usage

"plot"(x, color = viridis::viridis(100), truemodule, active, ...)

Arguments

x
an object of class similarity. This is a p x p symmetric matix such as a correlation matrix or a TOM matrix, where p is the number of genes
color
colors for the heatmap. By default it uses the viridis color scheme. The viridis package needs to be installed.
truemodule
a numeric vector of length p where p is the number of genes, giving the module membership. By default, 0 = Grey, 1 = Turquoise, 2 = Blue, 3 = Red, 4 = Green, and 5 = Yellow. This information is used for annotating the heatmap
active
a binary vector of length p (where p is the number of genes) where 0 means that gene is not related to the response, and 1 means that the gene is associated to the response.
...
other arguments passed to the pheatmap function

Value

a heatmap of a similarity matrix

Examples

Run this code
## Not run: 
# corrX <- cor(simdata[,c(-1,-2)])
# class(corrX) <- append(class(corrX), "similarity")
# plot(corrX, truemodule = c(rep(1:5, each=150), rep(0, 250)))
# ## End(Not run)

Run the code above in your browser using DataLab