get_lead_r2: Get LD with lead SNP

View source: R/get_lead_r2.R

get_lead_r2R Documentation

Get LD with lead SNP

Description

Add new columns r and r2 containing the degree of LD in each SNP (row) with the lead GWAS/QTL SNP.

Usage

get_lead_r2(
  dat,
  LD_matrix = NULL,
  fillNA = 0,
  LD_format = "matrix",
  verbose = TRUE
)

Arguments

dat

SNP-level data.

LD_matrix

LD matrix.

fillNA

Value to fill NAs with in r/r2 columns.

LD_format

The format of the provided LD_matrix: "matrix" (wide) or "df" (long).

verbose

Print messages.

Value

data.table with the columns r and r2.

Examples

dat2 <- echoLD::get_lead_r2(dat = echodata::BST1,
                            LD_matrix = echodata::BST1_LD_matrix)

RajLabMSSM/echoLD documentation built on May 12, 2024, 3:23 a.m.