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

fgsea directionality #4

Open
Jay-Leung opened this issue Feb 5, 2022 · 2 comments
Open

fgsea directionality #4

Jay-Leung opened this issue Feb 5, 2022 · 2 comments

Comments

@Jay-Leung
Copy link

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
Copy link
Collaborator

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
Copy link

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

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

3 participants