Calculate and/or query linkage disequilibrium (LD) from reference panels (UK Biobank, 1000 Genomes), a user-supplied pre-computed LD matrix
load_or_create( locus_dir, dat, force_new_LD = FALSE, LD_reference = c("1KGphase1", "1KGphase3", "UKB"), ref_genome = "hg19", samples = NULL, superpopulation = NULL, local_storage = NULL, leadSNP_LD_block = FALSE, fillNA = 0, verbose = TRUE, remove_tmps = TRUE, as_sparse = TRUE, download_method = "axel", nThread = 1 )
| locus_dir | Storage directory to use. |
|---|---|
| dat | GWAS summary statistics subset to query the LD panel with. |
| force_new_LD | If LD file exists, create a new one. |
| LD_reference | LD reference to use:
|
| ref_genome | Genome build of the LD panel (used only if providing custom LD panel). |
| samples | Sample names to subset the VCF by before computing LD. |
| superpopulation | Superpopulation to subset LD panel by
(used only if |
| local_storage | Storage folder for previously downloaded LD files.
If |
| leadSNP_LD_block | Only return SNPs within the same LD block as the lead SNP (the SNP with the smallest p-value). |
| fillNA | Value to fill LD matrix NAs with. |
| verbose | Print messages. |
| remove_tmps | Remove all intermediate files like VCF, npz, and plink files. |
| as_sparse | Convert the LD matrix to a sparse matrix. |
| download_method |
or
|
| nThread | Number of threads to parallelize over. |
A symmetric LD matrix of pairwise SNP correlations.
Options:
Download pre-computed LD matrix from UK Biobank.
Download raw VCF file from 1KG and compute LD on the fly.
Compute LD on the fly from a user-supplied VCF file.
Use a user-supplied pre-computed LD-matrix.
Other LD:
LD_1KG_download_vcf(),
LD_1KG(),
LD_custom(),
LD_ukbiobank(),
compute_LD(),
filter_LD(),
get_locus_vcf_folder(),
ldlinkr_ldproxy_batch(),
plot_LD(),
popDat_1KGphase1,
popDat_1KGphase3,
rds_to_npz(),
saveSparse(),
save_LD_matrix(),
snpstats_get_MAF(),
translate_population()