Description Usage Arguments See Also Examples
Creates a morpheus.js-based heat map widget.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | morpheus(x,
labRow = rownames(x),
labCol = colnames(x),
# dendrogram control
Rowv = TRUE,
Colv = if (symm) "Rowv" else TRUE,
distfun = dist, hclustfun = hclust,
dendrogram = c("both", "row", "column", "none"),
reorderfun = function(d, w) reorder(d, w),
symm = FALSE,
# plot
na.rm = TRUE,
rowAnnotations = NULL,
columnAnnotations = NULL,
colorScheme = NULL,
rowSize = 13,
columnSize = 13,
drawGrid = TRUE,
gridColor = "#808080",
gridThickness = 0.1,
drawValues = FALSE,
width = NULL,
height = NULL,
...)
|
x |
numeric matrix of the values to be plotted. |
labRow |
character vector with row labels to use (optional, defaults to
|
labCol |
character vector with column labels to use (optional, defaults
to |
Rowv |
determines if and how the row dendrogram should be
reordered. By default, it is TRUE, which implies dendrogram is computed and
reordered based on row means. If NULL or FALSE, then no dendrogram is
computed and no reordering is done. If a |
Colv |
determines if and how the column dendrogram should be
reordered. Has the options as the |
distfun |
function used to compute the distance (dissimilarity) between
both rows and columns. Defaults to |
hclustfun |
function used to compute the hierarchical clustering when
|
dendrogram |
character string indicating whether to draw "none", "row", "column" or "both" dendrograms. Defaults to "both". However, if Rowv (or Colv) is FALSE or NULL and dendrogram is "both", then a warning is issued and Rowv (or Colv) arguments are honoured. |
reorderfun |
|
symm |
logical indicating if |
na.rm |
logical indicating whether |
rowAnnotations |
Data frame of additional row annotations in same order as x (optional) |
columnAnnotations |
Data frame of additional column annotations in same order as x (optional) |
colorScheme |
List of scalingMode ("fixed" or "relative"), stepped (Whether color scheme is continuous (FALSE) or discrete (TRUE)), values (list of numbers corresponding to colors), colors (list of colors) |
rowSize |
Heat map column size in pixels or "fit" to fit heat map to current height (optional, defaults to 13) |
columnSize |
Heat map column size in pixels or "fit" to fit heat map to current width (optional, defaults to 13) |
drawGrid |
Whether to draw heat map grid (optional, defaults to
|
gridColor |
Heat map grid color (optional, defaults to "#808080") |
gridThickness |
Heat map grid thickness (optional, defaults to 0.1) |
drawValues |
Whether to draw values in the heat map (optional, defaults
to |
width |
Heat map width (optional, defaults to available width) |
height |
Heat map height (optional, defaults to available height) |
... |
Additional morpheus options as documented at https://software.broadinstitute.org/morpheus/configuration.html |
heatmap, heatmap.2
1 2 3 4 5 6 7 8 9 | library(morpheus)
x <- t(mtcars)
columnAnnotations <- data.frame(annotation1=1:32, annotation2=sample(LETTERS[1:3], ncol(x),
replace = TRUE))
morpheus(x,
colorScheme=list(scalingMode="relative", colors=heat.colors(3)),
columnAnnotations=columnAnnotations,
columns=list(list(field='id', display=list('text')), list(field='annotation2',
highlightMatchingValues=TRUE, display=list('color'))))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.