View source: R/summaryStatistics.R
categorize_siteMethSt | R Documentation |
This function categorizes the values in data[[tip]][[structure]]
into three categories:
0
for unmethylated sites, where values are smaller or equal to u_threshold
.
0.5
for partially methylated sites, where values are between u_threshold
and m_threshold
.
1
for methylated sites, where values are larger or equal to m_threshold
.
categorize_siteMethSt(data, u_threshold = 0.2, m_threshold = 0.8)
data |
A list structured as |
u_threshold |
A numeric value representing the upper bound for values to be classified as unmethylated ( |
m_threshold |
A numeric value representing the lower bound for values to be classified as methylated ( |
If any value in data[[tip]][[structure]]
is outside these categories, it is transformed based on the given thresholds.
A transformed version of data
where each value is categorized as 0
(unmethylated), 0.5
(partially methylated),
or 1
(methylated).
data <- list(
list(c(0.1, 0.2, 0.02), c(0.05, 0.25, 0.15)), # tip 1
list(c(0.01, 0.7, 0.85), c(0.3, 0.1, 0.98)) # tip 2
)
transformed_data <- categorize_siteMethSt(data, u_threshold = 0.2, m_threshold = 0.8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.