View source: R/get_LD_matrix.R
get_LD_matrix | R Documentation |
Get LD from a pre-computed matrix of pairwise r / r2values.
get_LD_matrix(
locus_dir = tempdir(),
query_dat,
LD_reference,
query_genome = "hg19",
target_genome = "hg19",
fillNA = 0,
stats = "R",
as_sparse = TRUE,
subset_common = TRUE,
verbose = TRUE
)
locus_dir |
Storage directory to use. |
query_dat |
SNP-level summary statistics subset to query the LD panel with. |
LD_reference |
LD reference to use:
|
query_genome |
Genome build of the |
target_genome |
Genome build of the LD panel. This is automatically assigned to the correct genome build for each LD panel except when the user supplies custom vcf/LD files. |
fillNA |
When pairwise LD between two SNPs is |
stats |
The linkage disequilibrium measure to be calculated.
Can be |
as_sparse |
Convert the LD matrix to a sparse matrix. |
subset_common |
Subset |
verbose |
Print messages. |
Other LD:
check_population_1kg()
,
compute_LD()
,
filter_LD()
,
get_LD()
,
get_LD_1KG()
,
get_LD_1KG_download_vcf()
,
get_LD_UKB()
,
get_LD_vcf()
,
get_locus_vcf_folder()
,
ldlinkr_ldproxy_batch()
,
plot_LD()
,
popDat_1KGphase1
,
popDat_1KGphase3
,
rds_to_npz()
,
saveSparse()
,
save_LD_matrix()
,
snpstats_get_MAF()
query_dat <- echodata::BST1[seq(1, 50), ]
locus_dir <- file.path(tempdir(), echodata::locus_dir)
LD_reference <- tempfile(fileext = ".csv")
utils::write.csv(echodata::BST1_LD_matrix,
file = LD_reference,
row.names = TRUE)
LD_list <- get_LD_matrix(
locus_dir = locus_dir,
query_dat = query_dat,
LD_reference = LD_reference)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.