trans_ts: Biomass evaluation and biological interaction prediction for...

trans_tsR Documentation

Biomass evaluation and biological interaction prediction for Time Series Data analysis.

Description

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>.

Methods

Public methods


Method new()

Prepare data for the following analysis.

Usage
trans_ts$new(dataset = NULL, filter_thres = 0.001)
Arguments
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.

Returns

microtable object stored in the object.

Examples
data(gut_microb_ts)
t1 <- trans_ts$new(dataset = gut_microb_ts, filter_thres = 0)

Method cal_biomass()

Predict the biomass.

Usage
trans_ts$cal_biomass(
  min_iter = 30,
  max_iter = 100,
  verbose = TRUE,
  scaling = 10000,
  seed = 1,
  ...
)
Arguments
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.

Returns

res_biomass and res_param stored in the object.

Examples
\dontrun{
t1$cal_biomass(min_iter = 50)
}

Method cal_network()

Extract network result from EM results.

Usage
trans_ts$cal_network(sig = 0.05, add_taxa_name = "Phylum")
Arguments
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.

Returns

trans_network object

Examples
\dontrun{
# t2 is a trans_network object used for network analysis
t2 <- t1$cal_network()
}

Method clone()

The objects of this class are cloneable with this method.

Usage
trans_ts$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples


## ------------------------------------------------
## 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)

ChiLiubio/mecodev documentation built on Jan. 20, 2025, 8:05 a.m.