R/down.r

Defines functions down

Documented in down

#' Extract down-regulated features from a table of results
#'
#' Extract down-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 down-regulated features
#' @author Hugo Varet

# created Nov 18th, 2014

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