Calc_condBF.Rd
Calculate the Bayesian factor for each target SNP conditioned on the SNP set
Calc_condBF(
gwas.list,
ld.list,
which.ld,
meta.snp,
sel.set,
n_cohort,
env,
PCs,
out_loc,
ncores,
cred.thr,
actual.geno,
collinear
)
A list of length K_g which contains the pre-processed GWAS files. Each component contains one GWAS file comprising these required columns: "MARKERNAME","CHROMOSOME","POSITION","EA","NEA","EAF","N","BETA","SE".
A list of length K_ld which contains the pre-processed LD structures. Each component contains one LD structure.
A character vector of length K_g. Each component of the vector corresponds to one LD structure. The length of which.ld should equal to the number of gwas files.
A character vector containing all SNP names present in the output of MR-MEGA method or env-MR-MEGA method.
A set contains all potential associated SNPs.
The number of cohorts.
The study-level environment factors across all the cohorts. Each row refers to one population and each column refers to one environment covariate. For MR-MEGA approach, env=NULL.
The axes of genetic variation, which can also be called the principal components (PCs). Each row refers to one population.
Note: Each env
row and PCs
row should correspond to same population.
Path to save pre-processed GWAS files and LD structures. By default, out_loc=NULL.
The the number of cores which would be used for running in parallel.
Credible threshold for the credible set for each selected potential SNP. By default, cred.thr=0.99 refers to 99% credible sets.
An indicator to specify whether the true cohort-level LD structure is applied.
A threshold to filter out the target SNP in high LD with the SNP set. If the squared multiple correlation between the target SNP exceeds the threshold, such as 0.9, the target SNP is ignored.
Output the results of (env-)MR-MEGAfm conditioned on the subset of the selected potential SNP set.