read_plink_ld_file: Read a PLINK '.ld' file

View source: R/read_plink_ld_file.R

read_plink_ld_fileR Documentation

Description

Read a PLINK .ld file

Usage

read_plink_ld_file(ld_filename)

Arguments

ld_filename

name of a PLINK/PLINK2 linkage disequilibrium (.ld) file Use read_plink_ld_file to read a PLINK .ld file.

Value

a tibble with column names:

  • CHR_A Chromosome code for first variant

  • BP_A Base-pair coordinate of first variant

  • SNP_A ID of first variant

  • (MAF_A: Allele 1 frequency for first variant. Requires with-freqs)

  • CHR_B Chromosome code for second variant

  • BP_B Base-pair coordinate of second variant

  • SNP_B ID of second variant

  • (PHASE: In-phase allele pairs. Requires ⁠in-phase⁠)

  • (MAF_B Allele 1 frequency for second variant. Requires with-freqs)

  • R or R2: for R: the correlation coefficient, for R2, the squared correlation coefficient

These column names are the names used by PLINK, the description is taken from the PLINK 1.9 File format reference at https://www.cog-genomics.org/plink/1.9/formats#ld

Author(s)

Richèl J.C. Bilderbeek

Examples

if (1 == 2) {
  ld_filename <- get_plinkr_filename("miss_stat.ld")
  read_plink_ld_file(ld_filename)
}

richelbilderbeek/plinkr documentation built on March 25, 2024, 3:18 p.m.