miaSim implements tools for microbiome data simulation based on the
Microbiome time series simulation can be obtained by generalized
simulateGLV, and Self-Organized Instability
simulateSOI. Hubbell’s Neutral model,
simulateHubbell is used
to determine the species abundance matrix.
The resulting abundance matrix from these three simulation models can be
SummarizedExperiment object or
object by using
randomA give interaction matrix of species
generated by normal distribution and uniform distribution, respectively.
These matrices can be used in the simulation model examples.
simulationTimes generates lists of time series that can be specified as
simulation time and time points to keep in simulated time.
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")
simulateGLV is the generalized Lotka-Volterra simulation model fitted to
time-series estimates microbial population dynamics and relative rates of
interaction. The model relies on interaction matrix that represents interaction
heterogeneity between species. This interaction matrix can be generated
randomA functions depending on the distribution method.
powerlawA uses normal distribution to create interaction matrix.
randomA uses uniform distribution to create interaction matrix.
The number of species specified in the interaction matrix must be the same
amount as the species used in the
simulateRicker functions both use the generalized
Time series is added to
simulationTimes function where
the time points can be kept and extracted from simulation time as a separate
simulateHubbell includes the Hubbell Neutral simulation model which explains
the diversity and relative abundance of species in ecological communities.
This model is based on the community dynamics; migration, births and deaths.
Loss in society is either replaced by migration or birth.
simulateHubbellRates also uses the Hubbell Neutral model.Migration
is determined by the metacommunity and replacement by birth is measure by
growth rates. The time between events is the determinant of replacement.
The Self-Organised Instability (SOI) model can be found in
simulateSOI and it
generates time series for communities and accelerates stochastic simulation.
Stochastic logistic model is used in
simulateStochasticLogistic to determine
dead and alive counts in community.
The consumer resource community simulation model
requires the use of the
randomE function, which returns a matrix containing
the production rates and consumption rates of each species. The resulting
matrix is used as a determination of resource consumption efficiency.
The community simulations result in abundance matrix that can be stored in
SummarizedExperiment [@SE] class object. Other fields, such as rowData
containing information about the samples, and colData, consisting of sample
metadata describing the samples, can be added to the
class object. This can be done by conversion function
TreeSummarizedExperiment class object can be created using
the required hierarchical information in addition to the
class object. It can also be reached through
For further details:
After converting to
TreeSummarizedExperiment the models can be used with:
various visualization functions under
many analysis tools that are available under
time series analysis tools under
HubbellSE population density can be plotted with
More examples on
SummarizedExperiment object manipulation and analysis can be
found at https://microbiome.github.io/OMA/ .
## R version 4.2.0 RC (2022-04-21 r82226) ## Platform: x86_64-pc-linux-gnu (64-bit) ## Running under: Ubuntu 20.04.4 LTS ## ## Matrix products: default ## BLAS: /home/biocbuild/bbs-3.16-bioc/R/lib/libRblas.so ## LAPACK: /home/biocbuild/bbs-3.16-bioc/R/lib/libRlapack.so ## ## locale: ##  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C ##  LC_TIME=en_GB LC_COLLATE=C ##  LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 ##  LC_PAPER=en_US.UTF-8 LC_NAME=C ##  LC_ADDRESS=C LC_TELEPHONE=C ##  LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C ## ## attached base packages: ##  stats graphics grDevices utils datasets methods base ## ## other attached packages: ##  BiocStyle_2.25.0 ## ## loaded via a namespace (and not attached): ##  bookdown_0.26 digest_0.6.29 R6_2.5.1 ##  jsonlite_1.8.0 magrittr_2.0.3 evaluate_0.15 ##  stringi_1.7.6 rlang_1.0.2 cli_3.3.0 ##  jquerylib_0.1.4 bslib_0.3.1 rmarkdown_2.14 ##  tools_4.2.0 stringr_1.4.0 xfun_0.30 ##  yaml_2.3.5 fastmap_1.1.0 compiler_4.2.0 ##  BiocManager_1.30.17 htmltools_0.5.2 knitr_1.38 ##  sass_0.4.1