SaveResults saves the results for each comparison in results. If chip = FALSE, it will also save normalized gene counts.

SaveResults(results, outpath, dds = NULL, chip = FALSE,
  method = NULL, promoters = NULL, se = NULL, txdb = NULL,
  flank.anno = FALSE, flank.dist = 5000)

Arguments

results

Either:

  • a named list containing named lists containing DESeqResults objects for all comparisons generated by ProcessDEGs, or

  • a DBA object from dba.analyze.

outpath

Path to directory to be used for output.

dds

A DESeqDataSet object as returned by DESeq.

chip

Boolean indicating whether results are from ChIP-seq analysis.

method

Method used for differential binding e.g. DBA_DESEQ2.

Do not quote this parameter, it is a global variable from DiffBind. If a block was used, be sure to include that (e.g. DBA_DESEQ2_BLOCK).

promoters

Scalar vector containing how many basepairs up and downstream of the TSS should be used to define gene promoters.

se

Dataframe containing location informatin for super enhancers.

txdb

TxDb object to use for annotation.

flank.anno

Boolean indicating whether flanking gene information for each peak should be retrieved. Useful for broad peaks and super enhancers. Ignored if chip = FALSE.

flank.distance

Integer for distance from edges of peak to search for flanking genes. Ignored if flank.anno = FALSE.

Details

For RNA-seq results, a table will be saved for each p-value threshold, as the adj. p-value threshold affects the independent filtering step. Counts and log-fold changes will remain the same, but p-values will change slightly as different numbers of genes will be excluded from multiple testing due to low counts.