library(tidyverse)

Outline

ORA | Over-representation analysis

ORA Workflow

plotdat <- data.frame(
  x = c(0, 2, 2, 4, 6)*1.5,
  y = c(0, 2, -2, 0, -0),
  lb = c("Protein Intensity \n Matrix", "(Clustering)", "Threshold", "Differentially \nregulated Set", "ORA")
)

ggplot(plotdat) +
  theme_void() +
  xlim(-1, 10) +
  ylim(-3, 3) +
  geom_segment(aes(x = c(0, 0, 2, 2, 4)*1.5, y = c(0, 0, 2, -2, 0), xend = c(2, 2, 4, 4, 6)*1.5, yend = c(2, -2, 0, 0, 0)), colour = "grey", alpha = 0.3) +
  geom_label(aes(x = x, y = y, label = lb), size = 5, fill = "lightgrey")

ORA vs GSEA

set.seed(666)
dat <- data.frame(
  ID = paste0("P", floor(runif(20, 1000, 9999))),
  Score = runif(20, -3, 3)
) %>% 
  mutate(` ` = "", `  ` = case_when(
    Score > 1 ~ "Differential",
    Score < 1 ~ "Non-differential"
  )) %>% 
  distinct(ID, .keep_all = TRUE) %>% 
  arrange(desc(Score))

dat  %>% 
  knitr::kable(digits = 2, format = "html") %>% 
  kableExtra::kable_styling(bootstrap_options = "striped", full_width = TRUE, position = "float_right", font_size = 16) %>% 
  kableExtra::row_spec(which(dat$Score > 1), color = "red") %>% 
  kableExtra::collapse_rows(columns = 3:4, valign = "middle") %>% 
  kableExtra::add_footnote(label = "\n Background consists of full list.", notation = "none")

ORA

GSEA

Fisher's Exact Test

For a given pathway we have

tab <- matrix(c(12, 3, 7, 24), nrow = 2, byrow = TRUE)
dimnames(tab) <- list("GO Term" = c("Contained", "Not Contained"),
                      "Differentially expressed" = c("    Yes    ", "    No    "))

cat("Pathway GO:0003091")
tab
cat("p-value:", round(fisher.test(tab)$p.value, 5))

Disadvantages of ORA

sigORA | Signature over-representation analysis

Gene Pair Signatures

knitr::include_graphics("Figures/Table1_n.png")

Properties of sigORA

GSEA | Gene Set Enrichment Analysis

GSEA WebGestaltR

knitr::include_graphics("Figures/jobsummary.png")

GSEA WebGestaltR

Enrichment plots for all pathways

knitr::include_graphics("Figures/GO:0000077.png")

GSEA WebGestaltR

GO slim summary

knitr::include_graphics("Figures/goslim_summary_Cells..p75...cmvto.png")

GSEA WebGestaltR

Barchart with enriched pathways

knitr::include_graphics("Figures/wg_bar.svg")

Disadvantages of WebGestaltR

fgczgseaora | Package

Implemented functionalities

So why write wrappers and additional functionalities around the existing packages? * `sigORA`: Hard to set up GPS repository ID mapping missing (UniProt $\rightarrow$ ENTREZ) Check ID mapping efficiency * `WebGestaltR`: More convenient reporting

fgczgseaora | Report structure

Folder hierarchy

Folder -- Contrast

ORA, sigORA & GSEA

Example report

References



protViz/prora documentation built on Dec. 12, 2021, 12:32 a.m.