#' subset DMRcate output
#'
#' filter differentially methylated regions for gene annotation and minimum number of probes
#'
#' @param res.obj A \code{dmrcate.output} object, generated by \code{DMRcate::dmrcate()}
#' @param rmBlankAssoc Logical. If \code{TRUE}, removes regions that have no known genes in the region
#' @param min.no.probes Integer specifying the minimum number of CpG sites per DMR to keep in the results object (must be at least 1)
#'
#' @export
#'
subset.dmrcate <- function(res.obj, rmBlankAssoc = T, min.no.probes = 5){
foo <- res.obj
if(rmBlankAssoc)
foo$results <- subset(res.obj$results, gene_assoc != '')
foo$results <- subset(foo$results, no.probes >= min.no.probes)
foo
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.