get_nonislandMeanFreqM {MethEvolSIM} | R Documentation |
Calculate the Mean Frequency of Methylated Sites in Non-Islands
Description
This function computes the mean frequency of methylated sites (with methylation state 1) for a set of structures identified as non-islands.
Usage
get_nonislandMeanFreqM(
index_nonislands,
data,
sample_n,
categorized_data = FALSE
)
Arguments
index_nonislands |
A vector containing the structural indices for non-islands. |
data |
A list containing methylation states at tree tips for each genomic structure (island / non-island)
For a single tip: |
sample_n |
The number of samples (tips) to process. |
categorized_data |
Logical defaulted to FALSE. TRUE to skip redundant categorization when methylation states are represented as 0, 0.5, and 1. |
Value
A numeric value representing the mean frequency of methylated sites in the non-islands.
Examples
# 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)