Combine everything in the results list into a single table
Source:R/functions.R
summarize.res.list.RdCombine everything in the results list into a single table
Arguments
- res.list
Named list of lists, where each sublist contains the following names: c('res', 'dds', 'label'). "res" is a DESeqResults object, "dds" is either the indexing label for the dds.list object or the DESeq object, and "label" is a nicer-looking label to use. NOTE: backwards compatibility with older versions of lcdb-wf depends on no dds.list object being passed.
- dds.list
List of DESeqDataSet objects whose names are expected to match 'dds' slots in the 'res.list' object
- dds_mapping
List mapping names of dds.list to res.list elements
- alpha
false-discovery rate threshold
- lfc.thresh
log2FoldChange threshold
- labels
list of descriptions for res.list elements
Examples
# make example DESeq data set
dds <- DESeq2::makeExampleDESeqDataSet()
# run DESeq2
dds <- DESeq2::DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
# make dds list
dds_list <- list(main = dds)
# make comparisons
res1 <- DESeq2::results(dds, contrast=c('condition', 'A', 'B'))
res2 <- DESeq2::results(dds, contrast=c('condition', 'B', 'A'))
# make list of results
res_list <- list(
comp1=res1,
comp2=res2
)
# make dds mapping
dds_mapping <- list(comp1='main', comp2='main')
# get summary
df <- summarize.res.list(res_list, dds_list, dds_mapping, alpha=0.1, lfc.thresh=0)