ccFDR: Conjunctional conditional false discovery rate

Description Usage Arguments Value See Also Examples

View source: R/condFDR.R

Description

Estimate the conjunctional conditional false discovery rate for two set of p-values, conditional on each other, as measure for pleiotropy.

Usage

1
ccFDR(data, p1, p2, p_threshold = 0.001, mc.cores = 1)

Arguments

data

data frame or (numeric) matrix with p-values as columns

p1

p-values for which the ccFDR will be estimated; either the name/index of the columns in data, or a vectors of p-values

p2

the p-values on which the ccFDR will be conditioned on; either name or vector of p-values data, or a vectors of p-values

p_threshold

cutoff for pre-filtering the p-values; a vector of either length one (in which case both sets of pvalues have the same threshold) or length two (where the thresholds refer to p1 and p2 in that order).

mc.cores

number of cores to use for parallel calculation; defaults to one (i.e. no parallel calculation), but should absolutely be increased if your system supports it, as this will speed up execution very nicely.

Value

A data frame with columns cFDR1, cFDR2, and ccFDR: if data was specified, the columns are simply added at the end; if only p1 and p2 were specified, a data frame with five columns (the original p-values, plus the cFDRs and the ccFDR).

See Also

mclapply for details on parallel calculations and mc.cores

Examples

1
2
3
4
data(psynth)
res = ccFDR(psynth, "p1", "p2", p_threshold = 1E-5)
head(res)
head(subset(res, ccFDR < 0.01))

alexploner/condFDR documentation built on Dec. 31, 2020, 7:43 p.m.