extractPvalues: Create a reshaped data frame from multiGSEA output.

Description Usage Arguments Value Examples

View source: R/enrichment_functions.R

Description

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.

Usage

1
extractPvalues(enrichmentScores, pathwayNames)

Arguments

enrichmentScores

Nested List of enrichment scores, calculated by multiGSEA function.

pathwayNames

List containing Pathway names.

Value

Data frame where rows are pathways and columns are (adjusted) p-values for each omics layer.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# 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]])
)

multiGSEA documentation built on Nov. 8, 2020, 8:15 p.m.