View source: R/reduce_to_regions.R
reduce_to_regions | R Documentation |
Reduce several beta values from different CpG sites to a single beta value associated to one genomic region (such as CpG islands). Different technologies retrieve DNA methylation levels of different CpG sites. This function makes possible a direct comparison.
reduce_to_regions( beta_table, cpg_sites, cpg_regions, min_CpGs = 3, method = c("median", "mean") )
beta_table |
A matrix of beta-values. |
cpg_sites |
A data.frame reporting the genomic location of CpG sites. |
cpg_regions |
A data.frame reporting the genomic location of genomic regions. |
min_CpGs |
An integer (default=3). Minimum number of CpG sites within a single genomic region (return NA otherwise). |
method |
Function to summarise a region: either 'median' or 'mean' (default=median). |
A matrix of beta values, each row corresponding to one region.
reduced_data <- reduce_to_regions(bs_seq_toy_matrix, bs_seq_toy_sites, cpg_islands[1:10,])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.