This is the first step in an analysis using limorhyde2, the second is to
moderate the fits using getPosteriorFit().
getModelFit( y, metadata, period = 24, nKnots = 4L, timeColname = "time", condColname = NULL, covarColnames = NULL, nShifts = 3L, method = c("trend", "voom"), lmFitArgs = list(), eBayesArgs = if (method == "trend") list(trend = TRUE) else list(), keepLmFits = FALSE )
| y | Matrix-like object of measurements, with rows corresponding to features and columns to samples. |
|---|---|
| metadata | data.frame containing experimental design information for
each sample. Rows of |
| period | Number specifying the period for the time variable, in the same
units as the values in the |
| nKnots | Number of internal knots for the periodic spline for the time
variable. Use |
| timeColname | String indicating the column in |
| condColname | String indicating the column in |
| covarColnames | Character vector indicating the columns in |
| nShifts | Number of shifted models to fit. Only used for periodic splines, not for cosinor. Do not change from the default unless you know what you're doing. |
| method | String indicating how to fit the mean-variance relationship in the data. Use 'trend' for microarray data and 'voom' for RNA-seq count data. |
| lmFitArgs | List of arguments passed to |
| eBayesArgs | List of arguments passed to |
| keepLmFits | Logical indicating whether to keep the complete fit objects
from |
A limorhyde2 object with elements:
metadata: As supplied above, converted to a data.table.
timeColname: As supplied above.
condColname: As supplied above.
covarColnames: As supplied above.
coefficients: Matrix with rows corresponding to features and columns to
model terms, including all shifted models.
shifts: Numeric vector indicating amount by which timepoints were shifted
for each shifted model.
period: As supplied above.
conds: If condColname is not NULL, a vector of unique values of
the condition variable.
nKnots: Number of knots, where 2 indicates a cosinor-based model.
nConds: Number of conditions.
nCovs: Number of covariates.
lmFits: If keepLmFits is TRUE, a list of fit objects from limma,
with length equal to length of the shifts element.