An important downstream analysis following differential expression from RNA sequencing (RNA-Seq) or DNA methylation analysis is the gene set testing to relate significant genes or CpGs to known biological properties. However, the traditional gene set testing approaches result in biased P-values due to the difference in gene length. Existing methods accounting for length bias were primarily developed for RNA-Seq data. For DNA methylation data profiled using the Illumina arrays, separate methods adjusting for the number of CpGs instead of gene length are necessary.