construct_score: Construct a Simple Polygenic Risk Score

Description Usage Arguments Details Value

Description

Given input genetic files and association statistics, generate one of a number of polygenic risk scores.

Usage

1
2
construct_score(file = NULL, assoc = NULL, alternate_weights = NULL,
  mode = "single", p = 0.05)

Arguments

file

Path to converted raw plink file. This is a typical plink file which has been converted to an R readable format through recodeA. See details for specific conversion instructions.

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) then a column named "beta", "Beta", "B", or similar must be present. See details for more information.

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 details.

p

P value cutoff for SNP inclusion in PRS.

Details

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:


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.

Value

An S4 PRS object. Slots include:


Chris1221/pRs documentation built on May 6, 2019, 11:47 a.m.