RGLab / MAST

Tools and methods for analysis of single cell assay data in R
226 stars 57 forks source link

Base of logarithm for fold change #100

Closed khandarius closed 6 years ago

khandarius commented 6 years ago

Hi,

Thanks for the great software. My question concerns the results of the differential expression tests performed with the hurdle model and a likelihood ratio test, like you present in your MAIT vignette (https://bioconductor.org/packages/release/bioc/vignettes/MAST/inst/doc/MAITAnalysis.html). I was wondering about the base of logarithm for the logFC coefficient. In the vignette, you set a fold change threshold using the R function log2(), which implies that the coefficients are in base 2. However, I don't see the base explicitly mentioned in the documentation. What about the output of the MAST function logFC()? I would like to be sure of the base for the results I am reporting.

Best regards, Darius

gfinak commented 6 years ago

The base of the logarithm is whatever you set it to be when you log transform your counts. The documentation states:

Note that for this to be a log-fold change, then the regression for u must have been fit on the log scale. This is returned in the matrix logFC. An approximation of the variance of logFC (applying the delta method to formula defined above) is provided in varLogFC.

So if you took log2 you can interpret a log fold change of 1 as a 2 fold change.

gfinak commented 6 years ago

Can I close this issue?

khandarius commented 6 years ago

Hi Greg,

Thanks for the answer, it's clear to me know. The issue can be closed.

Best regards, Darius