load_plink_ld: Load a plink LD file

Description Usage Arguments Value Examples

View source: R/file_loading_functions.R

Description

This function loads a file containing pairwise LD estimates generated by plink. A typical command to generate this file would be: plink –bfile input –allow-extra-chr –r2 inter-chr gz \ –ld-window-r2 0.0 –out test.plink –chr scaffold_1000 This will only keep SNPs on the same chromosome, because it assumes that you do not know the distance between different scaffolds, even those located to the same chromosome according to reordering information.

Usage

1
2
load_plink_ld(file, max_dist = 50000, keep_ids = FALSE,
  stat = c("r2", "dp"))

Arguments

file

Name of a file containing LD values calculated using

max_dist

Maximum allowed distance between two SNPs, in bp

keep_ids

Keep SNP IDs in returned tibble? T / F

stat

Which statistic to keep? r2, d, and/or dp (D' and D'-signed)

Value

A tibble with pairwise LD measures

Examples

1
2
3
a <- system.file("extdata", "test.plink.ld.gz", package = "gwplotting" )
b <- load_plink_ld( a )
b

nwvankuren/genomics-plotting documentation built on April 14, 2021, 1:18 a.m.