R/JAMupdate.R
FLASHFMwithJAMhat.Rd
Wrapper to run single-trait fine-mapping with JAMexpandedCor.multi on each trait, followed by flashfm (using fast approximation version) and then constuct SNP groups for each approach and summarises results
FLASHFMwithJAMhat( beta1, corX, raf, ybar, N, save.path, TOdds = 1, covY, cpp = 0.99, NCORES )
beta1 | list where each component is a named vector of of single SNP effect estimates for a trait; one vector for each trait |
---|---|
corX | genotype correlation matrix (reference or from sample) |
raf | named vector of reference allele frequencies; the name of each allele frequency is the SNP ID and MUST be in same SNP order as in corX |
ybar | vector of trait means; if related samples, this should be based on unrelated samples; if traits are transformed to be standard Normal, could set ybar as 0-vector |
N | vector of sample sizes for each trait; recommended to give effective sample sizes using GWAS summary statistics in Neff function |
save.path | path to save JAM output files; tmp files and could delete these later e.g. save.path=paste0(DIRout,"/tmpJAM/region1"). |
TOdds | Vector of target odds of no sharing to sharing |
covY | trait covariance matrix (for at most 6 traits and all traits should have a signal in the region, e.g. min p < 1E-6) |
cpp | cumulative posterior probability threshold for selecting top models |
NCORES | number of cores for parallel computing; recommend NCORES=M, but if on Windows, use NCORES=1 |
list with 2 components: mpp.pp, a list with 4 components giving the SNP-level results (mpp.pp$PP,mpp.pp$MPP) and SNP group level results (mpp.pp$MPPg, mpp.pp$PPg); and snpGroups, a list with 2 components giving the SNP groups construced under single-trait (snpGroups[[1]]) and multi-trait fine-mapping (snpGroups[[2]])