Diff of /man/combinePvalues.Rd [000000] .. [72a7c3]

Switch to unified view

a b/man/combinePvalues.Rd
1
% Generated by roxygen2: do not edit by hand
2
% Please edit documentation in R/enrichment_functions.R
3
\name{combinePvalues}
4
\alias{combinePvalues}
5
\title{Calculate a combined p-value for multiple omics layer.}
6
\usage{
7
combinePvalues(df, method = "stouffer", col_pattern = "pval", weights = NULL)
8
}
9
\arguments{
10
\item{df}{Data frame where rows represent a certain pathway or gene set and
11
columns represent p-values derived from independent tests, e.g., different
12
omics layer.}
13
14
\item{method}{String that specifies the method to combine multiple p-values.
15
Default: "stouffer" Options: "stouffer", "fisher", "edgington"}
16
17
\item{col_pattern}{String of the pattern that specifies the columns to be
18
combined. Default: "pval", Options: "pval", "padj" (legacy)}
19
20
\item{weights}{List of weights that will be used in a weighted Stouffer
21
method.}
22
}
23
\value{
24
Vector of length \code{nrow(df)} with combined p-values.
25
}
26
\description{
27
This function applies the Stouffer method, the Edgington method or the
28
Fisher\'s combined probability test to combine p-values of independent tests
29
that are based on the same null hypothesis. The Stouffer method can also be
30
applied in a weighted fashion.
31
}
32
\examples{
33
df <- cbind(runif(5), runif(5), runif(5))
34
colnames(df) <- c("trans.pval", "prot.pval", "meta.pval")
35
36
# run the unweighted summation of z values
37
combinePvalues(df)
38
39
# run the weighted variant
40
combinePvalues(df, weights = c(10, 5, 1))
41
42
# run the Fisher's combined probability test
43
combinePvalues(df, method = "fisher")
44
45
# run the Edgington's method
46
combinePvalues(df, method = "edgington")
47
}