Sample feature abundance values from the given distributions. This function
is used internally by simphony()
, and should not usually need to be
called directly.
getSampledAbund( abundDt, logOdds = FALSE, family = c("gaussian", "negbinom", "bernoulli", "poisson"), inplace = FALSE )
abundDt |
|
---|---|
logOdds | Logical for whether |
family | Character string for the family of distributions from which
to sample the abundance values. |
inplace | Logical for whether to modify |
Matrix of abundance values, where rows correspond to features and columns correspond to samples.
library('data.table') set.seed(6022) abundDt = data.table(feature = 'feature_1', sample = c('sample_1', 'sample_2'), mu = c(0, 5), sd = 1) abundMat = getSampledAbund(abundDt)