Perform differential gene expression analysis with DESeq2
run_deseq2( counts, pd, id_col = NULL, cond_col, cond_levels = NULL, lfc_threshold = 0, sig_threshold = 0.01, dge_calling_strategy = "bulk", subset_feature = NULL, subset_sample = NULL, deseq_opts = list(), lfc_shrink_opts = list(), return_dds = FALSE, BPPARAM = BiocParallel::SerialParam() )
| counts | Can be either:
|
|---|---|
| pd | Data frame with at least a column of sample/cell identifiers (rownames or specified in |
| id_col | Name of the column in |
| cond_col | Name of the column in |
| cond_levels | Define two levels/groups of |
| lfc_threshold | Specify a log2 fold change threshold (on log2 scale) to test against. 0 implicates no threshold. |
| sig_threshold | Specify a significance threshold for the results adjusted p-values or s-values. 1 implicates no threshold. |
| dge_calling_strategy | Should be either 'bulk' or 'sc'. Specify the type of the provided data (bulk or single-cell RNA-seq) so that appropriate parameters can be applied. |
| subset_feature | Subsets the provided count matrix to only specified features. Can be names, indices or logicals. |
| subset_sample | Subsets the provided count matrix to only specified samples. Can be names, indices or logicals. |
| deseq_opts | Manually specify parameters for the |
| lfc_shrink_opts | Manually specify parameters for the |
| return_dds | Should the DESeqDataSet object be returned? |
| BPPARAM | If multicore processing should be used, specify a |
A list with the analysis results and parameters:
results_all: Data frame of the DGE test results for all analyzed genes.
results_sig: Data frame of the significant DEG test results, according to the specified parameters (sig_threshold, lfc_threshold).
dds: The DESeqDataSet of the analysis, if return_dds=TRUE.
drim: Results of the DRIMSeq statistical computations (dmTest()).
sval_threshold / adjp_threshold: The given significance threshold used to either filter s-values or adjusted p-values.
comparison: A string representation of the performed comparison.
condition1: The first condition of the performed comparison.
condition2: The second condition of the performed comparison.
sample_table: The (filtered) sample table (pd) - including the condition column used for comparison.
deseq_opts: A list of used DESeq parameters.
lfc_shrink_opts: A list of used lfcShrink parameters.
Offers functionality to perform a DGE analysis for bulk and single-cell data with DESeq2, automatically applying recommended models and parameter settings.
It is strongly advised to provide 'raw' count data, as imported with import_dge_counts().
Installation of package 'apeglm' is recommended for LFC-shrinkage, for single-cell data the package 'glmGamPoi' is additionally recommended.
For questions about DESeq2, LFC-shrinkage or s-values, please refer to the excellent DESeq2 vignette.
import_dge_counts() for correct import of gene-level counts. combine_to_matrix() to summarize scRNA counts to one matrix.
Other DTUrtle DGE:
import_dge_counts()