htShiny.Rd
Interactive heatmaps as a Shiny app
htShiny(ht_list = get_last_ht(), title = NULL,
description = NULL, hline = TRUE, html = NULL,
# parameters passed to InteractiveComplexHeatmapOutput()
heatmap_id = NULL, title1 = "Original heatmap", title2 = "Selected sub-heatmap",
width1 = ifelse(layout == "1|(2-3)", 800, 450),
height1 = ifelse(layout == "1-(2|3)", 700, 350),
width2 = 400,
height2 = 350,
width3 = ifelse(layout == "(1-2)|3", 800, 400),
layout = ifelse("brush" %in% response, "(1-2)|3", "1-3"), compact = FALSE,
action = "click", cursor = TRUE, response = c(action, "brush"),
brush_opt = list(stroke = "#f00", opacity = 0.6),
output_ui_float = FALSE,
# specific for sub-heatmap
show_cell_fun = TRUE, show_layer_fun = TRUE,
save = NULL, app_options = list())
A Heatmap-class
or a HeatmapList-class
object. If it is not specified, the last generated heatmap is used. The heatmap object should better be already updated by draw()
function.
Title of the app.
Description of the app. The content will be wrapped by a p
tag and inserted before the interactive heatmap widget.
Whether to add the horizontal line (by hr
tag) after description
.
HTML fragment inserted below the heatmap. The value can be a string or be wrapped by HTML
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Pass to InteractiveComplexHeatmapOutput
.
Whether show graphics made by cell_fun
on the main heatmap?
Whether show graphics made by cell_fun
on the main heatmap?
The value can be set to a folder name so that the shiny app is saved into several files.
All pass to the options
argument in shinyApp
.
With any Heatmap
/HeatmapList
object, directly send to htShiny()
to create a Shiny app for the heatmap(s):
htShiny(ht_list)
If the heatmaps are already drawn, ht_list
can be omitted and the last heatmap object is retrieved automatically:
There are also many examples that can be get with htShinyExample
.
A Shiny app object.
# use last generated heatmap
if(interactive() && dev.interactive()) {
m = matrix(rnorm(100), 10)
Heatmap(m)
htShiny()
}
# by providing a heatmap/heatmap list
if(interactive()) {
m = matrix(rnorm(100), 10)
rownames(m) = 1:10
colnames(m) = 1:10
ht = Heatmap(m)
ht = draw(ht)
htShiny(ht)
}
# vertical heatmap list
if(interactive()) {
m1 = matrix(rnorm(100), 10)
rownames(m1) = 1:10
colnames(m1) = 1:10
ht1 = Heatmap(m1, row_km = 2, column_km = 2)
m2 = matrix(sample(letters[1:10], 100, replace = TRUE), 10)
ht2 = Heatmap(m2)
ht_list = draw(ht1 + ht2)
htShiny(ht_list)
ht_list = ht1 %v% ht2
htShiny(ht_list)
}
# compact mode
if(interactive()) {
m = matrix(rnorm(100), 10)
Heatmap(m)
htShiny(compact = TRUE)
}