add_col_groups: add_col_groups

Description Usage Arguments Value Author(s) See Also Examples

Description

Adds annotation to heatmap indicating what group every column of main heatmap belongs to

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## S4 method for signature 'Iheatmap'
add_col_groups(
  p,
  groups,
  name = "Column<br>Groups",
  title = "Groups",
  colors = pick_discrete_colors(groups, p),
  colorbar_position = get_colorbar_position(p),
  show_colorbar = TRUE,
  show_title = TRUE,
  side = c("top", "bottom"),
  layout = list(),
  size = 0.05,
  buffer = 0.015,
  tooltip = setup_tooltip_options(),
  xname = current_xaxis(p),
  yname = NULL,
  pname = name
)

Arguments

p

Iheatmap-class object

groups

vector of group names

name

name of colorbar

title

name of x axis label

colors

palette name or vector of colors

colorbar_position

colorbar placement

show_colorbar

show the colorbar?

show_title

show title as axis label

side

side of plot on which to groups annotation

layout

list of layout parameters for x axis

size

relative size of dendrogram (relative to the main heatmap)

buffer

amount of space to leave empty before this plot, relative to size of first heatmap

tooltip

tooltip options, see setup_tooltip_options

xname

internal name of xaxis

yname

internal name of yaxis

pname

internal name of plot

Value

Iheatmap-class object, which can be printed to generate an interactive graphic

Author(s)

Alicia Schep

See Also

iheatmap, add_row_groups

Examples

1
2
3
4
5
6
mat <- matrix(rnorm(20), ncol = 5, nrow = 4)
col_groups <- c("A","A","B","D","B")
hm <- iheatmap(mat) %>% add_col_groups(col_groups, name = "My Groups")

# Print heatmap if interactive session 
if (interactive()) hm 

iheatmapr documentation built on July 8, 2020, 7:18 p.m.