satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.28k stars 910 forks source link

Get an expression table that matches what FoldChange function uses #9376

Open DelongZHOU opened 2 weeks ago

DelongZHOU commented 2 weeks ago

Hello,

I want to make sanity checks for the FoldChange of differential expression analysis. At the moment I'm using the output from AggregateExpression to estimate the expression level, but for about 10% of the genes the direction of AggregateExpression and direction of FoldChange do not match.

This is discussed in issue #8682 and I appreciate the argument involving number of cells - but this still doesn't match when I take the average per cell.

In one of my analysis I have a pair of genes showing opposite sign of L2FC, but they both show higher value in treatment vs control for the sum of normalized count (AE over data slot) , and average normalized count (the previous sum divided by number of cells in each condition).

If AggregateExpression is not the best way to get the expression table, which function should I use?

Thank you! PS, I'm using Seurat 4.4.0.

DelongZHOU commented 2 weeks ago

Bump - any suggestions is welcome! Thank you!

roi-meir commented 1 week ago

How many samples do you have? For a small number of samples, there is an issue with the added pseudocount See this issue for more details - FoldChange results depend on the group size

DelongZHOU commented 1 week ago

I have 3 to 5 / condition x 3 conditions

But you are using Seurat 5.1 and I'm using Seurat 4.4.0, the change in pseudocount behavior happened between the two versions.

roi-meir commented 1 week ago

I missed the version you are using.

Can it be related to the issue mentioned here https://github.com/satijalab/seurat/issues/6701? From the documentation, it was fixed by v4.4 but here someone mentions that it wasn't fixed for all cases, so it may be relevant to you.