run.bvs.Rd
Wrapper for GUESS, an alternative to using R2GUESS
run.bvs(X, Y, gdir = "test", sub = NA, covars = NULL, family = "gaussian", nsweep = 55000, nchains = 3, nexp = 3, tag.r2 = 0.99, nsave = 1000, guess.command = NULL, wait = FALSE, run = TRUE, ...)
X | snpMatrix object, holding genotypes |
---|---|
Y | vector or matrix of phenotypes, nrow(Y)==nrow(X) |
gdir | directory where all the GUESS input/output files will be. If it doesn't exist, it will be created. |
sub | optional number < nrow(X). If supplied, only the subset of samples defined by 1:sub will be used. |
covars | optional matrix or vector of covariates. If supplied GUESS will be run on residuals from glm(Y ~ ., data=as.data.frame(covars)). |
family | family for Y ~ covars regression. default "gaussian". |
nsweep | number of sweeps, see documentation for GUESS |
nchains | number of chains, see documentation for GUESS |
nexp | expected number of causal variants in region |
tag.r2 | r squared value at which to tag to avoid numerical instability. Default of 0.99 has worked well in our experience. |
nsave | number of models to save, see documentation for GUESS |
guess.command | Command to run GUESS. This is normally automatically set to the version of GUESS installed by R2GUESS, but you may override with a full path to a system version of GUESS if you prefer. |
wait | logical. default FALSE. if TRUE, run.bvs will wait for GUESS to finish, rather than running in background |
run | logical. default TRUE. If FALSE, don't run GUESS, just return the command that would be run |
... | GUESS starts from a stepwise solution found by cond.best. Use ... to pass arguments firectly to cond.best to influence the p value threshold or number of predictors at which the stepwise search stops. |
nothing. side effect is to set GUESS running in the background. This takes a while (typically several hours).