Question about logFC while using DESeq2 in Seurat
2
0
Entering edit mode
2.6 years ago
suvratha ▴ 60

Hello, the question I have is - log to which base is reported when we use test.use="DESeq2" in the FindMarkers() function?

I know the default logFC while using Wilcoxon test in FindMarkers() is reported in the natural log, is this true when we use DESeq2 as well? I have this doubt as DESeq2 reports FC in log to the base 2 and not natural log.

Thanks Suvi

RNA-Seq seurat single-cell DESeq2 • 1.9k views
1
Entering edit mode
2.6 years ago

I'm not sure but the FindMarkers code suggests it only takes the P value from DESeq2 results when you specify test.use="DESeq2".

0
Entering edit mode

so you mean to say the Log FC reported is natural Log itself like the default?

0
Entering edit mode

Seems so, the relevant line is here: https://github.com/satijalab/seurat/blob/master/R/differential_expression.R#L953 Only p-value is exported from DESeq2 as Arup Ghosh says so FC is calculated elsewhere, you would need to scan the script for it to be sure. I think this is the relevant FC line https://github.com/satijalab/seurat/blob/master/R/differential_expression.R#L539 so natural log.

0
Entering edit mode

Line 552-555 have the code for fold change calculation.

1
Entering edit mode

Yes but that is only the execution, the function declaration starts at 539.

return(log(x = rowMeans(x = expm1(x = x)) + pseudocount.use)) is the relevant part

with ?log:

log computes logarithms, by default natural logarithms,

0
Entering edit mode

Take a look to this lane. LogFoldChange is calculated as Log2

https://github.com/satijalab/seurat/blob/master/R/differential_expression.R#L1414

0
Entering edit mode

What makes you say that? This line is part of a function that is not even exported. Not sure for what it is. Any ideas? It is not (at least not based on this script) related to the DESeq2 function of this script.

1
Entering edit mode
2.6 years ago

In the last version (v2), everything was done on a natural log scale. See

https://github.com/satijalab/seurat/issues/332