owkin / PyDESeq2

A Python implementation of the DESeq2 pipeline for bulk RNA-seq DEA.
https://pydeseq2.readthedocs.io/en/latest/
MIT License
584 stars 62 forks source link

BUG update genewise dispersions and fitted dispersions of refitted genes #274

Closed BorisMuzellec closed 6 months ago

BorisMuzellec commented 6 months ago

What does your PR implement? Be specific.

Currently, when outlier genes are refitted, only "_normed_means", "LFC" and "dispersions" are updated in the fields of the DeseqDataSet, but not "genewise_dispersions" and "fitted_dispersions".

This has limited or no impact on the remainder of the code, but interferes with visualisation (e.g. with plot_dispersions().

This PR fixes this by also updating "genewise_dispersions" and "fitted_dispersions".

Example

Before:

Capture d’écran 2024-04-24 à 10 20 25

After:

Capture d’écran 2024-04-24 à 10 42 06
umarteauowkin commented 6 months ago

LGTM, thanks @BorisMuzellec