add_col_groups: add_col_groups

add_col_groupsR Documentation

add_col_groups

Description

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

Usage

## 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


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 May 29, 2024, 8:55 a.m.