Retrieves and formats linkage disequilibrium (LD) data from binary files based on a specified chromosome and LD threshold. It provides options for returning the data in sparse or dense format.
getSparseLD(
Glist = NULL,
chr = NULL,
r2 = 0,
onebased = FALSE,
rsids = NULL,
format = "sparse"
)
If `format` is "sparse", a list with two components: `indices` and `values`. Each component is a list of length equal to the number of rsids in the specified chromosome. If `format` is "dense", a matrix with rows and columns named after the rsids is returned.
A list containing details such as the LD file path, msize, rsids for LD.
A numeric value representing the chromosome for which LD data is to be extracted.
A numeric value specifying the LD threshold for extraction. Default is 0.
A logical value indicating whether indices are one-based (default) or zero-based.
A vector of rsids for which the LD data needs to be extracted in dense format. Default is NULL.
A character string specifying the format of the result, either "sparse" (default) or "dense".