R/ctwas_postprocess_LD_mismatch.R
postprocess_LD_mismatch.Rd
Runs cTWAS post-processing procedure for merging regions
postprocess_LD_mismatch(
region_data,
z_snp,
weights,
LD_map,
snp_map,
gwas_n,
finemap_res,
susie_alpha_res,
group_prior = NULL,
group_prior_var = NULL,
min_nonSNP_PIP = 0.8,
filter_cs = FALSE,
p_diff_thresh = 5e-06,
pip_thresh = 0.5,
z_thresh = NULL,
plot = TRUE,
maxSNP = Inf,
ncore = 1,
verbose = FALSE,
logfile = NULL,
...
)
region_data to be fine-mapped.
A data frame with columns: "id", "z", giving the z-scores for SNPs.
a list of preprocessed weights.
a data frame with filenames of LD matrices for the regions.
a list of data frames with SNP-to-region map for the reference.
integer, GWAS sample size.
a data frame of original finemapping result.
a data frame of original susie alpha result.
a vector of prior inclusion probabilities for different groups. If NULL, it will use uniform prior inclusion probabilities.
a vector of prior variances for different groups.
If NULL, it will set prior variance = 50 as the default in susie_rss
.
regions with total non-SNP PIP >= min_nonSNP_PIP
will be selected to run LD mismatch diagnosis.
If TRUE, computes region non-SNP PIP only in credible sets.
p-value cutoff for identifying problematic SNPs with significant difference between observed z-scores and estimated values.
cutoff of gene PIP to select problematic genes.
cutoff of abs(z-scores) to select problematic genes.
If TRUE, plot observed z-score vs the expected value.
Inf or integer. Maximum number of SNPs in a region. Default is Inf, no limit. This can be useful if there are many SNPs in a region and you don't have enough memory to run the program.
The number of cores used to parallelize computation over regions
If TRUE, print detail messages.
the log file, if NULL will print log info on screen
Additional arguments of finemap_regions
.
a list with region merge results.