heatmap_rjs {RJSplot}R Documentation

Produce an interactive heatmap.

Description

heatmap_rjs creates interactive heatmaps.

Usage

heatmap_rjs(data, metadata = NULL, scale = c("row", "column", "none"),
  cluster = TRUE, color = c("Reds", "Greens", "Blues", "RdBkGr", "RdWhBu"),
  na.color = "transparent", cex = 1, plot = TRUE, jupyter = FALSE, 
  dir = tempdir(), distfun = dist, hclustfun = hclust)

Arguments

data

numeric matrix of the values to be plotted.

metadata

a data frame with metadata information for column features (p.e. sample phenotypes). Samples are given in rows and features in columns.

scale

character indicating if the values should be centered and scaled in either the row direction or the column direction, or none. The default value is "none".

cluster

logical value to enable (TRUE) or disable (FALSE) data clustering.

color

character indicating the color scale to paint values. The default value is "Blues".

na.color

character indicating the color to use for missing values. Transparent by default.

cex

number indicating the amount by which plotting text and symbols should be scaled relative to the default.

plot

open resulting graph in your browser.

jupyter

embed the graph as an iframe into a Jupyter Notebook.

dir

a "character" string representing the directory where the graph will be saved.

distfun

function used to compute the distance between rows and columns.

hclustfun

function used to compute the hierarchical clustering.

Value

The function creates a folder in your computer with an HTML document named index.html which contains the graph. This file can be directly opened with your browser.

Author(s)

David Barrios and Carlos Prieto. Bioinformatics Service of Nucleus, University of Salamanca. See https://bioinfo.usal.es/

See Also

The ‘RJSplot’ Website: https://rjsplot.usal.es

dendrogram_rjs, densityplot_rjs, genomemap_rjs, heatmap_rjs, manhattan_rjs, network_rjs, scatterplot_rjs, symheatmap_rjs, wordcloud_rjs, boxplot_rjs, bubbles_rjs, hiveplot_rjs, piechart_rjs, barplot_rjs, tables_rjs, surface3d_rjs, scatter3d_rjs.

Examples

## Create an interactive heatmap in a temporal directory of your local machine
## Live examples on https://rjsplot.usal.es
if(interactive()){
metadata <- data.frame(phenotype1 = sample(c("yes","no"),ncol(mtcars),TRUE),
                       phenotype2 = sample(1:5,ncol(mtcars),TRUE))

heatmap_rjs(data.matrix(mtcars), metadata, scale="column")
}

[Package RJSplot version 2.7 Index]