library(tidyverse)
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")
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
Apply simple threshold (e.g. Score > 1)
$\rightarrow$ Differentially regulated set + background
Perform Fisher's Exact Test
GSEA
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))
Redundancy: No 1:1 relation between proteins and pathways
Multiplicity: p-value adjustment (i.e. via FDR)
knitr::include_graphics("Figures/Table1_n.png")
Compares weighted number of observed pairs of proteins (unique to a single pathway) in the differentially regulated subset to the number one would expect to show up in the specified background
Background GPS repository can change for each experiment
Fairly conservative in terms of hits
WebGestaltR
Introduced by @Subramanian15545
Using the WebGestaltR
package [@webgestpkg]
knitr::include_graphics("Figures/jobsummary.png")
Compares the enrichment of particular protein set members towards the upper and lower end of the provided ranked protein list
For instance ranked by p-value, FDR, fold change
WebGestaltR
Enrichment plots for all pathways
knitr::include_graphics("Figures/GO:0000077.png")
WebGestaltR
GO slim summary
knitr::include_graphics("Figures/goslim_summary_Cells..p75...cmvto.png")
WebGestaltR
Barchart with enriched pathways
knitr::include_graphics("Figures/wg_bar.svg")
WebGestaltR
R
codeR
codePermutation test involved $\rightarrow$ time consuming
$\rightarrow$ limited reproducibility since no control over RNG seed
fgczgseaora
| Packagesigora
ORA \& sigORA: runSIGORA()
WebGestaltR
ORA: runWebGestaltORA()
WebGestaltR
GSEA: runWebGestaltGSEA()
fgczgseaora
| Report structureFolder
-- Contrast
Folder
-- Method + Target
html
-- reportRmd
-- source fileWebGestaltR
-- reports from WebGestaltR
Example report
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.