Description Usage Arguments Value Examples
Performs GSEA for all Hotgenes contrasts
1 2 3 4 5 6 7 8 9 10 |
m_df |
GeneSet generated using msigdbr function |
HotgenesObj |
R object generated by DEseq2_export function |
nTop |
number of pathways to return |
cut_padj |
Adjusted pvalue cut off. Default is 0.1. |
minSize |
Minimal size of a gene set to test. All pathways below the threshold are excluded. |
maxSize |
Maximal size of a gene set to test. All pathways above the threshold are excluded. |
nperm |
Number of permutations to do. Minimial possible nominal p-value is about 1/nperm |
nproc |
If not equal to zero sets BPPARAM to use nproc workers (default = 0). |
HotgenesObj appended with GSEA for each contrast
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | Example_Hotgenes_dir<-system.file("extdata",
"Example_Hotgenes.Rdata",
package = "Hotgenes", mustWork = TRUE)
load(Example_Hotgenes_dir)
library(msigdbr)
# GO annotations
m_df = msigdbr(species = "Homo sapiens", category = "C5", subcategory = "BP")
# Reactome annotations
# m_df = msigdbr(species = "Homo sapiens", category = "C2",
# subcategory = "CP:REACTOME")
qbat<-BatchGSEA(HotgenesObj=Example_Hotgenes,
m_df= m_df)
# View enriched pathways
lapply(qbat$OuputGSEA, function(x) head(x$fgRes$pathway))
# plot of enriched pathways
qbat$OuputGSEA$shEWS$g
# Prep for GSEA plot
m_list = qbat$m_list
# top pathways
qbat$OuputGSEA$shEWS$top$pathway
pyid<-qbat$OuputGSEA$shEWS$top$pathway[[2]]
pyid
Gene_Ranks <- qbat$OuputGSEA$shEWS$Gene_Ranks
fgsea::plotEnrichment(m_list[[pyid]], Gene_Ranks,
gseaParam = 1, ticksSize = 0.2) +
ggplot2::labs(title=stringr::str_wrap(pyid, 20))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.