Wrapper for Multi-group multi-trait fine-mapping, using FLASHFMwithJAM

MGFLASHFMwithJAM(
  gwas.list,
  LD.list,
  covY.list,
  Nall,
  multi = TRUE,
  TOdds = 1,
  maxcv = 1,
  maxcv_stop = 20,
  save.path,
  cpp = 0.99,
  cred = 0.99,
  NCORES = 1,
  jam.nM.iter = 1,
  flashfmRET = FALSE,
  extra.java.arguments = NULL
)

Arguments

gwas.list

List of A lists objects, where A is the number of groups; gwas.list[[i]] is a list for group i with M data.frames (one for each trait) with 3 columns named: rsID, beta, EAF; if trait names are provided for the M data.frames (same names across studies), these trait names are given in output if group names are provided for the A data.frames, these group names are given in the output

LD.list

List of A data.frame objects, where A is the number of studies; groups must be in same order as in gwas.list; LD.list[[i]] is the SNP correlation matrix for group i and must have snp names in row.names and col.names

covY.list

List of A trait covariance matrices; trait columns should be in same order as traits are listed in gwas.list[[i]]

Nall

List of components with same length as number of Studies: Nall[[i]] is the M-vector of trait sample sizes for group i, where M is the number of traits

multi

TRUE for multi-group multi-trait fine-mapping; FALSE for multi-group single-trait fine-mapping; default TRUE

TOdds

target odds of no sharing to sharing; default is 1

maxcv

starting value for maximum number of causal variants

maxcv_stop

maximum value to consider for maximum number of causal variants; maxcv_stop >= maxcv.

save.path

Path to save JAM output files; tmp files and could delete these later e.g. save.path=paste0(DIRout,"/tmpJAM/region1").

cpp

cumulative posterior probability threshold for selecting top models; default 0.99

cred

Level for multi-group credible set, default 0.99 for 99% credible sets

NCORES

number of cores for parallel computing; recommend NCORES=max(A,M), but if on Windows, use NCORES=1

jam.nM.iter

in millions, number of iterations to use in JAM; defailt 1 (1 million)

flashfmRET

TRUE to return single-group flashfm output; default FALSE

extra.java.arguments

A character string to be passed through to the java command line. E.g. to specify a different temporary directory by passing "-Djava.io.tmpdir=/Temp".

Value

List consisting of two objects: CSsummary = List of one data.frame for each trait; each trait data.frame gives the variants in the multi-group credible set for the trait, the msMPP, pooled MAF, proportion of studies that contain the variant, names of studies that contain the variant CSdetail = [[1]] a list of multi-group credible sets (variants and their msMPP), one for each trait; [[2]] details = for each trait, list of all multi-group models and variants and their msPP, msMPP if flashfmRET=TRUE, also returns a list of flashfm output for each group

Author

Jenn Asimit