inmoose.edgepy.glmQLFTest
- inmoose.edgepy.glmQLFTest(glmfit, coef=None, contrast=None, poisson_bound=True)
Conduct genewise statistical tests for a given coefficient or contrast
Implement one of the quasi-likelihood (QL) methods of [Lund2012], with some enhancements and with slightly different glm, trend and FDR methods. See [Lun2016] or [Chen2016] for tutorials describing the use of
glmQLFit()andglmQLFTest()as part of a complete pipeline. Another case study usingglmQLFit()andglmQLFTest()is given in Section 4.7 of the edgeR User’s Guide.glmQLFTest()is similar toglmLRT()except that it replaces likelihood ratio tests with empirical Bayes quasi-likelihood F-tests. The p-values fromglmQLFTest()are always greater than or equal to those that would be obtained fromglmLRT()using the same negative binomial dispersions.Note
The negative binomial dispersions
dispersionsupplied toglmQLFit()andglmQLFTest()must be based on a global model, that is, they must be either trended or common dispersions. It is not correct to supply genewise dispersions becauseglmQLFTest()estimates genewise variability using the QL dispersion.- Parameters:
glmfit (DGEGLM) – a
DGEGLMobject, usually output fromglmQLFit()coeff (int or string array) – indicated which coefficients of the linear model are to be tested equal to zero. Ignored if
contrastis notNone.contrast (array_like) – vector or matrix specifying one or more contrasts of the linear model coefficients to be tested equal to zero.
poisson_bound (bool) – if
Truethen the p-value returned will never be less than would be obtained for a likelihood ratio test with NB dispersion equal to zero.
- Returns:
an object of class
DGELRTwith the same components as produced byglmLRT(), except that the"stat"column of thetablecontains quasi-likelihood F-statistics. It also storeddf_total, an array containing the denominator degrees of freedom for the F-test, equal todf_prior + df_residual_zeros.- Return type:
DGELRT