stoufferTable: Stouffer's p-value computing with all pvalues from all...

View source: R/mod_understand_fct_enrichment.R

stoufferTableR Documentation

Stouffer's p-value computing with all pvalues from all enrichment tables provided and all gene sets to build enrichment maps.

Description

Stouffer's p-value computing with all pvalues from all enrichment tables provided and all gene sets to build enrichment maps.

Usage

stoufferTable(enrichmentResult)

Arguments

enrichmentResult

enrichResults@result list.

Value

enrichment table results merged with Stouffer's p-value non-weighted and weighted.

Examples

data(enrichResList, package = "multiSight")
enrichResList # list of enrichRes objects (e.g. enrichKEGG() results)
multiOmicRes <- stoufferTable(enrichResList)
multiOmicRes$table # table with stouffer's values  
multiOmicRes$moEnrichRes # enrichRes object for clusterProfiler plots  


data("omic2", package = "multiSight")
splitData <- splitDatatoTrainTest(omic2, 0.8)
data.train <- splitData$data.train
data.test <- splitData$data.test

diabloRes <- runSPLSDA(data.train)
diabloModels <- diabloRes$model #sPLS-DA model using all omics.
diabloFeats <- diabloRes$biosignature #selected features for each omic.
id_db <- list(omic1 = "ENSEMBL", omic2 = "ENSEMBL")
if (requireNamespace("org.Mm.eg.db", quietly = TRUE)) 
{
    library(org.Mm.eg.db, warn.conflicts = FALSE)#' 
    convFeat <- convertToEntrezid(diabloFeats, id_db, "org.Mm.eg.db")
    database <- c("reactome", "MF")
    #enrichTables <- runMultiEnrichment(databasesChosen = database,
    #  omicSignature = convFeat,
    #  organismDb = "org.Mm.eg.db")
    # enrichmentTables <- enrichTables$pathways$reactome$enrichObj
    #enrichResList # list of enrichRes objects (e.g. enrichKEGG() results)
    data(enrichResList, package = "multiSight")
    multiOmicTable <- stoufferTable(enrichResList)
}



Fjeanneret/multiSight documentation built on April 6, 2022, 7:59 a.m.