estimateDispersion: Estimates gene dispersions prior to differential expression...

View source: R/fct_dea.R

estimateDispersionR Documentation

Estimates gene dispersions prior to differential expression testing

Description

This function computes the common, trended, and tag-wise dispersions of the genes in an expression dataset. Once the dispersion is estimated, it fits a negative binomial model for each gene using default design : ~group+0. In this configuration, the log average expression of each gene is approximated by a linear combination of each of the conditions. It returns a the value of a glmFit object from the package edgeR, containing the attributes of the tcc object given, plus fitted values and GLM coefficients, among other indicators of the fitting procedure.

Usage

estimateDispersion(tcc, conditions = NULL)

Arguments

tcc

TCC-class object containing counts, and norm factors, such as obtained after DIANE::normalize() and DIANE::filter_low_counts() functions

conditions

if NULL (default), takes the split before the character '_' in your expression data column names as condition names. (This is how condition names should be formatted to be used in DIANE.) Else, the conditions are specified by the user, as a character vector. Its order should match the columns names of the expression matrix used to build the tcc object.

Value

glmFit object from edgeR, which is the resulting model estimation

Note

The return value is meant to be used directly as the parameter of DIANE::estimateDEGs()

Examples

data("abiotic_stresses")
tcc_object <- DIANE::normalize(abiotic_stresses$raw_counts, 
abiotic_stresses$conditions, iteration = FALSE)
threshold = 10*length(abiotic_stresses$conditions)
tcc_object <- DIANE::filter_low_counts(tcc_object, threshold)
fit <- DIANE::estimateDispersion(tcc = tcc_object, conditions = abiotic_stresses$conditions)

OceaneCsn/DIANE documentation built on Jan. 10, 2024, 6:43 p.m.