knitr::opts_chunk$set(echo = FALSE, message = FALSE, warning = FALSE)

library(msigdbr)
library(readr)
library(fgsea)
library(tidyverse)
library(prora)

allpvalues <- eval(params$allpvalues)
minpvalue <- eval(params$minpvalue)
xmNES <- eval(params$xmNES)
xxNES <- eval(params$xxNES)
gsName <- eval(params$gsName)

Analysis for r gsName.

Filtering gene-sets for $p_{adj}$ < r threshold. In the Heat-map only gene-sets passing the threshold in any of the contrasts are shown.

(ref:histogramOFscore) Histogram of $p_{adj}$ for all Genesets and all comparisons.

hist(all$padj)
hist(minpadj$minpadj)
nr <- nrow(na.omit(xmNES))
nc <- ncol(na.omit(xmNES))
p <- pheatmap::pheatmap(na.omit(xmNES), silent = TRUE, cluster_rows = FALSE)

heatmapheight <- 4 + nr*0.2
heatmapwidth <- 10 + nc*0.2
print(p)
# Show values in DT table.
DT::datatable(xxNES, caption = "NES for all GS with a padj < threshold for one of the comparisons.")


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