Given a glmFit model, performs log ratio tests using edgeR function glmLRT and returns the genes that are differentially expressed between the reference and perturbation conditions. log ratios are expressed as log(perturbation/reference)
estimateDEGs(fit, reference, perturbation, p.value = 1, lfc = 0)edgeR glmFit
condition (or a vector of conditions) being considered as the reference for differential analysis. It should corresponds to a condition name, e.g. the string before the underscore and replicate number in your sample names.
condition (or a vector of conditions) to compare to the reference for differential analysis. It should corresponds to a condition name, e.g. the string before the underscore and replicate number in your sample names.
numeric cutoff value for adjusted p-values. Only tags with adjusted p-values equal or lower than specified are returned
minimal absolute log fold change required for a gene to be considered as differentially expressed.
topTags object, which table element contains DEGs dataframe.
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)
topTags <- DIANE::estimateDEGs(fit, reference = "C", perturbation = "H", p.value = 0.01)
DEGs <- topTags$table
head(DEGs)
#> genes logFC logCPM LR PValue FDR
#> AT4G12400.2 AT4G12400.2 7.756985 7.564179 2257.898 0.000000e+00 0.000000e+00
#> AT5G48570.1 AT5G48570.1 7.067740 8.853736 1961.261 0.000000e+00 0.000000e+00
#> AT5G12110.1 AT5G12110.1 5.939007 7.952267 2181.249 0.000000e+00 0.000000e+00
#> AT5G64510.1 AT5G64510.1 5.879517 6.067228 2209.460 0.000000e+00 0.000000e+00
#> AT2G19310.1 AT2G19310.1 4.212069 7.686615 1377.818 1.388536e-301 5.347531e-298
#> AT2G29500.1 AT2G29500.1 7.731411 9.482692 1264.481 5.917282e-277 1.899053e-273
# For multiple conditions
topTags <- DIANE::estimateDEGs(fit, reference = "C", perturbation = c("H","M","S"), p.value = 0.01)
DEGs <- topTags$table
head(DEGs)
#> genes logFC logCPM LR PValue FDR
#> AT5G48570.1 AT5G48570.1 2.944751 8.853736 492.3495 4.391161e-109 8.455619e-105
#> AT5G12110.1 AT5G12110.1 2.448426 7.952267 489.9542 1.458099e-108 1.403858e-104
#> AT5G64510.1 AT5G64510.1 2.489492 6.067228 335.8761 5.046597e-75 3.239242e-71
#> AT4G12400.2 AT4G12400.2 3.016083 7.564179 327.8235 2.863125e-73 1.378309e-69
#> AT2G19310.1 AT2G19310.1 1.661515 7.686615 302.5988 8.945014e-68 3.444904e-64
#> AT1G07350.1 AT1G07350.1 1.396260 7.417268 262.5607 4.746310e-59 1.523249e-55