scCATCH icon indicating copy to clipboard operation
scCATCH copied to clipboard

"logfc" parameter in findmarkergene(), log2 or log10?

Open Leorio183 opened this issue 7 months ago • 5 comments

Anyone tell me?

Leorio183 avatar Jun 30 '25 11:06 Leorio183

Hello. It represents log1p in Seurat

multitalk avatar Jun 30 '25 11:06 multitalk

sorry, I still can't understand, I know in Seurat, there is a parameter "base" in FindAllMarkers(), with this "base", I know the logfc means log base (FC), and the base = 2 in default.

Image However, no information about the base in logfc parameter in findmarkergene() in scCATCH.

This makes me really frustrated. I just mean, A compare to B, if A/B=2, then the logfc = ? in the function.

Thank you very much!

Leorio183 avatar Jun 30 '25 12:06 Leorio183

I am very sorry, but i really can't understand. I don't know the base in the logfc calculation.

Leorio183 avatar Jun 30 '25 12:06 Leorio183

I know log1p(x) means loge(1+x), also known as ln (1+x). This means when logfc is set to 0.25 by default, then we get: ln (1+x) = 0.25, where x is the fold change. Then Foldchange = 0.28?

We compare to seurat, when we set logfc = 1, we get Foldchange = 2^1 = 2.

So i am very confused about the default setting logfc = 0.25, this means it is not actually select up-regulated marker, since the Foldchange is 0.28

Leorio183 avatar Jun 30 '25 12:06 Leorio183

I think it depends on which data you used as input.

As the default/expected input here is normalized expression matrix(Seurat NormalizeData()), which is `xnorm <- log1p(x = x / sum(x) * scale.factor) from Seurat.

In scCATCH, logfc is computed as: The default logfc =0.25 here based on NormalizeData(), which is(mean(log1p(expr_A)) - mean(log1p(expr_B))) ≥ 0.25, means ~1.28x upregulation https://github.com/ZJUFanLab/scCATCH/blob/06c6ffb960795d028c675643f0d22fbc78080a97/R/utils.R#L148

This is just a difference in expression values, based on the input normalized expression matrix. scCATCH does not further apply any log operation when computing logfc.

ShanshanHe-44 avatar Jul 28 '25 15:07 ShanshanHe-44