Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LogFC calculation in FindMarkers #8738

Closed
person-c opened this issue Apr 7, 2024 · 2 comments
Closed

LogFC calculation in FindMarkers #8738

person-c opened this issue Apr 7, 2024 · 2 comments

Comments

@person-c
Copy link

person-c commented Apr 7, 2024

Hello, when I manully calculated the log2FC, I found the result was different from the FindMarkers function; When I check the soure code I found this function calculating logFC like this:
23c4796d9cbcfb9db36d7cf754c0bc2

I tested this code manully, and its result were the same as the FindMarkers function:
96003edab84cb60cf44fa535afe38e9

However, what I previoussly thought the meaning of logFC is the log(avg_A/avg_B) ; this caculation seems not like this(I know the add 1 operation to avod zero but don't understand why calculate e(x)), are there any reasons behind this?; And I found there was a big difference between this function's result and results from direct calculation;

log2(mean(MNRAKO)/mean(MNRALC)) = -0.16

This will cause a different result when I choose the logFC cretia to filter some genes. Which one should I choose better?

@morallawwithin
Copy link

See #6701

@person-c
Copy link
Author

See #6701

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants