FLASHFMwithJAM: Wrapper to run single-trait fine-mapping with...

Description Usage Arguments Value Author(s)

View source: R/jamexpanded.corX.R

Description

Wrapper to run single-trait fine-mapping with JAMexpandedCor.multi on each trait, followed by flashfm and then constuct SNP groups for each approach and summarises results

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
FLASHFMwithJAM(
  beta1,
  corX,
  raf,
  ybar,
  N,
  r2 = 0.99,
  save.path,
  TOdds = 1,
  covY,
  cpp = 0.99,
  NCORES
)

Arguments

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

r2

r.squared threshold for thinning SNPs before JAM and finding tag SNPs

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

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

Value

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]])

Author(s)

Jenn Asimit


jennasimit/flashfm documentation built on Aug. 9, 2021, 7:36 a.m.