Fine-Map Epistatic SNP Pairs Within a Single Block
Source:R/epistasis.R
fine_map_epistasis_block.RdExhaustively or adaptively identifies the specific SNP pairs within a single LD block that drive the block-level epistatic signal. Three methods are available:
"pairwise"Exhaustive C(p,2) scan. Tests all pairs using the same model as
scan_block_epistasis. Recommended for blocks with p <= 200 SNPs."lasso"Fits a LASSO model with main effects and all pairwise interaction terms using
glmnet. Identifies the interaction terms with non-zero coefficients at the cross-validated lambda. Recommended for blocks with p > 200 SNPs."auto"Dispatches to
"pairwise"when p <= 200,"lasso"otherwise.
Arguments
- block_id
Character. The block to fine-map.
- geno_matrix
Numeric matrix (individuals x SNPs) or
LDxBlocks_backend.- snp_info
Data frame with columns
SNP,CHR,POS.- blocks
LD block table.
- y_resid
Named numeric vector of GRM-corrected REML residuals (from
test_block_haplotypesnull model). Names must match individual IDs.- method
Character. One of
"pairwise","lasso","auto". Default"auto".- min_freq
Numeric. Minimum MAF. Default
0.05.- sig_threshold
Numeric. Significance threshold applied to the p-value chosen by
sig_metric. Default0.05.- sig_metric
Character. Which p-value drives the
significantflag in pairwise output. One of"p_simplem_sidak"(default, recommended),"p_simplem","p_bonf", or"p_fdr". All four p-value columns are always present regardless of this choice. Ignored for the"lasso"method (which returnslasso_coefandselectedinstead of p-values).- meff_percent_cut
Numeric in (0, 1). Variance threshold for simpleM eigendecomposition. Default
0.995.- lasso_nfolds
Integer. CV folds for glmnet lambda selection. Default
5L.- verbose
Logical. Default
TRUE.