Wraps bigsnpr::snp_clumping with the boilerplate of wrapping a
numeric dosage matrix into a bigstatsr::FBM.code256 object and of
handling the common pitfall of a single-variant input.
Arguments
- X
Numeric matrix of 0/1/2 allele dosages, n rows by p variants. Column names are expected to be variant IDs but are not required.
- score
Numeric vector of length
ncol(X). Higher values favour retention during clumping (e.g. -log10 p, |Z|, MAF). May beNULL, in which case bigsnpr falls back to minor allele frequency computed fromX.- chr
Integer or character vector of length
ncol(X)giving the chromosome for each variant.- pos
Integer vector of length
ncol(X)giving the base-pair position for each variant.- r2
Numeric in (0, 1]. r-squared threshold for clumping (variants within
window_kbwhose r2 exceedsr2and have lowerscoreare removed). Default 0.2.- window_kb
Numeric. Window size in kilobases. Default is
100 / r2, matching the common "ld-clump size = 100/r2" heuristic used in many GWAS pipelines.- verbose
Logical. If TRUE, print the number of retained variants. Default FALSE.