View source: R/simulatePhyloPoissonLogNormal.R
simulatePhyloPoissonLogNormal | R Documentation |
Simulate a tree structured matrix of counts according to a Poisson-lognormal model, with the log parameter of the poisson following a Brownian Motion (BM) on the tree with noise.
simulatePhyloPoissonLogNormal(
tree,
log_means,
log_variance_phylo,
log_variance_sample,
model.process = "BM",
selection.strength = 0
)
tree |
A phylogenetic tree with n tips. |
log_means |
a matrix with the number of genes p rows and the number of species n columns. Column names should match the tree taxa names. |
log_variance_phylo |
a vector of length p of phylogenetic variances for the BM in the log space for each gene. |
log_variance_sample |
a matrix of size p x n of environmental variances for individual variations in the log space, for each gene and species. Column names should match the tree taxa names. |
For each gene, the log-lambda parameter evolves like a BM on the tree, with an extra independent variance noise that can depend on the species. Each gene has its own tree variance for the BM. Each gene and each species has its own mean. The counts for each gene and each species are then obtained as a Poisson draw with a different lambda parameter, as generated by the BM.
A list, with:
the p x n matrix of log-lambda simulated by the BM on the tree.
the p x n matrix of counts with corresponding Poisson draws.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.