Calculate gene-level methylation for a dataset containing CpGs from the Illumina 450k and 850k human methylation arrays.
Gene-level methylation is calculated as the median beta-value among CpG islands in the gene promoter region.
Note that gene names that originally contained a hyphen (-) are replaced with a period (.)
     
    
    Usage
    gene.methylation(methy, print.progress = TRUE)
 
    
    Arguments
- methy
- methylation dataset where rownames give patient ids and columns use CpG ids 
- print.progress
- TRUE/FALSE to show progress bar 
 
    
    Examples
    data(example.data);
### full example (may take a few mins to run)
#example.data.gene.methy <- gene.methylation(example.data);
### fast example
set.seed(123);
example.data <- example.data[,sample(1:ncol(example.data), 10)];
example.data.gene.methy <- gene.methylation(example.data);