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

View source: R/enrichment_functions.R

combinePvaluesR Documentation

Calculate a combined p-value for multiple omics layer.

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

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

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")

yigbt/multiGSEA documentation built on May 5, 2022, 1:01 p.m.