Learn R Programming

MethEvolSIM (version 0.2)

categorize_islandGlbSt: Categorize Global States of CpG Islands

Description

This function categorizes CpG islands into unmethylated, methylated, or partially methylated states based on specified thresholds.

Usage

categorize_islandGlbSt(meanMeth_islands, u_threshold, m_threshold)

Value

A character vector of length equal to meanMeth_islands, containing "u", "p", or "m" for each island.

Arguments

meanMeth_islands

A numeric vector containing the mean methylation levels for CpG islands at each tip.

u_threshold

A numeric value (0-1) defining the threshold for categorization as unmethylated.

m_threshold

A numeric value (0-1) defining the threshold for categorization as methylated.

Details

The function assigns each island a state:

"u"

if mean methylation lower or equal to u_threshold

"m"

if mean methylation greater or equal to m_threshold

"p"

if mean methylation is in between

Examples

Run this code
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