R/Cleanup.R

Defines functions Cleanup

Documented in Cleanup

#' Cleans up topTable results
#' converts logFC to FC
#' @param vals : output from topTable
#' @return Dataframe with limma output
#' @export
#' @examples
#' Cleanup()

Cleanup <-function(tt){
  res <- tt %>% mutate(fc = ifelse(logFC<0, -1*2^abs(logFC),2^logFC)) %>%
    select(ENSEMBL,SYMBOL,ENTREZID,biotype,geneloc,logFC,fc,P.Value,adj.P.Val,t)
    rownames(res) <- rownames(tt)
    return(res)
}
Morriseylab/ExpressExtras documentation built on April 2, 2022, 9:36 a.m.