SimulateOTU | R Documentation |
We generate the OTUs count table simulated based on the Dirichlet-multinomial model according to real data.
SimulateOTU(data, nSam, parameters, mu, size)
data |
Real data. |
nSam |
Sample size. |
parameters |
The estimated parameter based on a real microbiome data, including OTU proportions and overdispersion parameter. |
mu |
The mean of the negative binomial distribution. |
size |
The size of the negative binomial distribution. |
OTU: OTU counts table simulated based on real data.
#Simulated OTUs
library(dirmult)
data("throat.otu.tab", package = "MiSPU")
nOTU = 100
otu_sum <- apply(throat.otu.tab, 2, sum)
throat.otu.tab.100 <- throat.otu.tab[, order(otu_sum, decreasing = TRUE)[1:nOTU]]
parameters <- dirmult(throat.otu.tab.100)
otu.tab <- SimulateOTU(throat.otu.tab.100, nSam = 50, parameters=parameters, mu = 1000, size = 25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.