R/ctwas_weights.R
compute_weight_LD_from_ref.Rd
Computes LD for weight variants using reference LD
compute_weight_LD_from_ref(
weights,
region_info,
LD_map,
snp_map = NULL,
LD_format = c("rds", "rdata", "mtx", "csv", "txt", "custom"),
LD_loader_fun = NULL,
snpinfo_loader_fun = NULL,
ncore = 1
)
a list of preprocessed weights.
a data frame of region definitions.
a data frame with filenames of LD matrices and SNP information for the regions.
Required when load_predictdb_LD = FALSE
.
a list of SNP-to-region map for the reference. If NUll, it will reads SNP info from the "SNP_file" column of LD_map.
file format for LD matrix. If "custom", use a user defined
LD_loader_fun()
function to load LD matrix.
a user defined function to load LD matrix when LD_format = "custom"
.
a user defined function to load SNP information file, if SNP information files are not in standard cTWAS reference format.
The number of cores used to parallelize computation.
a list of processed weights, with LD of weight variants included.