combinePvalues: Calculate a combined p-value for multiple omics layer.

Description Usage Arguments Value Examples

View source: R/enrichment_functions.R

Description

This function applies the Stouffer method, the Edgington method or the Fisher\'s combined probability test to combine p-values of independent tests that are based on the same null hypothesis. The Stouffer method can also be applied in a weighted fashion.

Usage

1
combinePvalues(df, method = "stouffer", weights = NULL)

Arguments

df

Data frame where rows represent a certain pathway or gene set and columns represent p-values derived from independent tests, e.g., different omics layer.

method

String that specifies the method to combine multiple p-values. Default: "stouffer" Options: "stouffer", "fisher", "edgington"

weights

List of weights that will be used in a weighted Stouffer method.

Value

Vector of length nrow(df) with combined p-values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
df <- cbind(runif(5), runif(5), runif(5))
colnames(df) <- c("trans.pval", "prot.pval", "meta.pval")

# run the unweighted summation of z values
combinePvalues(df)

# run the weighted variant
combinePvalues(df, weights = c(10, 5, 1))

# run the Fisher's combined probability test
combinePvalues(df, method = "fisher")

# run the Edgington's method
combinePvalues(df, method = "edgington")

Example output

[1] NA NA NA NA NA
[1] NA NA NA NA NA
[1] NA NA NA NA NA
[1] NA NA NA NA NA

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