R/prep.R
JAMexpanded.multi.Rd
Expanded version of JAM (a single-trait fine-mapping approach) that first runs on thinned SNPs and then expands models on tag SNPs; this can run independently on multiple traits
JAMexpanded.multi( beta1, Gmat, snpinfo, ybar, Vy, N, chr = 10, fstub, mafthr = 0.005, path2plink, r2 = 0.99, save.path, related = FALSE, y = NULL )
beta1 | list where each component is a named vector |
---|---|
Gmat | genotype matrix (reference or from sample) where SNPs are columns, indivudals are rows |
snpinfo | a data.frame with columns: snpid, BP, allele1, allele2; BP is base pair position, allele1 is reference allele |
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 |
Vy | vector of trait variances; if related samples, this should be based on unrelated samples; if traits are transformed to be standard Normal, could set Vy as 1-vector |
N | vector of sample sizes for each trait; if related samples then give effective sample sizes |
chr | chromosome number |
fstub | file stub for path with file prefix to save intermediate files (plink format and tag snp list) |
mafthr | MAF threshold for filtering SNPs to include in fine-mapping; default is 0, assuming pre-filterec |
path2plink | file path to plink |
r2 | r.squared threshold for thinning SNPs before JAM |
save.path | path to save JAM output files; tmp files and could delete these later |
related | logical indicating if samples are related (TRUE) or not (FALSE); default is FALSE |
y | if available, matrix of trait measurements or indicators of non-NA trait measurements (columns are traits); used to get joint sample counts; default is NULL and if not provided an approximation is used based on vector of trait sample sizes |
list with 3 components: SM a list of snpmod objects giving fine-mapping results for each trait; mbeta a list of joint effect estimates for each trait; nsnps number of SNPs