Description Usage Arguments Details Author(s) References See Also Examples
This function produces a heat map with hierarchical clustering of samples using multivariate size or shape data.
1 2 | heatmapAnnot(x, labcol, xlab = "", ylab = "", genus = "", rowlab = TRUE,
pt = 0, dist.method = "manhattan", clust.method = "ward.D")
|
x |
a matrix with rows representing species samples and columns representing morphometrical variables of interest |
labcol |
a character vector giving the color annotation for the species |
xlab |
title for x-axis |
ylab |
title for y-axis |
genus |
single character abbreviation for genus |
rowlab |
if FALSE, suppresses row labels on the heat map |
pt |
if the rows have been ranked, two lines are drawn - one at the |
dist.method |
a distance metric implemented in the |
clust.method |
a clustering algorithm implemented in the |
This function customizes the heatmap.2
function in the gplots
package (Version 2.17.0). Row standardization is switched on, and a color legend for species is given in the left panel.
Tsung Fei Khang tfkhang@um.edu.my
Khang TF, Soo OYM, Tan WB, Lim LHS. (2016). Monogenean anchor morphometry: systematic value, phylogenetic signal, and evolution. PeerJ 4:e1668.
Warnes GR, Bolker B, Bonebakker L, Gentleman R, Huber W, Liaw A, Lumley T,Maechler M, Magnusson M, Moeller S, Schwartz M, Venables B. (2015). gplots:Various R programming tools for plotting data. R package version 2.17.0. Available at: http://CRAN.R-project.org/package=gplots.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | library(gplots)
data(ligophorus_shape)
data(spcolmap)
dendrogram <- hclust(dist(ligophorus_shape))
#check dendrogram and note cut-off for the two main clades
plot(dendrogram)
clade_id <- cutree(dendrogram, h=0.5)
f_s <- numeric(ncol(ligophorus_shape))
for(i in 1:ncol(ligophorus_shape)){
dat <- stack(ligophorus_shape[,i])
#replace species label with clade label
dat[,2] <- clade_id
f_s[i] <- t.test(values~ind, data=dat)$statistic
}
rank_s <- order(f_s, decreasing=TRUE)
heatmapAnnot(ligophorus_shape[,rank_s],labcol=spcolmap$color,
xlab="Specimens", genus="L. ")
|
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE
3: .onUnload failed in unloadNamespace() for 'rgl', details:
call: fun(...)
error: object 'rgl_quit' not found
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.