Skip to contents

If subtitle is not specified, Kolmogorov-Smirnov enrichment p-value is calculated to check if the genes in the pathway separate from the genes not in the chosen pathway based on ranking by the desired rankcol.

Usage

plot_GSEA_pathway(
  sig,
  geneset,
  genecol = "gene",
  rankcol,
  rankcol_name = rankcol,
  hightolow = FALSE,
  label = length(geneset) < 20,
  legendpos = "none",
  hl_color = "firebrick3",
  lab_high = NULL,
  lab_low = NULL,
  hllab = "Highlight",
  title = NULL,
  subtitle = NULL,
  savename = NULL
)

Arguments

sig

df/string; (path to) dataframe with genecol + rankcol columns

geneset

vector; list of genes

genecol

string; colname of gene names in sig

rankcol

string; colname of values in sig

rankcol_name

string; descriptive name of values

hightolow

logical; T for high values on left, low on right

label

logical; T to label highlighted genes

legendpos

vector; value btwn 0-1 as legend coordinates (ggplot2 legend.position)

hl_color

string; color for highlight

lab_high

string; description of high values

lab_low

string; description of low values

hllab

string; description of highlighted values

title

string; plot title

subtitle

string; plot subtitle; !! overwrites p-val_enrichment

savename

string; filepath to save png under

Value

grid of gene set enrichment waterfall above enrichment plot

Examples

airway_deseq = Rubrary::airway_deseq_res
genes = Rubrary::GSEA_pathways$GOBP_REGULATION_OF_GLUCOSE_IMPORT
Rubrary::plot_GSEA_pathway(
  sig = airway_deseq,
  geneset = genes,
  genecol = "hgnc_symbol",
  rankcol = "sign_log_p",
  rankcol_name = "Sign log p value",
  lab_high = "\U2191 in treated\n\U2193 in untreated",
  lab_low = "\U2191 in untreated\n\U2193 in treated",
  hllab = "Highlight genes",
  title = "Airway Treated vs. Untreated DESeq - Glucose Import Regulation Genes"
)