bmi: Subset of p-values from the UK Biobank analysis

bmiR Documentation

Subset of p-values from the UK Biobank analysis

Description

The summary level data is a subset of independent SNPs from the UK Biobank where we performed a GWAS of body mass index (BMI), body fat percentage (BFP), cholesterol, and triglycerides. Note that BFP, cholesterol and triglycerides are conditioning traits and were calculated using a separate set of individuals than BMI. See manuscript for details.

Usage

data(bmi)

Value

A list called sumstats containing:

bmi

Vector of 10,000 p-values for BMI.

bfp

Vector of 10,000 p-values for BFP.

cho

Vector of 10,000 p-values for cholesterol.

tri

Vector of 10,000 p-values for triglycerides.

See Also

sffdr

Examples


# import data
data(bmi)

# separate main p-values and conditioning p-values
p <- sumstats$bmi
z <- as.matrix(sumstats[, -1])

# apply pi0_model to create model
knots <- c(0.005, 0.01, 0.025, 0.05, 0.1)
fmod <- pi0_model(z, knots = knots)

# import data
data(bmi)

# separate main p-values and conditioning p-values
p <- sumstats$bmi
z <- as.matrix(sumstats[, -1])

# apply pi0_model to create model
knots <- c(0.005, 0.01, 0.025, 0.05, 0.1)
fmod <- pi0_model(z, knots = knots)

# estimate functional pi0
fpi0_out <- fpi0est(p, z = fmod$zt, pi0_model = fmod$fmod)
fpi0 <- fpi0_out$fpi0

# apply sffdr
# Note all tests are independent see 'indep_snps' argument
# The very small p-values, set epsilon to min of p
sffdr_out <- sffdr(p, fpi0, epsilon = min(p))

# Plot significance results
plot(sffdr_out, rng = c(0, 5e-4))

# Functional P-values, Q-values, and local FDR
fp <- sffdr_out$fpvalues
fq <- sffdr_out$fqvalues
flfdr <- sffdr_out$flfdr


sffdr documentation built on April 4, 2025, 1:41 a.m.