gen.equal.star.anc.dec {phyclust} | R Documentation |
Generate comprehensive trees for simulation studies.
gen.equal.star.anc.dec(K, N.K, rate.f = 0.5)
K |
number of clusters, K. |
N.K |
number of sequences for each cluster, a vector with length |
rate.f |
r_f, growth rate ratio of ancestral and descendent trees. |
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' |
r_f, growth rate ratio of ancestral and descendent trees. |
'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: http://snoweye.github.io/phyclust/
## 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)