View source: R/p_tool_star_tree.r
gen.equal.star.anc.dec | R Documentation |
Generate comprehensive trees for simulation studies.
gen.equal.star.anc.dec(K, N.K, rate.f = 0.5)
K |
number of clusters, |
N.K |
number of sequences for each cluster, a vector with length |
rate.f |
|
These functions generates an ancestral tree in K tips and
generates descendent trees according to N.K
tips.
All trees, ancestral and descendent, are coerced to star shapes
and scaled their heights to fit the ratio rate.f
, and
the final tree has total height 1.
The returns are stored in a list, and the final tree is stored
with a name equal.star
.
A list contains all information of generation and results including:
'K' |
number of clusters. |
'N.K |
number of sequences for each cluster. |
'rate.f' |
|
'anc' |
an ancestral tree. |
'dec' |
all descendent trees. |
'equalstar' |
a tree that descendants are equal star trees. |
Wei-Chen Chen wccsnow@gmail.com
Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/
gen.unit.K
.
## Not run:
library(phyclust, quiet = TRUE)
set.seed(1234)
tree.K <- gen.equal.star.anc.dec(6, rep(3:5, 2),
rate.f = 0.7)
X.class <- as.numeric(gsub("d(.).(.)", "\\1",
tree.K$equal.star$tip.label))
# Plot results
plotnj(tree.K$equal.star, X.class, type = "p",
edge.width.class = 2, main = "equal.star")
axis(1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.