shaPRS_adjust: Create lFDR corrected Q-test statistics for each SNP

View source: R/shaPRS.R

shaPRS_adjustR Documentation

Create lFDR corrected Q-test statistics for each SNP

Description

it performs: (1) modified Cochran's Q-test which optionally adjusts for overlapping controls (2) lFDR estimation on the p-values from the above Cochran's Q-test (3) lists SNPs that fail the heterogeneity test at specified thresholds (optional)

Usage

shaPRS_adjust(
  inputData,
  rho = 0,
  thresholds = vector(),
  discardAmbiguousSNPs = T
)

Arguments

inputData

summary statistics table that has header with the following columns: SNP CHR BP Beta_A SE_A A1.x A2.x Beta_B SE_B A1.y A2.y

rho

estimate of correlation between studies due to shared subjects. 0 for no overlap and 1 for complete overlap. default: 0. Obtain this from shaPRS_rho()

thresholds

vector of thresholds to be used to create list of SNPs (default empty)

discardAmbiguousSNPs

(optional) if ambiguous SNPs (G/C and A/T) should be discarded (default TRUE)

Value

returns object with two fields, (1) lFDRTable: a 3 column file with the following signature SNP lFDR Qval (2) hardThresholds list of SNPids that failed the heterogeneity test at each threshold

Examples

inputDataLoc <- system.file("extdata", "shapersToydata.txt", package = "shaPRS")
inputData= read.table(inputDataLoc, header = TRUE)
results = shaPRS_adjust(inputData, thresholds=c(0.5,0.99))


mkelcb/shaprs documentation built on Feb. 7, 2023, 7:16 p.m.