treatmap | R Documentation |
Function to plot a heatmap aligned with a phylogenetic tree.
treatmap(phylo, mat, mask = NULL, mask.color = "lightgrey",
overlay = NULL, borders.col = NULL, borders.lwd = NULL,
borders.lty = NULL, aspect.ratio = 1/exp(1), tip.labels = NULL,
tip.colors = NULL, z.cols = NULL, z.res = NULL, z.sym = FALSE,
tip.label.width = NULL, scalebar = TRUE, mat.labels = NULL,
mat.label.height = NULL, mat.label.colors = "black",
mat.col.order = NULL, mat.hclust = FALSE, mat.phylo = NULL, ...)
phylo |
An object of class "phylo". |
mat |
A matrix of data for the heatmap with as many columns as tips in the phylogenetic tree. |
mask |
An optional matrix of logicals equal in dimension to "mat" indicating whether some cells should not have their values plotted in the heatmap. |
mask.color |
A color for the masked cells. |
overlay |
An optional matrix of character strings to display on the cells of the heatmap, for instance significance labels. |
borders.lwd |
An optional matrix of line widths for the borders of each cell |
borders.lty |
An optional matrix of line types for the borders of each cell |
aspect.ratio |
The aspect ratio width/height in which to plot the phylogenetic tree. |
tip.labels |
A vector of character strings for tip labels, defaulting to those of the "phylo" object if not provided. |
tip.colors |
A single color or vector of colors for the tip labels. |
z.cols |
A vector of colors for the z-axis of the heatmap, see details for the default. |
z.res |
A resolution for the color vector of the z-axis if automatically calculated. |
z.sym |
A logical indicating whether the z-axis should be forced to be symmetrical. |
tip.label.width |
A numeric indicating how much space to put between the heatmap and tree for plotting the labels, defaulting to 20% of the plotted tree width. |
scalebar |
A logical indicating whether or not to include a scalebar in the plot. |
mat.labels |
A vector of strings to label the columns of the heatmap; defaults to the column names of "mat". |
mat.label.height |
A numeric indicating how much space to leave above the heatmap for column labels. |
mat.label.colors |
A single color or vector of colors for the column labels of the heatmap. |
mat.col.order |
A numeric vector indicating the order in which to plot the columns of the heatmap; ignored if mat.phylo is provided. |
mat.hclust |
A logical indicating whether or not to hierarchically cluster the columns of the heatmap; ignored if mat.col.order or mat.phylo is provided. |
mat.phylo |
An object of class "phylo" which is used to order the columns of the heatmap. |
The default color vector for the z-axis is generated automatically if not provided. Firstly it is determined whether "mat" contains both positive and negative values. If it is one-sided then a vector of 32 colors is made with "colorRampPalette", between white and blue. If it is two-sided, a vector of 31 colors is made between blue, white and red. The argument "z.res" can be used to fix the number of colors in the vector, though it will still generate an odd number if the heatmap is two-sided. Providing "z.cols" will ignore all these determinations and split the color vector evenly between the heatmap's minimum and maximum. Setting z.sym to TRUE will make the scale symmetrical about zero, if two-sided. If mat.hclust is set, it will cluster using method 'single'.
None
Chris Field <fieldc@ethz.ch>
None
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.