Learn R Programming

pathfindR (version 1.4.2)

plot_scores: Plot the Heatmap of Score Matrix of Enriched Terms per Sample

Description

Plot the Heatmap of Score Matrix of Enriched Terms per Sample

Usage

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 score coloring gradient (default = 'green')

mid

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

high

a string indicating the color of 'high' values in the score 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

Run this code
# NOT RUN {
score_mat <- score_terms(RA_output, RA_exp_mat, plot_hmap = FALSE)
hmap <- plot_scores(score_mat)
# }

Run the code above in your browser using DataLab