SparseDOSSA2 | R Documentation |
SparseDOSSA2
generates synthetic microbial abundance observations
from either pre-trained template, or user-provided fitted results from
fit_SparseDOSSA2
or fitCV_SparseDOSSA2
. Additional options
are available for simulating associations between microbial features
and metadata variables.
SparseDOSSA2(
template = "Stool",
n_sample = 100,
new_features = TRUE,
n_feature = 100,
spike_metadata = "none",
metadata_effect_size = 1,
perc_feature_spiked_metadata = 0.05,
metadata_matrix = NULL,
median_read_depth = 50000,
verbose = TRUE
)
template |
can be 1) a character string ( |
n_sample |
number of samples to simulate |
new_features |
|
n_feature |
number of features to simulate. Only relevant when
|
spike_metadata |
for metadata spike-in configurations. Must be one of two things: a) ,
|
metadata_effect_size |
(for when |
perc_feature_spiked_metadata |
(for when |
metadata_matrix |
the user can provide a metadata matrix to use for spiking-in
of feature abundances. If using default ( |
median_read_depth |
targeted median per-sample read depth |
verbose |
whether detailed information should be printed |
a list with the following component:
feature by sample matrix of simulated microbial count observations
list of all simulated data matrices, including that of null (i.e. not spiked-in) absolute abundances, spiked-in absolute abundances, and normalized relative abundances
parameters used for simulation. These are provided in template
.
list of variables provided or generated for metadata spike-in. This include
spike_metadata
for the original spike_metadata
parameter provided
by the user, metadata_matrix
for the
metadata (either provided by the user or internally generated), and
feature_metadata_spike_df
for detailed specification of which metadata variables were used to spike-in associations
with which features, in what properties at which effect sizes. This is the
same as spike_metadata
if the latter was provided as a data.frame.
Siyuan Ma, syma.research@gmail.com
## Using one of the pre-trained SparseDOSSA2 templates:
sim <- SparseDOSSA2(template = "stool", n_sample = 200, new_features = FALSE)
## Using user-provided trained SparseDOSSA2 model:
data("Stool_subset")
fitted <- fit_SparseDOSSA(data = Stool_subset)
sim <- SparseDOSSA2(template = fitted, n_sample = 200, new_features = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.