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,
  ...
)

Arguments

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 deres to conduct analysis. Default: NULL (use rownames of deres).

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 GSEA.

Value

NULL or list contains all results (GSEA is FALSE)

Examples

library(airway) library(msigdbr) library(DESeq2) library(DEbPeak) # load the data data(airway) dds <- DESeq2::DESeqDataSet(airway, design = ~ cell + dex) dds <- DESeq2::DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
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)
#> Differential expression analysis with DESeq2!
#> Convert ENSEMBL to ENTREZID!
#> 'select()' returned 1:many mapping between keys and columns
#> Warning: 46.3% of input gene IDs are fail to map...
#> conduct GSEA anaysis.
#> preparing geneSet collections...
#> GSEA analysis...
#> 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.
#> leading edge analysis...
#> done...