getEnrichmentTable: Extract table of enrichment results from 'K2' object

View source: R/getEnrichmentTable.R

getEnrichmentTableR Documentation

Extract table of enrichment results from 'K2' object

Description

Create table hyper- and single-sample enrichment results from 'K2' object.

Usage

getEnrichmentTable(K2res)

Arguments

K2res

An object of class K2 or K2results().

Value

A data.frame object with the following columns:

  • category: The user-specified gene set names

  • node: The identifier of the partition

  • edge: Indication of which subgroup the gene was assigned at a given partition

  • direction: The direction of coefficient for the assigned gene set

  • pval_hyper: The p-value of the hyperenrichment test comparing the subgroup-assigned gene set to the user-specified gene set

  • fdr_hyper: The multiple hypothesis corrected FDR (Benjamini-Hochberg) p-value of hyperenrichment, adjusted across all partitions

  • nhits: The intersection of subgroup-assigned genes and the user-specified gene set

  • ndrawn: The number of subgroup-assigned genes

  • ncats: The number of genes in the user-specified gene set

  • ntot: The background population of possible genes

  • pval_limma: The p-value estimated by the 'limma' R package

  • fdr_limma: The multiple hypothesis corrected FDR (Benjamini-Hochberg) p-value of differential analysis, adjusted across all partitions

  • coef: The difference between the means of each subgroup at a given partition

  • mean: The mean across all observations at the given partition

  • t: The test statistic estimated by the 'limma' R package

  • B: The B-statistic estimated by the 'limma' R package

References

\insertRef

reed_2020K2Taxonomer \insertReflimmaK2Taxonomer \insertRefbhK2Taxonomer \insertRefgsvaK2Taxonomer

Examples

## Read in ExpressionSet object
library(Biobase)
data(sample.ExpressionSet)

## Pre-process and create K2 object
K2res <- K2preproc(sample.ExpressionSet)

## Run K2 Taxonomer algorithm
K2res <- K2tax(K2res,
            stabThresh=0.5)

## Run differential analysis on each partition
K2res <- runDGEmods(K2res)

## Create dummy set of gene sets
DGEtable <- getDGETable(K2res)
genes <- unique(DGEtable$gene)
genesetsMadeUp <- list(
    GS1=genes[1:50],
    GS2=genes[51:100],
    GS3=genes[101:150])

## Run gene set hyperenrichment
K2res <- runGSEmods(K2res,
                genesets=genesetsMadeUp,
                qthresh=0.1)

## Run GSVA on genesets
K2res <- runGSVAmods(K2res,
                    ssGSEAalg='gsva',
                    ssGSEAcores=1,
                    verbose=FALSE)

## Run differential analysis on GSVA results
K2res <- runDSSEmods(K2res)

head(getEnrichmentTable(K2res))


montilab/K2Taxonomer documentation built on Jan. 25, 2024, 4:29 p.m.