R/fct_dea.R
estimateDispersion.Rd
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.
estimateDispersion(tcc, conditions = NULL)
tcc | TCC-class object containing counts, and norm factors, such as obtained after
|
---|---|
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. |
glmFit object from edgeR, which is the resulting model estimation
The return value is meant to be used directly as the parameter of
DIANE::estimateDEGs()
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)#> Warning: norm factors don't multiply to 1