View source: R/file_loading_functions.R
load_plink_ld | R Documentation |
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.
load_plink_ld(file, max_dist = 50000, keep_ids = FALSE, stat = c("r2", "dp"))
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) |
A tibble with pairwise LD measures
a <- system.file("extdata", "test.plink.ld.gz", package = "gwplotting" )
b <- load_plink_ld( a )
b
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.