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 )
| 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. |
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).
Other LD:
LD_1KG_download_vcf(),
LD_1KG(),
LD_custom(),
compute_LD(),
filter_LD(),
get_locus_vcf_folder(),
ldlinkr_ldproxy_batch(),
load_or_create(),
plot_LD(),
popDat_1KGphase1,
popDat_1KGphase3,
rds_to_npz(),
saveSparse(),
save_LD_matrix(),
snpstats_get_MAF(),
translate_population()