Learn R Programming

pathfindR (version 1.3.0)

plot_scores: Plot the Heatmap of Pathway Scores

Description

Plot the Heatmap of Pathway Scores

Usage

plot_scores(score_matrix, cases = NULL, label_cases = TRUE,
  case_control_titles = c("Case", "Control"), low = "green",
  high = "red")

Arguments

score_matrix

Matrix of pathway scores per sample. Columns are samples, rows are pathways.

cases

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

label_cases

Boolean value to indicate whether or not to label the cases in the heatmap plot

case_control_titles

A vector of length two for naming of the 'Case' and 'Control' groups (in order) (default = c('Case', 'Control'))

low

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

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 pathways. "Pathway Score" indicates the pathway score of a sample. If `cases` are provided, the plot is divided into 2 facets, named by the `case_control_titles`.

Examples

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

Run the code above in your browser using DataLab