eagle: Run the full EAGLE procedure.

Description Usage Arguments Value Author(s)

Description

The usual usage is to 1) fit the null model across exonic SNPs, while learning the overdispersion hyperparameters, 2) fit the alternative models holding these hyperparameters fixed 3) perform likelihood ratio tests for each locus

Usage

1
2
3
eagle(alt,n,xFull,xNull,max.its=1000,tol=10.0,debug=F,learn.rev=T,rev=1.0,...
	traceEvery=1,rev.model="global",null.first=T,coeff.reg=0.0,...
	return.aux.variables=F,storeAllCoeffs=F,repRep=1)

Arguments

alt

list (over exonic SNPs) of alternative read counts

n

list (over exonics SNPs) of total read counts

xFull

list of design matrices for the alternative hypothesis (e.g. including environment)

xNull

list of design matrices for the null hypothesis

max.its

maximum iterations of EM to run

tol

consider EM to have converged if the change in the lower bound is less than this

debug

output debugging information? Also performs additional checks.

learn.rev

whether to learn the overdispersion hyperparameters a,b

rev

initial random effect variance

traceEvery

traceEvery: how often to output convergence info to stdout

rev.model

rev.model: one of c("global","regression","local","local.regression"). global: single fixed random effect variance across all exonic SNPs (not recommended). regression: random effect variance is log-linear in the log average read depth (not recommended). local: random effect variance at exonic SNP s is v_s ~ InverseGamma(a,b) [recommended]. local.regression: log(rev) ~ N(mt+c,v) [gives similar results to "local" but not as well calibrated]

nullFirst

whether to run the null or alternative model first. Only matters if learning the overdispersion hyperparamters, in which case these are learnt on whichever is run first, and fixed for the second.

coeff.reg

whether to regularize the regression coefficents with a term -coef.reg |beta|^2

return.aux.variables

whether to return the auxiliary variables g (only used for debugging)

storeAllCoeffs

whether to store coefficients throughout the EM algorithm (for debugging)

repRep

1/v in the local.regression overdispersion model log(rev) ~ N(mt+c,v)

rerunFirst

whether to rerun the first model after learning hyperparameters (not used)

learnRepRep

whether to learn v in the local.regression model

learnBetas

whether to learn the regression coefficients

Value

The returned list is the same as for eagle.helper:

p.values

$p$-values for the likelihood ratio tests.

q.values

Corresponding $q$-values calculated using Benjamini-Hochberg FDR.

res.full

Results for the full (alternative) design matrices. See eagle.vem for details.

res.null

Results for the null design matrices.

settings

Settings used, see eagle.settings

timeFirst

Computation time for first run.

timeSecond

Computation time for second run.

res.firstOld

If the first run was re-run after fitting hyperparameters, then these are the results of that initial run.

Author(s)

David A. Knowles


davidaknowles/eagle documentation built on May 14, 2019, 9:35 p.m.