format_de_results: Minimal formatting of de results

View source: R/DE.R

format_de_resultsR Documentation

Minimal formatting of de results

Description

This function will call DESeq2::results on the dds object and add the informations from txi$anno using a full join. This means that the id that were removed in the dds production step by filtering the rows with a small number of counts will be re-included in the results. In this case, the log2FoldChange, the pvalue and the padj columns will all be NA.

Usage

format_de_results(dds, txi, contrast, keep_stats = TRUE, add_mean_dds = FALSE)

Arguments

dds

The DESeqDataSet object returned by deseq2_analysis.

txi

The txi object returned by the import_kallisto function.

contrast

A vector describing the contrasts in the c("<comp_group>", "<comp1>", "<comp2>") format.

keep_stats

Keep baseMean, lfcSE and stat values in the results? Default: TRUE.

add_mean_dds

Add the mean DESeq normalization value for each group of the comparison. Default: FALSE

Value

A data.frame with the id, ensembl_gene, symbol, entrez_id, transcript_type, log2FoldChange, pvalue, padj columns.

Examples

txi <- get_demo_txi()
design <- get_demo_design()
dds <- deseq2_analysis(txi, design, ~ group)
de_res <- format_de_results(dds, txi,  c("group", "A", "B"))


CharlesJB/rnaseq documentation built on Oct. 17, 2023, 5:37 p.m.