trans_ts | R Documentation |
Biomass evaluation and biological interaction prediction for Time Series Data analysis based on the method from BEEM package, Li et al. 2019. <doi: 10.1186/s40168-019-0729-z>.
new()
Prepare data for the following analysis.
trans_ts$new(dataset = NULL, filter_thres = 0.001)
dataset
the object of microtable
class.
Two columns with exact names in sample_table are necessary; one is 'Time', which is the time point and should be the numeric class;
the other is 'Rep', which represents the biological replicates and is also numeric class. If no replicates, use 1 to represent 1 replicate.
filter_thres
default 0.001; the relative abundance threshold of taxa.
microtable object stored in the object.
data(gut_microb_ts) t1 <- trans_ts$new(dataset = gut_microb_ts, filter_thres = 0)
cal_biomass()
Predict the biomass.
trans_ts$cal_biomass( min_iter = 30, max_iter = 100, verbose = TRUE, scaling = 10000, seed = 1, ... )
min_iter
minimal number of iterations for the EM algorithm (default: 30)
max_iter
maximal number of iterations for the EM algorithm (default: 100)
verbose
print more information (default: TRUE)
scaling
median total biomass to scale all biomass data (default:10000)
seed
random seed used in BLASSO (default:NULL)
...
parameters passed to EM
function in beem package.
res_biomass and res_param stored in the object.
\dontrun{ t1$cal_biomass(min_iter = 50) }
cal_network()
Extract network result from EM results.
trans_ts$cal_network(sig = 0.05, add_taxa_name = "Phylum")
sig
default 0.05 significance threshold for the interaction evaluation (default: 0.05).
add_taxa_name
default "Phylum"; one or more taxonomic rank name; used to add taxonomic rank name to network node properties.
trans_network object
\dontrun{ # t2 is a trans_network object used for network analysis t2 <- t1$cal_network() }
clone()
The objects of this class are cloneable with this method.
trans_ts$clone(deep = FALSE)
deep
Whether to make a deep clone.
## ------------------------------------------------
## Method `trans_ts$new`
## ------------------------------------------------
data(gut_microb_ts)
t1 <- trans_ts$new(dataset = gut_microb_ts, filter_thres = 0)
## ------------------------------------------------
## Method `trans_ts$cal_biomass`
## ------------------------------------------------
## Not run:
t1$cal_biomass(min_iter = 50)
## End(Not run)
## ------------------------------------------------
## Method `trans_ts$cal_network`
## ------------------------------------------------
## Not run:
# t2 is a trans_network object used for network analysis
t2 <- t1$cal_network()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.