Generate comprehensive trees for simulation studies.
gen.equal.star.anc.dec(K, N.K, rate.f = 0.5)
A list contains all information of generation and results including:
number of clusters.
number of sequences for each cluster.
an ancestral tree.
all descendent trees.
a tree that descendants are equal star trees.
number of clusters,
number of sequences for each cluster, a vector with length K
.
Wei-Chen Chen wccsnow@gmail.com
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
.
Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/
gen.unit.K
.
if (FALSE) {
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)
}
Run the code above in your browser using DataLab