GSEA data
test_GSEA.Rd
Enrich biological functions on significant candidate via a over representation analysis.
Usage
test_GSEA(
x,
type = c("GO", "KEGG", "REACTOME", "MSigDB"),
species = "Human",
contrasts = NULL,
by_contrast = FALSE,
topn = NULL,
pAdjustMethod = "BH",
category = NULL,
subcategory = NULL,
...
)
Arguments
- x
A SummarizedExperiment/DEGdata output from add_adjections or a charachter vector containing candidate identifier(SYMBOL, EntrezID, UniprotID or ENSEMBL).
- type
Character, one of "GO","KEGG","REACTOME" and "MSigDB". The database for enrichment analysis.
- species
The species name.
- contrasts
Character, analyse results in which contrasts.
- by_contrast
Logical(1). If true, draw enrichment on each contrast, else draw on the total significant candidates.
- topn
Integer(1), only use topn list with most significant foldchange
- pAdjustMethod
Character, one of "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".
- category, subcategory
Character. Work when
type
is "MSigDB". Use which subset of MSigDB. You can runmsigdbr::msigdbr_collections()
to get options.- ...
Other parameters in
GSEA()
except the cutoff setting
Examples
if (FALSE) {
# Load example
data(Silicosis_pg)
data <- Silicosis_pg
data_unique <- make_unique(data, "Gene.names", "Protein.IDs", delim = ";")
# Differential test
ecols <- grep("LFQ.", colnames(data_unique))
se <- make_se_parse(data_unique, ecols,mode = "delim")
filt <- filter_se(se, thr = 0, fraction = 0.4, filter_formula = ~ Reverse != "+" & Potential.contaminant!="+")
norm <- normalize_vsn(filt)
imputed <- impute(norm, fun = "MinProb", q = 0.05)
diff <- test_diff(imputed, type = "control", control = c("PBS"), fdr.type = "Storey's qvalue")
# GSEA
check_organismDB_depends(organism = "Mouse") # check annotation package of Mouse
res_gsea <- test_GSEA(diff, contrasts = "W4_vs_PBS", species = "Mouse",type = "GO")
}