fitModel: Fits a model for each gene in a CellDataSet object.
Description
Fits a model for each gene in a CellDataSet object.Usage
fitModel(cds, modelFormulaStr = "expression~sm.ns(Pseudotime, df=3)",
cores = 1)
Arguments
cds
the CellDataSet upon which to perform this operation
modelFormulaStr
a formula string specifying the model to fit for the genes.
cores
the number of processor cores to be used during fitting.
Value
- a list of VGAM model objects
Details
This function fits a Tobit-family vector generalized additive model (VGAM) from the VGAM package for each gene in a CellDataSet.
The default formula string speficies that the (log transformed) expression values follow a Tobit distribution with upper and lower bounds
specificed by max_expr and min_expr, respectively. By default, expression levels are modeled as smooth functions of the Pseudotime value of each
cell. That is, expression is a function of progress through the biological process. More complicated formulae can be provided to account for
additional covariates (e.g. day collected, genotype of cells, media conditions, etc).