powered by
This function categorizes CpG islands into unmethylated, methylated, or partially methylated states based on specified thresholds.
categorize_islandGlbSt(meanMeth_islands, u_threshold, m_threshold)
A character vector of length equal to meanMeth_islands, containing "u", "p", or "m" for each island.
meanMeth_islands
A numeric vector containing the mean methylation levels for CpG islands at each tip.
A numeric value (0-1) defining the threshold for categorization as unmethylated.
A numeric value (0-1) defining the threshold for categorization as methylated.
The function assigns each island a state:
if mean methylation lower or equal to u_threshold
u_threshold
if mean methylation greater or equal to m_threshold
m_threshold
if mean methylation is in between
meanMeth_islands <- c(0.1, 0.4, 0.8) categorize_islandGlbSt(meanMeth_islands, 0.2, 0.8)
Run the code above in your browser using DataLab