Calculate expected abundance for multiple features at multiple timepoints in multiple conditions.
getExpectedAbund( featureMetadata, times = NULL, sampleMetadata = NULL, byCondGroup = is.null(times) )
| featureMetadata |
|
|---|---|
| times | Numeric vector of the times at which to calculate expected
abundance for each row in |
| sampleMetadata |
|
| byCondGroup | Logical for whether to speed up the calculation by
grouping by the columns |
data.table derived from featureMetadata (but with more rows),
with additional columns time and mu and possibly others. If sampling
will use the negative binomial family, mu corresponds to log2 counts.
library('data.table') featureMetadata = data.table(feature = c('feature_1', 'feature_2'), base = function(x) 0, amp = c(function(x) 0, function(x) 1), period = 24, phase = 0, rhyFunc = sin) abundDt = getExpectedAbund(featureMetadata, times = 6:17)