View source: R/summaryStatistics.R
computeFitch_islandGlbSt | R Documentation |
This function categorizes CpG islands into methylation states and applies Fitch parsimony to estimate the minimum number of state changes in a phylogenetic tree.
computeFitch_islandGlbSt(
index_islands,
data,
tree,
u_threshold,
m_threshold,
testing = FALSE
)
index_islands |
A numeric vector specifying the indices of genomic structures corresponding to islands. |
data |
A list containing methylation states at tree tips, structured as |
tree |
A rooted binary tree in Newick format (character string) or as an |
u_threshold |
A numeric threshold value (0-1) defining the unmethylated category. |
m_threshold |
A numeric threshold value (0-1) defining the methylated category. |
testing |
Logical; if |
The function first validates the input data and categorizes CpG islands using categorize_islandGlbSt
.
It then structures the data into a matrix matching tree tip labels and applies compute_fitch
to infer the minimum number of changes.
If testing = TRUE
, returns a list containing the categorized data matrix; otherwise,
returns a numeric vector of minimum state changes.
tree <- "((a:1,b:1):2,(c:2,d:2):1.5);"
data <- list(
list(rep(1,10), rep(0,5), rep(1,8)),
list(rep(1,10), rep(0.5,5), rep(0,8))
)
index_islands <- c(1,3)
computeFitch_islandGlbSt(index_islands, data, tree, 0.2, 0.6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.