PyDESeq2 icon indicating copy to clipboard operation
PyDESeq2 copied to clipboard

[BUG] Iterative Mode Hangs

Open koh-joshua opened this issue 1 year ago • 3 comments

The Issue: Iterative Mode Hangs RuntimeWarning: Every gene contains at least one zero, cannot compute log geometric means. Switching to iterative mode. But iterative mode just gets stucked, without completing: Fitting dispersions... done in 1.39 seconds. Fitting MAP dispersions... done in 1.40 seconds. - gets stucked here -

To Reproduce Python 3.10, clean install with pip install pydeseq2. Using PyCharm IDE.

Create DDS

dds = DeseqDataSet(counts=x_train_count, metadata=metadata, design_factors='status', refit_cooks=True)

Run deseq2

dds.deseq2()

RuntimeWarning shows up switching to iterative mode but gets stucked after fitting MAP dispersions.

Expected behavior Iterative mode completes without getting stucked.

Screenshots image

Desktop (please complete the following information):

  • OS: Windows 11 Pro.

Additional context Tried executing in Jupyter notebook but same issue comes up. I suspect there's a broken piece of code somewhere. I replaced all nan with 1: x_train_count.fillna(1) and was able to run dds.deseq2(), with most genes returning nan after DeseqStats(dds) but still useable. However, I am not sure about the effect of replacing zero/nan with 1s in analysis. Preferably, either iterative mode or standard mode can run with nan or zeros. Update: tried running it in VS Code under terminal and interactive window but same issue, it gets stucked.

koh-joshua avatar Oct 30 '23 23:10 koh-joshua