kstreet13 / bioc2020trajectories

Trajectory inference and differential expression over multiple conditions in scRNA-seq
https://kstreet13.github.io/bioc2020trajectories/
Other
25 stars 6 forks source link

fgsea directionality #4

Open Jay-Leung opened 2 years ago

Jay-Leung commented 2 years ago

Hello!

Thanks for the amazing workshop, it was very useful.

I was following the https://hectorrdb.github.io/bioc2021trajectories/articles/TGFB.html for my own single cell analysis, and ran fgsea with the Wald's statistics from the assocRes. However, I realised that if I tried to plot the enrichment plots, the BPs that I expect to be downregulated with increasing pseudotime (in this case cell cycle) are also shown as upregulated in the enrichment plots. Those BPs that I expect to be upregulated (differentiation terms) are correctly shown as upregulated, but if I try to sieve out the downregulated BPs, there is none.

I thought this could be perhaps due to the dfs (6 in my case), thus Wald's test does not look at directionality. I then tried StartvsEnd (df =1) and ran fgsea again, but again the downregulated BPs are flat (no negative enrichment plots).

Can I check if this is because the Wald's test in tradeseq does not look at directionality? This would be a very useful tool for looking at trajectory analysis.

Thanks!

Regards, Jay

koenvandenberge commented 2 years ago

Hi @Jay-Leung,

The Wald test indeed does not look at the directionality of the differences in average expression. You may be able to approximate this by using the log fold-changes provided in the output for some tests, e.g., by multiplying the Wald test statistic with the sign of the fold-changes. Note that this may not be optimal. The fold-changes (and hence their signs) can vary drastically as a function of pseudotime, and it is therefore likely only a good solution for genes with a constant sign of the log fold-change..

Hope this helps.

Evenlyeven commented 2 years ago

Hi @Jay-Leung,

The Wald test indeed does not look at the directionality of the differences in average expression. You may be able to approximate this by using the log fold-changes provided in the output for some tests, e.g., by multiplying the Wald test statistic with the sign of the fold-changes. Note that this may not be optimal. The fold-changes (and hence their signs) can vary drastically as a function of pseudotime, and it is therefore likely only a good solution for genes with a constant sign of the log fold-change..

Hope this helps.

Hi @koenvandenberge ,

Thanks for developing the tool and the helpful workshop!

I wonder if you could provide a little more details about why "The Wald test indeed does not look at the directionality of the differences in average expression." in this case, while the Wald test of DESeq2 does. Is it because the different models used in the data analysis (NBGAM vs NB)? I had a hard time fully understanding it. Thanks a lot in advance!

Di