Auto-detects the source type (PLINK2, PLINK1, VCF, GDS, or pre-computed
LD metadata) and returns variant metadata. For PLINK2, opens only the
.pvar file. For PLINK1, reads only the .bim file. For VCF and GDS,
loads the full file and extracts variant info.
Usage
getRefVariantInfo(source, region = NULL)
Arguments
- source
Genotype file path/prefix or LD metadata file path.
- region
Region of interest: "chr:start-end" string or data.frame with
chrom/start/end. If NULL, returns all variants.
Value
A data.frame with columns: chrom, id, pos, A2, A1.
May also include allele_freq, variance, n_nomiss depending on source.