DEG_model_results: Get DESeq2 model results from DESeqDataSet

View source: R/Dif_expression_helpers.R

DEG_model_resultsR Documentation

Get DESeq2 model results from DESeqDataSet

Description

Get DESeq2 model results from DESeqDataSet

Usage

DEG_model_results(ddsMat_rna, target.contrast, pairs, p.value = 0.05)

Arguments

ddsMat_rna

a DESeqDataSet object with results stored as metadata columns.

target.contrast

a character vector, default design[1]. The column in the ORFik experiment that represent the comparison contrasts. By default: the first design factor of the full experimental design. This is the factor you will do the comparison on. DESeq will normalize the counts based on the full design, but the log fold change values will be based on this contrast only. It is usually the 'condition' column.

pairs

list of character pairs, the experiment contrasts. Default: combn.pairs(unlist(df.rfp[, target.contrast])

p.value

a numeric, default 0.05 in interval (0,1). Defines adjusted p-value to be used as significance threshold for the result groups. I.e. for exclusive translation group significant subset for p.value = 0.05 means: TE$padj < 0.05 & Ribo$padj < 0.05 & RNA$padj > 0.05.

Value

a data.table

Examples

## Simple example (use ORFik template, then use only RNA-seq)
df <- ORFik.template.experiment()
df.rna <- df[df$libtype == "RNA",]
design(df.rna) # The full experimental design
target.contrast <- design(df.rna)[1] # Default target contrast
#ddsMat_rna <- DEG_model(df.rna, target.contrast)
#pairs <- combn.pairs(unlist(df[, target.contrast]))
#dt <- DEG_model_results(ddsMat_rna, target.contrast, pairs)

JokingHero/ORFik documentation built on Dec. 21, 2024, 12:01 a.m.