seekGSEplot: GSEA plot

Description Usage Arguments Value Examples

View source: R/GSEA.R

Description

Imports: ggplot2, fgsea, AnnotationDbi, GO.db, org.Hs.eg.db, org.Mm.eg.db

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
seekGSEplot(
  rankedList,
  setID,
  setList = "BP",
  Species = NA,
  gseaTable = NA,
  annotations = c("up", "down"),
  plotTitle = NA,
  cutC = log2(1.5),
  gseaParam = 1,
  vlines = T,
  hlines = T,
  lineSize = 1.5,
  ticksSize = 0.2,
  textSize = 30,
  annoSize = 10,
  colors = c("red", "blue", "green"),
  yTitle = T,
  xTitle = T,
  xText = T,
  ggarrangeRows = 1
)

Arguments

rankedList

A vector sorted from high to low values of the ranking metric (e.g. log2 fold change), with names according to entrezids.

setID

string, either GO-ID (e.g. "GO:0006355") or name of a custom set included in the setList

setList

either string ("BP", "CC" or "MF") or a list of custom datasets, where each item in the list is a vector of strings (entrezids)

Species

a string, either "human" or "mouse". Is used to retreive the right Entrez IDs for the GO pathways. Unimportant if a custom setID is used.

gseaTable

data.frame, direct output from seekGSEA. Adds statistics to the plot.

annotations

vector of 2 strings, which will be written underneath the color ribbon

plotTitle

string, replaces the gene set name as the plot title

cutC

log2FC threshold, changes the vlines and the color ribbon

gseaParam

GSEA parameter determines ES-gain per hit (default: 1)

vlines

boolean, vertical lines indicate the log2FC threshold

hlines

boolean, horizontal lines indicate the ES scores

lineSize

width of main line through the plot

textSize

text size for plot title, axis titles and axis labels

annoSize

text size for annoations (below color ribbon) and statistics

colors

vector with 3 strings, naming the colors used for: upregulated ribbon, downregulated ribbon, main line

yTitle

boolean, should there be a title for the y axis?

xTitle

boolean, should there be a title for the x axis?

xText

boolean, should there be a x axis labels?

tickSize

width of ticks in the barcode (default: 0.2)

Value

ggplot object

Examples

1
2
3
4
myDE <- sqDE
rl <- seekGSErl(myDE[[1]])
mygsea <- seekGSEA(rl, Species="mouse", setList="BP")
seekGSEplot(rl, setID="GO:0006355", Species="mouse", gseaTable=mygsea)

Solatar/seeqR documentation built on Feb. 19, 2021, 8:07 p.m.