View source: R/enrichment_functions.R
extractPvalues | R Documentation |
This function reshapes the output from multiGSEA to get a single data frame with columns for p-values and adjusted p-values for each omics layer. Each row of the data frame represents one pathway.
extractPvalues(enrichmentScores, pathwayNames)
enrichmentScores |
Nested List of enrichment scores, calculated by multiGSEA function. |
pathwayNames |
List containing Pathway names. |
Data frame where rows are pathways and columns are (adjusted) p-values for each omics layer.
# Download pathway definition and extract features
pathways <- getMultiOmicsFeatures(dbs = c("kegg"), layer = c("transcriptome", "proteome"))
# load omics data and calculate ranks
data(transcriptome)
data(proteome)
ranks <- initOmicsDataStructure(c("transcriptome", "proteome"))
ranks$transcriptome <- rankFeatures(transcriptome$logFC, transcriptome$pValue)
names(ranks$transcriptome) <- transcriptome$Symbol
ranks$proteome <- rankFeatures(proteome$logFC, proteome$pValue)
names(ranks$proteome) <- proteome$Symbol
# run the enrichment
es <- multiGSEA(pathways, ranks)
extractPvalues(
enrichmentScores = es,
pathwayNames = names(pathways[[1]])
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.