View source: R/summaryStatistics.R
get_islandMeanFreqP | R Documentation |
This function computes the mean frequency of partially methylated sites (with methylation state 0.5) for the set of genomic structures identified as islands.
get_islandMeanFreqP(index_islands, data, sample_n, categorized_data = FALSE)
index_islands |
A vector containing the structural indices for 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. |
A numeric value representing the mean frequency of partially methylated sites in the islands.
# Example usage:
index_islands <- c(1, 3)
data <- list(
list(c(0.5, 1, 0.5), c(0, 0.5, 1), c(1, 0, 0.5)), # tip 1
list(c(0.5, 0.5, 0), c(1, 0.5, 0.5), c(0.5, 0.5, 1)) # tip 2
)
sample_n <- 2
get_islandMeanFreqP(index_islands, data, sample_n, categorized_data = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.