davidaknowles / leafcutter

Annotation-free quantification of RNA splicing. Yang I. Li, David A. Knowles, Jack Humphrey, Alvaro N. Barbeira, Scott P. Dickinson, Hae Kyung Im, Jonathan K. Pritchard
http://davidaknowles.github.io/leafcutter/
Apache License 2.0
203 stars 113 forks source link

Delta psi is inconsistent in Leafviz #243

Closed hanyizhou123 closed 1 year ago

hanyizhou123 commented 1 year ago

Hi-Thank you for your great work! I encountered some issues when I tried to visualize my difference analysis using leafviz, and I noticed that the delta psi in the table was not equal to the difference in psi in the figure. When I went to the official website of Leafcutter to view sample images, I also noticed this situation. As shown in the example image on the official website, in the table below, the delta psi of intron ”a“ is -0.124, while the difference in values in the figure is 0.13-0.65=-0.52. Perhaps I misunderstood the meaning of the values in the figure, but I can't figure it out. I hope for an answer. Thank you very much.

截屏2023-08-29 22 21 07
jackhump commented 1 year ago

Hi, reposting this from the Leafviz repo:

Hi! Glad you're enjoying Leafviz. Yes this is an issue I've discussed with the Leafcutter team before.

The "deltaPSI" column comes from the _effect_sizes.txt output of running leafcutter_differential_splicing. This is the difference between the two group intron usage estimates that comes from the Dirichlet multinomial model. These estimates are correlated to, but are not identical to just taking the mean intron usage of each group, which is what Leafviz calculates and displays.

@goldenflaw @davidaknowles do you have anything to add here? My interpretation is that the "raw" and "fitted' dPSIs are comparable as they should be at least concordant in directions of effect and relative ranking of effect sizes between introns, but I could be wrong.