Last chance! 50% off unlimited learning
Sale ends in
This function computes the mean frequency of methylated sites (with methylation state 1) for a set of structures identified as non-islands.
get_nonislandMeanFreqM(
index_nonislands,
data,
sample_n,
categorized_data = FALSE
)
A numeric value representing the mean frequency of methylated sites in the non-islands.
A vector containing the structural indices for non-islands.
A list containing methylation states at tree tips for each genomic structure (island / non-island)
For a single tip: data[[structure]]
.
For multiple tips: data[[tip]][[structure]]
.
Each element contains the methylation states at the sites in a given tip and structure
represented as 0, 0.5 or 1 (for unmethylated, partially-methylated and methylated).
If methylation states are not represented as 0, 0.5, 1 they are categorized
as 0 when value equal or under 0.2
0.5 when value between 0.2 and 0.8
and 1 when value over 0.8.
For customized categorization thresholds use categorize_siteMethSt
The number of samples (tips) to process.
Logical defaulted to FALSE. TRUE to skip redundant categorization when methylation states are represented as 0, 0.5, and 1.
# Example usage:
index_nonislands <- c(1, 3)
data <- list(
list(c(1, 0, 1), c(0.5, 1, 1), c(1, 0, 0.5)), # tip 1
list(c(1, 0.5, 1), c(0.5, 1, 1), c(1, 0.5, 0.5)) # tip 2
)
sample_n <- 2
get_nonislandMeanFreqM(index_nonislands, data, sample_n, categorized_data = TRUE)
Run the code above in your browser using DataLab