Runs cTWAS fine-mapping for regions
Usage
finemap_regions(
region_data,
LD_map,
weights,
L = 5,
group_prior = NULL,
group_prior_var = NULL,
min_var = 2,
min_gene = 1,
null_method = c("ctwas", "susie", "none"),
coverage = 0.95,
min_abs_corr = 0.1,
include_cs = TRUE,
include_prior = FALSE,
include_mu2 = FALSE,
include_susie_alpha = TRUE,
include_susie_result = FALSE,
snps_only = FALSE,
force_compute_cor = FALSE,
save_cor = FALSE,
cor_dir = NULL,
LD_format = c("rds", "rdata", "mtx", "csv", "txt", "custom"),
LD_loader_fun = NULL,
snpinfo_loader_fun = NULL,
ncore = 1,
verbose = FALSE,
logfile = NULL,
...
)Arguments
- region_data
region_data to be finemapped
- LD_map
a data frame with filenames of LD matrices for the regions.
- weights
a list of preprocessed weights.
- L
the number of effects or a vector of number of effects for each region.
- group_prior
a vector of prior inclusion probabilities for different groups. If NULL, it will use uniform prior inclusion probabilities.
- group_prior_var
a vector of prior variances for different groups. If NULL, it will set prior variance = 50 as the default in
susie_rss.- min_var
minimum number of variables (SNPs and genes) in a region.
- min_gene
minimum number of genes in a region.
- null_method
Method to compute null model, options: "ctwas", "susie" or "none".
- coverage
A number between 0 and 1 specifying the “coverage” of the estimated confidence sets
- min_abs_corr
Minimum absolute correlation allowed in a credible set.
- include_cs
If TRUE, add credible sets (CS) to fine-mapping results.
- include_prior
If TRUE, include priors in fine-mapping results.
- include_mu2
If TRUE, include estimated effect size variance (mu2) in fine-mapping results.
- include_susie_alpha
If TRUE, include susie alpha matrix from fine-mapping results.
- include_susie_result
If TRUE, include the "susie" result object in fine-mapping results.
- snps_only
If TRUE, use only SNPs in the region data.
- force_compute_cor
If TRUE, force computing correlation (R) matrices
- save_cor
If TRUE, save correlation (R) matrices to
cor_dir- cor_dir
a string, the directory to store correlation (R) matrices
- LD_format
file format for LD matrix. If "custom", use a user defined
LD_loader_fun()function to load LD matrix.- LD_loader_fun
a user defined function to load LD matrix when
LD_format = "custom".- snpinfo_loader_fun
a user defined function to load SNP information file, if SNP information files are not in standard cTWAS reference format.
- ncore
The number of cores used to parallelize computation over regions
- verbose
If TRUE, print detail messages
- logfile
the log file, if NULL will print log info on screen
- ...
Additional arguments of
susie_rss.