prs_grid: Create a grid of polygenic risk scores with different tuning...

View source: R/prs_grid.R

prs_gridR Documentation

Create a grid of polygenic risk scores with different tuning parameter combinations

Description

Create a full or fractional factorial grid of polygenic risk scores based on a user-specified range of tuning parameter values. Useful to evaluate the influence of various tuning parameters, and for the creation of stacked scores.

Usage

prs_grid(
  variant_data,
  gwas_info,
  binary_outcome = TRUE,
  imp_range = seq(0.8, 1, 0.05),
  pruning_range = seq(0.7, 1, 0.05),
  pval_range = quantile(gwas_info$pvalue, seq(0.1, 1, 0.1)),
  optimal = FALSE,
  optimal_trials = 9
)

Arguments

variant_data

An object of format output by extract_variants().

gwas_info

An object generated by get_trait_variants() or get_pQTLs().

binary_outcome

Set to TRUE for binary traits, and FALSE for continuous outcomes (including pQTLs)

imp_range

A vector of imputation R^2 values.

pruning_range

A vector of LD (R^2) pruning threshold values.

pval_range

A vector of p-value thresholds.

optimal

If TRUE, creates the grid according to a D-optimal fractional factorial design.

optimal_trials

Number of rows in the fractional factorial design matrix.

Value

A list containing the grid design, a list of all results, and a data.frame with all scores. # grid <- prs_grid(MI_variants, MI_gwas)


vincent10kd/polygenic documentation built on Feb. 25, 2024, 10:17 a.m.