View source: R/summaryStatistics.R
compute_fitch | R Documentation |
This function applies Fitch parsimony to determine the minimum number of changes required for methylation categories at tree tips.
compute_fitch(tree, meth, input_control = TRUE)
tree |
A rooted binary tree in Newick format (character string) or as an |
meth |
A matrix of methylation categories at the tree tips, with rows corresponding to tips (names matching tree tip labels) and columns corresponding to sites or structures. |
input_control |
Logical; if |
A list containing:
optStateSet
A list of sets of optimal states for the root at each site/structure.
minChange_number
A numeric vector indicating the minimum number of changes for each site.
tree <- "((a:1,b:1):2,(c:2,d:2):1.5);"
meth <- matrix(c("u", "m", "p", "u", "p", "m", "m", "u"),
nrow=4, byrow=TRUE, dimnames=list(c("a", "b", "c", "d")))
compute_fitch(tree, meth)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.