Skip to contents

Auto-detects the source type (PLINK2, PLINK1, or pre-computed LD metadata) and returns variant metadata. For PLINK2, opens only the .pvar file. For PLINK1, reads only the .bim file. No genotype data is loaded.

Usage

get_ref_variant_info(source, region = NULL)

Arguments

source

PLINK 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.