Download pre-computed LD matrices from UK Biobank in 3Mb windows, then subset to the region that overlaps with dat.

LD_ukbiobank(
  dat = NULL,
  locus_dir,
  sumstats_path = NULL,
  chrom = NULL,
  min_pos = NULL,
  force_new_LD = FALSE,
  local_storage = NULL,
  download_full_ld = FALSE,
  download_method = "python",
  fillNA = 0,
  nThread = 1,
  return_matrix = FALSE,
  as_sparse = TRUE,
  remove_tmps = TRUE,
  verbose = TRUE
)

Arguments

dat

GWAS summary statistics subset to query the LD panel with.

locus_dir

Storage directory to use.

force_new_LD

If LD file exists, create a new one.

local_storage

Path to folder with previously download LD npz files.

download_method

If "python" will import compressed numpy array directly into R using reticulate. Otherwise, will be passed to downloader to download the full 3Mb-window LD matrix first.

fillNA

Value to fill LD matrix NAs with.

nThread

Number of threads to parallelize over.

as_sparse

Convert the LD matrix to a sparse matrix.

remove_tmps

Remove all intermediate files like VCF, npz, and plink files.

verbose

Print messages.

Details

LD was derived from a British, European-decent subpopulation in the UK Biobank. LD was pre-computed and stored by the Alkes Price lab (see here).

See also