fit_glm | R Documentation |
The idea is to extract the importance and effect of each factor. To do so, the expression of each gene is modeled as a Poisson distribution. The log of its parameter (the expected value) is approximated by a linear combination of the factors in the experiment. The coefficients associated to each factors are estimated to fit gene expression, and can be insightful to characterize genes behavior in a particular cluster. The model with interactions is considered. It your design in not a complete crossed design, the interaction term will be null.
fit_glm(normalized_counts, genes, design, factors = colnames(design))
normalized_counts |
normalized counts |
genes |
genes belonging to a specific expression-based clusters |
design |
experimental design as a dataframe |
factors |
factors to use for the fit (defalut is all the factors of the design) |
glm object
Note that we can only apply a glm fit to a set of genes that have very close expression profiles accros conditions, else we would have to introduce a new variable related to the genes themselves.
data("abiotic_stresses")
genes_cluster <- DIANE::get_genes_in_cluster(
abiotic_stresses$heat_DEGs_coseq_membership, cluster = 3)
glm <- DIANE::fit_glm(abiotic_stresses$normalized_counts, genes_cluster,
abiotic_stresses$design)
summary(glm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.