Loads genotype data for a region via load_LD_matrix(return_genotype=TRUE)
and removes monomorphic variants. Returns the raw genotype matrix and metadata,
which callers can use to derive either a correlation matrix R (for summary-based
weight training or fine-mapping) or an SVD (for TWAS z-score computation).
Arguments
- ld_meta_file_path
Path to the LD metadata TSV file.
- region
Region of interest: "chr:start-end" string or data.frame with chrom/start/end.
- n_sample
Optional original panel sample size for computing variance (= 2*p*(1-p)*n/(n-1)). Passed through to
load_LD_matrix().
Value
An LDData S4 object with monomorphic variants removed.
Consumers should use S4 accessors: getGenotypes(), getRefPanel(),
getVariantIds(). The number of sketch samples is
nrow(getGenotypes(result)).