plot_scores {pathfindR} | R Documentation |
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 |
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_matrix <- score_terms(
example_pathfindR_output,
example_experiment_matrix,
plot_hmap = FALSE
)
hmap <- plot_scores(score_matrix)