Takes in fullGSEA_edited.R output with name annotations to output a classic GSEA plot via ggplot2 graphics in R. Takes in a set of geneSets of interest (can be all of or a subset of genesets tested by runGSEA) to plot.

ggGSEA(geneSets, gs.scores,
  colours = rainbow(length(gs.scores$trimmed.geneSets[geneSets])),
  shift = NULL)



character vector of geneset names that should be considered


output directly from runGSEA function with returnRunningScores set to TRUE. Requires the following to be in gs.scores: trimmed.geneSets : list of genesets (named!) with char vector of gene_ids that match colnames of RunningScores only contains the genesets of interest that will be plotted on top of one another! RunningScores : matrix of geneset names (rows) by gene_ids (cols) that match trimmed.geneSets both above come from fullGSEA_edited.R run


a vector of colors of length(geneSets) corresponding to each set in geneSets. Default is rainbow colors.


use to manually set lower limit of enrichment score (upper) part of plot; useful for making several ggGSEA plots to be shown together


ggplot2 graphics of classic GSEA plot


## see gsea_script.R for how to run \code{fullGSEA_edited.R}
ggGSEA(geneSets[1:2], gs.scores, c("blue", "red")
Return the ggplot object