I'm exploring ballgown as a method for differential gene expression, but running into what I believe should be a simple problem in specifying models for testing for differential expression. The function stattest performs this test and the documentation reports that arguments mod and mod0 can be used to specify custom models with and without desired covariates respectively when testing for differential expression. From the manual:
"mod and mod0 are optional arguments. If mod is specified, you must also specify mod0. If neither is specified, mod0 defaults to the design matrix for a model including only a library-size adjustment, and mod defaults to the design matrix for a model including a library-size adjustment and covariate."
What I would like to do is to use the default mod0 including only the library-size adjustment and test it against a model with two independent covariates (sequentially or together), but I haven't been able to identify the code that implements the default library-size adjustment. This should be trivial, but I haven't been able to solve it efficiently. Any perspective you can offer would be welcome!