Description Usage Arguments Details Value Author(s) References See Also
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.)
1 | EBPRS(train, test, N1, N0, robust = F)
|
train |
training dataset |
test |
testing dataset (list) including fam, bed, bim (generated from plink files, plink2R::read_plink is recommended). 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 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("test_plink_file") The raw testing data could be the files transformed from plink2R (using plink bfiles).
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.
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)
Shuang Song, Wei Jiang, Lin Hou and Hongyu Zhao
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
https://github.com/gabraham/plink2R
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.