Downloads a subset vcf of the 1KG database that matches your locus coordinates. Then uses ld to calculate LD on the fly.
LD_custom( locus_dir = tempdir(), dat, LD_reference, ref_genome = "GRCh37", superpopulation = NULL, samples = NULL, local_storage = NULL, leadSNP_LD_block = FALSE, force_new_vcf = FALSE, force_new_MAF = FALSE, fillNA = 0, stats = "R", verbose = TRUE )
| locus_dir | Storage directory to use. |
|---|---|
| dat | GWAS summary statistics subset to query the LD panel with. |
| LD_reference | LD reference to use:
|
| ref_genome | Genome build of the LD panel (used only if providing custom LD panel). |
| superpopulation | Superpopulation to subset LD panel by
(used only if |
| samples | Sample names to subset the VCF by before computing LD. |
| 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). |
| force_new_vcf | Force the creation of a new LD file even if one exists. |
| fillNA | When pairwise LD (r) between two SNPs is |
| verbose | Print messages. |
This approach is taken, because other API query tools have limitations with the window size being queried. This approach does not have this limitations, allowing you to fine-map loci more completely.
Other LD:
LD_1KG_download_vcf(),
LD_1KG(),
LD_ukbiobank(),
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()