Description Usage Arguments Details Value
Given input genetic files and association statistics, generate one of a number of polygenic risk scores.
1 2 |
file |
Path to converted raw plink file. This is a typical |
assoc |
File path to summary statistics used for score construction. This file must contain a column named "P" or "pvalue" or "p-value" or something similar. If the beta coefficients are to be used from this file (as opposed to |
alternate_weights |
File path to an alternate weighting scheme for use in cross-disorder PRS. |
mode |
One of "single" or "multiple". For more details see |
p |
P value cutoff for SNP inclusion in PRS. |
This is helper code to construct a simple PRS in R. Note that it is currently unoptimized, meaning that it is currently implimented in R and not RcppArmadillo as it will be in the future.
In order to use this function, you must convert your genetic files to be plink.raw
format. This serves several purposes:
It allows this function to have a standard set of inputs which are predictable and easy to deal with.
It is an efficient format which is easy to deal with computationally.
Avoids any shell integration, which makes the functions more cross-platform.
We understand that this represents an additional processing step, but we think that the reward is worth the time. If you've done this kind of thing before, please use the --recodeA
flag to produce a single plink.raw
file. If you have not, we have provided a vignette on data conversion and the same information in the package wiki online.
If mode == "single"
, then the function assumes that you wish to construct the scores using weighting coefficients from the *same disorder* (i.e. using the weights provided in the assoc
file) and those P values for thresholding. If mode == "multiple"
then the function assumes that you wish to use the original P values in assoc
to perform SNP selection, but an alternate set of weights. Provide this alternate set of weights through alternate_weights
.
The inclusion criteria for the score are provided with the p
arguement. All variants with P < p will be included in the score.
An S4 PRS object. Slots include:
"score" - A data.frame with column 1 being FID, column 2 being IID, and column 3 being SCORE. Similar to plink
output.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.