plot_heatmap: Plots a heatmap

Description Usage Arguments Details Examples

View source: R/plot_heatmap.R

Description

Makes either a single cell or bulk heatmap,

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
plot_heatmap(
  input,
  genes,
  type,
  facet_by = FALSE,
  scale_group = F,
  title = "Heatmap",
  scale_by = "row",
  cluster_by = "row",
  cluster_type = "hierarchical",
  k = NULL,
  show_k = F,
  ceiling = FALSE,
  color_pal = viridis::magma(256),
  color_facets = FALSE,
  group_names = TRUE,
  gene_names = TRUE,
  text_angle = 90,
  pdf_format = "tile",
  interactive = FALSE,
  text_sizes = c(20, 10, 5, 10, 5, 5),
  gene_labels = NULL,
  gene_labels_size = 2,
  gene_labels_nudge = -0.5,
  gene_labels_col = 1,
  gene_labels_force = 1,
  return_results = F
)

Arguments

input

the input ex_sc

genes

a vector of genes to go into the heatmap

type

can either be "bulk" or "single_cell. If type is "bulk" it will utilize the bulk info stored in fData

facet_by

will create breaks in the heatmap by some pData Variable

title

A heatmap title

scale_by

scale across "row" (genes), "col" (groups), or FALSE

cluster_by

either "row", col, or both

cluster_type

"kmeans" or "hierarchical"

k

if cluster type is kmeans must provide k

ceiling

A value above which to truncate

color_pal

The color pallete to be used

color_facets

if true will use colors instead of text labels for the facets

group_names

whether groups should be labelled

gene_names

whether genes should be labelled

text_angle

The desired angle for text on the group labels

pdf_format

can be "tile" or "raster." tile is generally higher quality while raster is more efficient

text_sizes

a vector of title_size, axis_title, axis_text, legend_title, legend_text, facet_text, faults too c(20,10,5,10,5,5)

plotly

if true will be interactive # note that this option cannot be saved with save_ggplot(), and also is time consuming for single cell heatmaps

Details

Utilize information stored in pData to control the plot display.

Examples

1
plot_tsne_metadata(ex_sc_example, color_by = "UMI_sum", title = "UMI_sum across clusters", facet_by = "Cluster", ncol = 3)

kgellatl/SignallingSingleCell documentation built on Dec. 29, 2021, 4:12 p.m.