EBPRS {EBPRS}R Documentation

Main function

Description

Clean the dataset, extract information from raw data and calculate effect sizes. (Please notice that there are some requirements for the training and testing datasets.)

Usage

EBPRS(train, test, N1, N0, robust = T)

Arguments

train

training dataset

test

testing dataset (list) including fam, bed, bim, which can be generated from function read_plink in our package. If missing(test)=T, the function will use all SNPs in training dataset by default.

N1

case number

N0

control number

robust

T/F, indicator that whether robust estimation is needed. The function will run faster when robust is set to F. The default is T.

Details

The raw training data should be a data.fame including A1, A2, OR, P, SNP (NOTE that the colnames should be exactly consistent with the above).

The SNP column (rsid) is used for indexing.

An example training dataset can be acquired using data("traindat")

"test" file can be generated from read_plink("path_to_test_plink_bfile")

test is a list, which has test$fam (6 columns with information on samples), test$bim (6 columns with information on SNPs), test$bed (genotypes matrix 0, 1, 2)

Note that in real data, we usually use beta0 = m/20 as the default setting for the EM algorithm, which is accurate enough in most cases and will have little influence on the prediction performance. If more accurate parameter estimation is required, we provide a robust estimation (by setting robust=T), integrating our data-driven bootstrap-based parameter tuning method. This can derive the best parameter for robust estimation, while more time is needed.

Value

A list containing data.frame (result): combining the summary statistics and estimated effect sizes (eff)

estimated effect sizes (eff)

estimated mu (muHat)

estimated sigma2 (sigmaHat2)

estimated proportion of non-associated SNPs (pi0)

estimated variance of effect sizes of associated SNPs (sigma02)

If the test file is provided the results also include:

predictive r2 (r2)

AUC (AUC)

estimated polygenic risk score (S)

Author(s)

Shuang Song, Wei Jiang, Lin Hou and Hongyu Zhao

References

Song S, Jiang W, Hou L, Zhao H (2020) Leveraging effect size distributions to improve polygenic risk scores derived from summary statistics of genome-wide association studies. PLoS Comput Biol 16(2): e1007565. https://doi.org/10.1371/journal.pcbi.1007565


[Package EBPRS version 2.1.0 Index]