heatmap_plot: Generate a isoform level heat map. Can only show a maximum of...

View source: R/plotting_functions.R

heatmap_plotR Documentation

Generate a isoform level heat map. Can only show a maximum of three genes at the same time.

Description

Generate a isoform level heat map. Can only show a maximum of three genes at the same time.

Usage

heatmap_plot(
  sleuth_obj,
  genes,
  q_max = 0.05,
  test = "wt",
  iqf = 0,
  sig_marker_values = c(0.05, 0.01, 0.001),
  sig_markers = c("*", "**", "***"),
  grouping_colours = list(),
  plot_title = "Sleuth Heatmap",
  boxplot = TRUE
)

Arguments

sleuth_obj

An existing Sleuth object as generated by sleuth_prep() and fit by sleuth_fit(). The transcript name column must be target_id and the gene name column must be 'ext_gene'. Also, the sleuth_obj must have been prepared in non-gene aggregation mode, but with target mapping enabled.

genes

A vector containing gene names whose transcripts should be plotted.

q_max

The maximum q-value that should be used as a cutoff to determine significant transcripts. If set to FALSE, an FDR cutoff will not be applied. Defaults to .05.

test

The sleuth test to be analyzed using sleuth_results, can be either "wt" or "lrt". Defaults to "wt".

iqf

A numeric value between 0 and 1 (inclusive) to denote the quantile of data to display. Defaults to 0, which displays all data.

sig_marker_values

A vector of values that should be used as a cutoff for significance labelling. Defaults to .05, .01, and .001.

sig_markers

Markers of signifigance. Defaults to \*, \*\*, \*\*\*.

grouping_colours

A list of groups and the associated level-colour pairs. See example for syntax. Defaults to empty list.

boxplot

A Boolean value that indicates whether a box plot of scaled transcripts should be displayed.

Examples

# Create a isoform heat map from a sleuth_object.
heatmap_plot(so, genes = c("Tp53", "Tnf", "Egfr", "Egr1"), q_max = .01, test = "lrt", grouping_colours = list(sex = c("F" = "thistle1", "M" = "turquoise1"), treatment = c("drug_A" = "indianred1", "drug_B" = "olivedrab1")), boxplot = FALSE)

nodrogluap/gumshoe documentation built on Feb. 28, 2023, 6:15 p.m.