Learn R Programming

MIDASim (version 2.0)

MIDASim: Simulating Realistic Microbiome Data using MIDASim

Description

Generate microbiome datasets using parameters from MIDASim.modify.

Usage

MIDASim(fitted.modified, only.rel = FALSE)

Value

Returns a list that has components:

sim_01

Matrix of simulated presence-absence data

sim_rel

Matrix of simulated relative-abundance data

sim_count

Matrix of simulated count data

Arguments

fitted.modified

Output from MIDASim.modify.

only.rel

A logical indicating whether to only simulate relative- abundance data. If TRUE, then the count data will not be generated. Defaults to FALSE.

Author

Mengyu He

Examples

Run this code

# \donttest{
  data("throat.otu.tab")
  otu.tab = throat.otu.tab[,colSums(throat.otu.tab>0)>1]

  fitted = MIDASim.setup(otu.tab)
  fitted.modified = MIDASim.modify(fitted)
  sim = MIDASim(fitted.modified, only.rel = FALSE)
# }

Run the code above in your browser using DataLab