TWAS Knockoff main function
Usage
TwasKnockoff(
snpidx,
ye,
Xe,
summarystat,
Xp,
removemethod = "lasso",
simu = FALSE,
reduced = TRUE,
lambda_r = 0.1,
correlation = "improved",
nrep = 10,
ts = "lasso",
appr = "sdp",
yep_true = NULL,
gene_fdr = "genesnp"
)
Arguments
- snpidx
A list of numeric vectors, storing the indices of cis-variants for each candidate gene in the risk region.
- ye
A list of numeric vectors, storing the gene expression levels for each gene in the eQTL study.
- Xe
A list of matrices, storing the cis-genotype matrices for each gene in the eQTL study.
- summarystat
Summary statistics for cis-SNPs in the risk region.
- Xp
The cis-genotype matrix from GWAS data or reference panel for the risk region.
- removemethod
If 'lasso', remove the significant variants (eQTLs) detected in the gene expression prediction model.
- simu
If TRUE, print the correlation between predicted gene expression levels and true gene expression levels given as input via yep_true.
- reduced
If TRUE, only consider the cis-SNPs within each gene; if FALSE, consider all cis-SNPs in the risk region.
- lambda_r
Parameter for the regularization of correlation matrix.
- correlation
If 'improved', apply the improved correlation matrix estimation via bootstrap sample.
- nrep
Number of bootstrap samples (including the original copy).
- ts
Test statistic for knockoffs, selected from 'marginal','susie','lasso','lasso.approx.lambda','squared.zscore'.
- appr
Approximation method for knockoffs.
- yep_true
A list of true gene expression levels for GWAS study, only required when simu = TRUE.
- gene_fdr
If 'gene': only use genes for FDR control; If 'genesnp': use all genetic elements (including genes and cis-SNPs) for FDR control.
Value
A list of three elements, the first element contains test statistics for all genetic elements, the second element contains q-values and knockoff statistics similar to GhostKnockoff, the third element contains SNPs removed from the knockoff procedure (i.e., significant SNPs in gene expression prediction models)