Entering edit mode
Hi everyone,
I have read the paper of MAST and I also looked through the issues on github, but I still don't understand how MAST calculates log fold-change.
According to this documentation https://rdrr.io/bioc/MAST/man/logFC.html, the log fold change from contrast0 to contrast1 is defined as u(contrast1)v(contrast1)-u(contrast0)v(contrast0).
But if the model adjusts for some covariates, such as CDR, while I want to compare the gene expressions between two groups of cells, then how is the contrast specified? The CDR's are not the same across the cells in either group.
Thank you
I also figure that what
logFC
calculates isn't really the log-fold change.logfc
calculates $p_1 * log(y_1) - p_0 * log(y_0)$, while log-fold change should be $log(p_1) + log(y_1) - log(p_0) - log(y_0)$Edit: A potential issue of $log(p) + log(y)$ is that it may give non-positive values when p is small. Maybe we can interpret $p*log(y)$ as scaling mean log normalized counts by p.