R/up.r

Defines functions up

Documented in up

#' Extract up-regulated features from a table of results
#'
#' Extract up-regulated features from a table of results
#'
#' @param complete an element of the list created by of \code{exportComplete.DESeq2()} or \code{exportComplete.DESeq2()}
#' @param alpha significance threshold to apply to the adjusted p-values
#' @return A \code{data.frame} containing the results of the differential analysis (counts, FC, log2FC, p-value, etc.) for the up-regulated features
#' @author Hugo Varet

# created Nov 18th, 2014

up <- function(complete, alpha=0.05){
  if (!is.null(complete$betaConv)){
    up <- complete[which(complete$padj <= alpha & complete$betaConv & complete$log2FoldChange>=0),]
  } else{
    up <- complete[which(complete$padj <= alpha & complete$log2FoldChange>=0),]
  }
  up <- up[order(up$padj),]
  up
}
biomics-pasteur-fr/RNADiff documentation built on Aug. 27, 2020, 12:44 a.m.