R/getEpiTOC.R

Defines functions getEpiTOC

Documented in getEpiTOC

getEpiTOC <- function(df,keepcpgs.epitoc=TRUE){
  common.v <- intersect(rownames(df),EpiTOCcpgs);
  map.idx <- match(common.v,rownames(df));
  return.df <- data.frame(EpiTOC.Est=colMeans(df[map.idx,]));
  return.list <- list(return.df); names(return.list) <- "EpiTOC.Est"
  
  message("Number of available epiTOC CpGs: ",length(common.v),"/",length(EpiTOCcpgs),".",sep="")

  if(keepcpgs.epitoc){
    return.list <- append(return.list,list(common.v))
    names(return.list)[[length(return.list)]] <- "Epitoc.CpGs.Used"
  }
  return(return.list)
}
metamaden/cgageR documentation built on May 20, 2019, 5:07 p.m.