|
a |
|
b/man/extractPvalues.Rd |
|
|
1 |
% Generated by roxygen2: do not edit by hand |
|
|
2 |
% Please edit documentation in R/enrichment_functions.R |
|
|
3 |
\name{extractPvalues} |
|
|
4 |
\alias{extractPvalues} |
|
|
5 |
\title{Create a reshaped data frame from multiGSEA output.} |
|
|
6 |
\usage{ |
|
|
7 |
extractPvalues(enrichmentScores, pathwayNames) |
|
|
8 |
} |
|
|
9 |
\arguments{ |
|
|
10 |
\item{enrichmentScores}{Nested List of enrichment scores, calculated by |
|
|
11 |
multiGSEA function.} |
|
|
12 |
|
|
|
13 |
\item{pathwayNames}{List containing Pathway names.} |
|
|
14 |
} |
|
|
15 |
\value{ |
|
|
16 |
Data frame where rows are pathways and columns are (adjusted) |
|
|
17 |
p-values for each omics layer. |
|
|
18 |
} |
|
|
19 |
\description{ |
|
|
20 |
This function reshapes the output from multiGSEA to get a single data frame |
|
|
21 |
with columns for p-values and adjusted p-values for each omics layer. Each |
|
|
22 |
row of the data frame represents one pathway. |
|
|
23 |
} |
|
|
24 |
\examples{ |
|
|
25 |
# Download pathway definition and extract features |
|
|
26 |
pathways <- getMultiOmicsFeatures(dbs = c("kegg"), layer = c("transcriptome", "proteome")) |
|
|
27 |
|
|
|
28 |
# load omics data and calculate ranks |
|
|
29 |
data(transcriptome) |
|
|
30 |
data(proteome) |
|
|
31 |
ranks <- initOmicsDataStructure(c("transcriptome", "proteome")) |
|
|
32 |
ranks$transcriptome <- rankFeatures(transcriptome$logFC, transcriptome$pValue) |
|
|
33 |
names(ranks$transcriptome) <- transcriptome$Symbol |
|
|
34 |
ranks$proteome <- rankFeatures(proteome$logFC, proteome$pValue) |
|
|
35 |
names(ranks$proteome) <- proteome$Symbol |
|
|
36 |
|
|
|
37 |
# run the enrichment |
|
|
38 |
es <- multiGSEA(pathways, ranks) |
|
|
39 |
|
|
|
40 |
extractPvalues( |
|
|
41 |
enrichmentScores = es, |
|
|
42 |
pathwayNames = names(pathways[[1]]) |
|
|
43 |
) |
|
|
44 |
} |