natural log used in Seurat for differential expression
1
0
Entering edit mode
2.5 years ago
nix • 0

Hi all, I have recently taken up some single cell analysis, and would like to use Seurat for differential expression.

I notice they use log fold change (natural log) to transform fold changes. I would have thought that log2 is more interpretable (and more often-used) than natural log in the case of fold change. Is there an advantage to using the natural log over log2 ?

RNA-Seq seurat differential expression • 3.7k views
1
Entering edit mode

I agree that, in bioinformatics, log2 is so often used and easily interpretable that should be the default option of any tool.

3
Entering edit mode
2.5 years ago

I guess, it's just a matter of choice of Seurat developers. And in fields other than bioinformatics, natural log is the one most widely used - one of the major reasons is that the exponential function (e^x), which is the reciprocal "cousin" of natural log, comes naturally in many calculations - like differentials and integrals and by extension in the sums of infinite series. No surprise that e is also defined as the limiting sum of the infinite series (1 + 1/n)^n as n approaches infinity

Changing the base of log amounts to multiplying by a constant factor

log2(N) = log2(e) * ln(N)


So it doesn't affect the performance of downstream analyses like clustering, PCA etc as most of these analyses are invariant to scaling transformations (i.e they do not change if all the values are multiplied by a constant number).

PS: The best way to convince is to try yourself. Try to run the analyses by multiplying with a constant factor and see if the downstream results change. You may add a different scaling factor than 10000 while normalizing

NormalizeData(object, assay.type = "RNA", normalization.method = "LogNormalize", scale.factor = 10000, display.progress = TRUE)