ConductGSEA.Rd
Conduct Gene Set Enrichment Analysis (GSEA).
ConductGSEA( deres, gmt.file, gene.sets = NULL, out.folder = NULL, gene.key = NULL, gene.type = c("ENSEMBL", "ENTREZID", "SYMBOL"), org.db = "org.Mm.eg.db", minGSSize = 10, maxGSSize = 500, pvalue = 0.05, padj.method = c("BH", "holm", "hochberg", "hommel", "bonferroni", "BY", "fdr", "none"), save = TRUE, ... )
deres | Data frame contains all genes. |
---|---|
gmt.file | Gene Matrix Transposed file format. |
gene.sets | Gene sets information, containing two columns: gs_name, entrez_gene. Default: NULL. |
out.folder | Folder to save enrichment results. Default: wording directory. |
gene.key | Column name in |
gene.type | Gene name type. Chosen from ENSEMBL, ENTREZID,SYMBOL. Default: ENSEMBL. |
org.db | Organism database. Default: org.Mm.eg.db. |
minGSSize | Minimal size of each geneSet for analyzing. Default: 10. |
maxGSSize | Maximal size of genes annotated for testing. Default: 500. |
pvalue | Cutoff value of pvalue. Default: 0.05. |
padj.method | One of "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none". Default: BH. |
save | Logical value, whether to save results. Default: TRUE. |
... | Parameters for |
NULL or list contains all results (GSEA
is FALSE)
library(airway) library(msigdbr) library(DESeq2) library(DEbPeak) # load the data data(airway) dds <- DESeq2::DESeqDataSet(airway, design = ~ cell + dex) dds <- DESeq2::DESeq(dds)#>#>#>#>#>#>dds.results <- results(dds, contrast = c("dex", "trt", "untrt")) dds.results.ordered <- dds.results[order(dds.results$log2FoldChange, decreasing = TRUE), ] h_t2g <- msigdbr(species = "Homo sapiens", category = "C5") %>% dplyr::select(gs_name, entrez_gene) gsea.results <- ConductGSEA(deres = dds.results.ordered, gmt.file = NULL, gene.sets = h_t2g, org.db = "org.Hs.eg.db", pvalue = 0.05, save = FALSE)#>#>#>#> Warning: 46.3% of input gene IDs are fail to map...#>#>#>#> Warning: There are ties in the preranked stats (16.64% of the list). #> The order of those tied genes will be arbitrary, which may produce unexpected results.#>#>