ecosimulator: simulation phylogenetic or functional composition of...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/BiotypeR.r

Description

This function permit to simulate, starting a ecological matrix, phylogenetic or functional composition of hypothetical samples based on uniform, normal and log.normal models.

Usage

1

Arguments

x

a data frame with samples/sites as columns and species/functions as rows.

r

number of simulation

Details

For a given set of N feature vectors, each representing the phylogenetic (genus, phylum, etc) or the functional (gene, orthologous group, functional modules, etc) composition of a metagenomic sample, we simulated N hypothetical metagenomic samples containing the same number of features by sampling from a continuum as follows: template-uniform: each generated feature corresponds to a feature in the real dataset and its values across multiple samples is uniformly distributed between the minimum and maximum abundances of that feature in the real dataset template-Gaussian (normal): each generated feature corresponds to a feature in the real dataset and its values across multiple samples followed a Gaussian distribution with the same mean and standard deviation as observed in the corresponding real data template-log.normal: each generated feature corresponds to a feature in the real dataset and its values across multiple samples followed a log.normal distribution with the same mean and standard deviation as observed in the corresponding real data

Generated values are then normalized so that abundances within a sample sum to 1.

Value

a list of class "ecosimulation"

uniform

simulated data.frame using uniform distribution

normal

simulated data.frame using normal distribution

log.normal

simulated data.frame using log.normal distribution

.

Author(s)

Julien Tap

References

Arumugam et al. Enterotypes of of the human gut microbiome. Nature 2011. doi:10.1038/nature09944

See Also

runif rnorm rlnorm

Examples

1
2
3
4
data(Titanium16S)
simul=ecosimulator(Titanium16S, 50) 
simul
class(simul)

tapj/biotyper documentation built on Oct. 23, 2021, 5:44 a.m.