Plot the Heatmap of Score Matrix of Enriched Terms per Sample

plot_scores(
  score_matrix,
  cases = NULL,
  label_samples = TRUE,
  case_title = "Case",
  control_title = "Control",
  low = "green",
  mid = "black",
  high = "red"
)

Arguments

score_matrix

Matrix of agglomerated enriched term scores per sample. Columns are samples, rows are enriched terms

cases

(Optional) A vector of sample names that are cases in the case/control experiment. (default = NULL)

label_samples

Boolean value to indicate whether or not to label the samples in the heatmap plot (default = TRUE)

case_title

Naming of the 'Case' group (as in cases) (default = "Case")

control_title

Naming of the 'Control' group (default = "Control")

low

a string indicating the color of 'low' values in the coloring gradient (default = 'green')

mid

a string indicating the color of 'mid' values in the coloring gradient (default = 'black')

high

a string indicating the color of 'high' values in the coloring gradient (default = 'red')

Value

A `ggplot2` object containing the heatmap plot. x-axis indicates the samples. y-axis indicates the enriched terms. "Score" indicates the score of the term in a given sample. If cases are provided, the plot is divided into 2 facets, named by case_title and control_title.

Examples

score_mat <- score_terms(RA_output, RA_exp_mat, plot_hmap = FALSE)
hmap <- plot_scores(score_mat)