## TL;DR

One of the classes you are comparing has no detectable expression for a gene. The log-fold change is trying to get an estimate of effect size, but that is not well-defined when we never observe expression in a class. P-values from `lrTest`

or `waldTest`

are still well-defined.

## Fine print

From the two-part model MAST defines, we derive an estimate of the log-fold change in expression between conditions 1 and 0 as

$$ E(U_1)E(V_1) - E(U_0)E(V_0) $$

where $V_1 = 1$ when expression $Y_1$ exceeds the hurdle value and $U_1 = Y_1$ given $V_1=1$. ($V_0, U_0$ are defined analogously). See ?logFC for more details.

The estimates for these expectations come from the fitted model, and when we never exceed the hurdle in a condition 0 or 1, there is no information by which to estimate $E(U)$. You might be tempted to set it to zero, but that's not quite right since we are operating on a log-scale, so minus infinity would be what is needed for mathematical consistency. In any case, this still doesn't give us a confidence interval or a significance test.

There is experimental support to estimate $U$ in this case by applying a shrinkage prior (essentially imputing in these cases) by setting `useContinuousBayes = TRUE.`

I can't really recommend this in the current version (`MAST_1.3.1`

) because the fit seems to be somewhat numerically unstable and fails to converge at times. We are trying to fix this in the next version.