inmoose.edgepy.glmLRT
- inmoose.edgepy.glmLRT(glmfit, coef=None, contrast=None)
Conduct genewise statistical tests for a given coefficient or coefficient contrast.
This function implements one of the GLM methods developed by [McCarthy2012].
glmLRT()conducts likelihood ratio tests for one or more coefficients in the linear model. Ifcoefis used, the null hypothesis is that all the coefficients indicated bycoefare equal to zero. Ifcontrastis non-null, then the null hypothesis is that the specified contrasts of the coefficients are equal to zero. For example, a contrast of[0,1,-1], assuming there are three coefficients, would test the hypothesis that the second and third coefficients are equal.- Parameters:
glmfit (DGEGLM) – a
DGEGLMobject, usually output fromglmFit()coef (array_like of integers or strings) – vector indicating which coefficients of the linear model are to be tested equal to zero. Values must be column indices or column names of
design. Defaults to the last coefficient. Ignored ifcontrastis specified.contrast (array or matrix of integers) – vector or matrix specifying one or more contrasts of the linear model coefficients to be tested equal to zero. Number of rows must equal to the number of columns of
design. If specified, then takes precedence overcoef.
- Returns:
dataframe with two additional components:
fitcontaining the result ofglmFit()comparison, string describing the coefficient or the contrast being tested
The dataframe has the same rows as
yand is ready to be displayed bytopTags(). It contains the following columns:"log2FoldChange", log2-fold-change of expression between conditions being tested."lfcSE", standard error of log2-fold-change."logCPM", average log2-counts per million, the average taken over all libraries iny."stat", likelihood ratio statistics."pvalue", p-values.
- Return type:
DGELRT