R/hyperEnrichment.R
hyperEnrichment.Rd
Carry out set enrichment test based on hyper-geometric distribution
hyperEnrichment( drawn, categories, ntotal = length(unique(unlist(categories))), min.drawsize = 4, mht = TRUE, verbose = TRUE )
drawn | One or more sets of 'drawn' items (e.g., genes). Basically, a list of signatures. |
---|---|
categories | list of gene sets (e.g., MSigDB c2) |
ntotal | background population, i.e., the total no. of items from which items are supposed to have been drawn |
min.drawsize | min no. of drawn items that must be among categories' items |
mht | correct for multiple hypothesis testing across multiple 'draws' |
a data.frame with rows indexed by the signature(s) tested
# load objects hyperSig (a list of signatures) and hyperGsets (a GeneSet object) # and run hyper-enrichment test data(hyper) # contains objects hyperSig and hyperGsets hyperE <- hyperEnrichment(drawn=hyperSig,categories=getGeneSet(hyperGsets),ntotal=10000)#> Testing 10 drawsets on 1320 categories and 8428 total items .. #> *** Testing control.UP .. 4/11 annotated genes found (min fdr: 1) #> *** Testing control.DN .. 8/23 annotated genes found (min fdr: 0.69) #> *** Testing TAZ.UP .. 15/41 annotated genes found (min fdr: 1) #> *** Testing TAZ.DN .. 17/35 annotated genes found (min fdr: 1) #> *** Testing YAP.UP .. 164/356 annotated genes found (min fdr: 5.9e-09) #> *** Testing YAP.DN .. 261/470 annotated genes found (min fdr: 6.5e-49) #> *** Testing TAZ+YAP.UP .. 60/166 annotated genes found (min fdr: 1) #> *** Testing TAZ+YAP.DN .. 186/381 annotated genes found (min fdr: 1.2e-12) #> *** Testing DPAGT1.UP .. 15/70 annotated genes found (min fdr: 1) #> *** Testing DPAGT1.DN .. 67/199 annotated genes found (min fdr: 1) #> done. #> MHT-correction across multiple draws ..done. #> Categories tested: 1320 #> Candidate sets: 10 #> Sets tested: 10 #> Items tested: 1752 (min,med,max: 11,118,470) #> N(FDR<=0.25): 78 #> N(FDR<=0.05): 48 #> N(FDR<=0.01): 26#> set pval fdr set annotated set size #> [1,] "control.UP" "0.012" "0.971779141104295" "1" "11" #> [2,] "control.UP" "0.013" "1" "1" "11" #> [3,] "control.UP" "0.023" "1" "1" "11" #> [4,] "control.UP" "0.027" "1" "1" "11" #> [5,] "control.UP" "0.027" "1" "1" "11" #> [6,] "control.UP" "0.031" "1" "1" "11" #> category annotated total annotated #> [1,] "11" "10000" #> [2,] "12" "10000" #> [3,] "21" "10000" #> [4,] "25" "10000" #> [5,] "25" "10000" #> [6,] "29" "10000" #> category #> [1,] "PID_ALK2PATHWAY" #> [2,] "REACTOME_CS_DS_DEGRADATION" #> [3,] "REACTOME_CHONDROITIN_SULFATE_BIOSYNTHESIS" #> [4,] "PID_TOLL_ENDOGENOUS_PATHWAY" #> [5,] "REACTOME_A_TETRASACCHARIDE_LINKER_SEQUENCE_IS_REQUIRED_FOR_GAG_SYNTHESIS" #> [6,] "PID_INTEGRIN2_PATHWAY" #> hits #> [1,] "BMP7" #> [2,] "BGN" #> [3,] "BGN" #> [4,] "BGN" #> [5,] "BGN" #> [6,] "SPON2"