Skip to contents

This function allows you to run the cross-phenotype meta-analysis (CPMA) method on p-values from GWAS summary statistics, given a variety of parameters.

Usage

cpma(p, epsilon = 0.001, p_threshold = 5e-08, maxval = 1, fixed = TRUE)

Arguments

p

list of numeric vectors. Contains the p-values from each GWAS.

epsilon

numeric scalar (default: 0.001). Offset parameter.

p_threshold

Numeric scalar (default: 5E-8). The threshold for which we deem an association statistically significant.

maxval

numeric scalar in range \((0, 1]\) (default: 1). The maximum value for p-values to be considered for analysis.

fixed

logical (default: TRUE). If the cross-trait association for >1 traits reaches p_threshold but a single trait has the lowest p-value of all combinations, return the result for the >1 traits instead. This is to avoid scenarios where there does seem to be a cross-trait association, but that is suppressed due to statistical properties.

Value

Returns a list with four elements, focused on the optimal subset for each SNP:

  • p: numeric vector. For each SNP, the p-value of the optimal subset.

  • n: numeric vector. For each SNP, the number of traits in the optimal subset.

  • traits: list of characters. For each SNP, the names of the traits that are in the optimal subset.

  • p_exp: numeric vector. For each SNP, the -log10 p-value of the optimal subset.

Examples

p <- replicate(10, runif(100), simplify = FALSE)
out <- cpma(p)