Description Usage Arguments Value Author(s) See Also Examples
This function draws a heat map ordered according to hierarchical clusterings, similarly to heatmap. It offers more control on layout and allows multiple row annotations.
hclust.ward is derivated from 'stats' package hclust, with an alternative default (as arguments can not be passed to it).
dist.COR mimics 'stats' package dist, computing distances as 1 - Pearson's correlation coefficient.
1 2 3 4 5 6 7 8 9 10 | clusterize(expr, side = NULL, cex.col = NA, cex.row = NA, mai.left = NA,
mai.bottom = NA, mai.right = 0.1, mai.top = 0.1, side.height = 1, side.col = NULL,
side.srt = 0, side.cex = 1, col.heatmap = heat(), zlim = "0 centered",
zlim.trim = 0.02, norm = c("rows", "columns", "none"), norm.clust = TRUE,
norm.robust = FALSE, customLayout = FALSE, getLayout = FALSE, plot = TRUE,
widths = c(1, 4), heights = c(1, 4), order.genes = NULL, order.samples = NULL,
fun.dist = dist.COR, fun.hclust = hclust.ward, clust.genes = NULL,
clust.samples = NULL)
dist.COR(input)
hclust.ward(input)
|
expr |
A numeric matrix, holding features (genes) in columns and observations (samples) in rows. Rows and columns will be ordered according to hierarchical clustering results. |
side |
To be passed to |
cex.col |
To be passed to |
cex.row |
To be passed to |
mai.left |
To be passed to |
mai.bottom |
To be passed to |
mai.right |
To be passed to |
mai.top |
To be passed to |
side.height |
To be passed to |
side.col |
To be passed to |
side.srt |
To be passed to |
side.cex |
To be passed to |
col.heatmap |
To be passed to |
zlim |
To be passed to |
zlim.trim |
To be passed to |
norm |
To be passed to |
norm.clust |
Single logical value, whether to apply normalization before clustering or after. Normalization applied depends on |
norm.robust |
To be passed to |
customLayout |
Single logical value, as |
getLayout |
Single logical value, whether to only return the |
plot |
To be passed to |
widths |
To be passed to |
heights |
To be passed to |
order.genes |
A function taking the gene dendrogram and |
order.samples |
A function taking the sample dendrogram and |
fun.dist |
A function to be used for distance computation in clustering. Default value uses 1 - Pearson's correlation as distance. See |
fun.hclust |
A function to be used for agglomeration in clustering. See |
clust.genes |
If not |
clust.samples |
If not |
input |
See |
clusterize invisibly returns the same list as heat.map, plus :
genes |
The gene dendrogram. |
samples |
The sample dendrogram. |
See hclust and dist respectively for the other functions.
Sylvain Mareschal
heat.map, heatmap, hclust, dist
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Data with features in columns
data(rosenwald)
group <- rosenwald.cli$group
expr <- t(rosenwald.expr)[,1:100]
# NA imputation (feature's mean to minimize impact)
f <- function(x) { x[ is.na(x) ] <- round(mean(x, na.rm=TRUE), 3); x }
expr <- apply(expr, 2, f)
# Simple heat map
clusterize(expr)
# With annotation (row named data.frame)
side <- data.frame(group, row.names=rownames(expr))
clusterize(expr, side=side)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.