R/getEnrichmentTable.R
getEnrichmentTable.Rd
Create table hyper- and single-sample enrichment results from 'K2' object.
getEnrichmentTable(K2res)
K2res | An object of class K2 or K2results(). |
---|
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
Reed ER, Monti S (2020). “Multi-resolution characterization of molecular taxonomies in bulk and single-cell transcriptomics data.” Bioinformatics. doi: 10.1101/2020.11.05.370197 , http://biorxiv.org/lookup/doi/10.1101/2020.11.05.370197. Ritchie ME, Phipson B, Wu D, Hu Y, Law CW, Shi W, Smyth GK (2015). “limma powers differential expression analyses for RNA-sequencing and microarray studies.” Nucleic Acids Research, 43(7), e47--e47. ISSN 1362-4962, 0305-1048, doi: 10.1093/nar/gkv007 , http://academic.oup.com/nar/article/43/7/e47/2414268/limma-powers-differential-expression-analyses-for. Benjamini Y, Hochberg Y (1995). “Controlling the False Discovery Rate: A Practical and Powerful Approach to Multiple Testing.” Journal of the Royal Statistical Society: Series B (Methodological), 57(1), 289--300. ISSN 00359246, doi: 10.1111/j.2517-6161.1995.tb02031.x , http://doi.wiley.com/10.1111/j.2517-6161.1995.tb02031.x. Hanzelmann S, Castelo R, Guinney J (2013). “GSVA: gene set variation analysis for microarray and RNA-Seq data.” BMC Bioinformatics, 14(1), 7. ISSN 1471-2105, doi: 10.1186/1471-2105-14-7 , http://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-14-7.
## 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))#> category node edge direction pval_hyper fdr_hyper nhits ndrawn ncats #> 1 GS1 E 2 up 8.289318e-40 2.984154e-38 17 26 50 #> 2 GS1 A 2 up 1.388507e-36 2.499313e-35 15 20 50 #> 3 GS2 A 1 up 2.616509e-28 3.139810e-27 12 18 50 #> 4 GS2 E 2 up 5.386442e-18 4.847798e-17 9 26 50 #> 5 GS2 C 2 up 8.187727e-14 5.895164e-13 6 11 50 #> 6 GS1 A 1 up 3.246781e-12 1.948068e-11 6 18 50 #> ntot pval_limma fdr_limma coef mean t B #> 1 20000 0.0167604129 0.2011249549 0.4158121 0.0981111115 2.550020 -2.855639 #> 2 20000 0.0000102174 0.0002452175 0.3421021 0.0009537613 4.969924 3.240044 #> 3 20000 0.1016447486 0.3484962808 0.1183511 0.0112973465 1.671177 -5.225981 #> 4 20000 0.0255329069 0.2042632552 0.3854695 -0.0930926814 2.363940 -3.274470 #> 5 20000 0.0493914221 0.2370788260 0.2036941 -0.0387742566 2.028366 -3.769405 #> 6 20000 NA NA NA NA NA NA #> hits #> 1 31397_at,31589_at,AFFX-YEL021w/URA3_at,AFFX-BioC-3_st,31564_at,31425_g_at,AFFX-MurIL2_at,31502_at,31507_at,31726_at,31556_at,31574_i_at,31466_at,31571_at,31554_at,AFFX-PheX-M_at,31379_at #> 2 31583_at,31546_at,31573_at,31511_at,31568_at,31527_at,31545_at,31708_at,31330_at,31492_at,31509_at,31385_at,31538_at,31697_s_at,31722_at #> 3 AFFX-TrpnX-5_at,31694_at,31471_at,31618_at,AFFX-MurIL4_at,31537_at,31345_at,31465_g_at,31335_at,31428_at,31566_at,31419_r_at #> 4 AFFX-HUMGAPDH/M33197_3_at,31417_at,31404_at,31586_f_at,31478_at,31364_i_at,AFFX-CreX-5_at,31406_at,31569_at #> 5 31579_at,31441_at,AFFX-YEL024w/RIP1_at,AFFX-BioB-5_at,AFFX-HUMGAPDH/M33197_3_st,31560_at #> 6 31396_r_at,31649_at,31580_at,31535_i_at,31461_at,31529_at