[BUG] Iterative Mode Hangs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 761
- Forks
- 90
- Avg merge
- 25m
- Merged PRs (30d)
- 10
Description
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
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the report with Python 3.10, the provided DeseqDataSet setup, and dds.deseq2(), then observe the step after fitting MAP dispersions. Investigate how iterative mode handles zeros and NaN values, including the reported DeseqStats result after replacing them with 1. Done means the iterative run completes without hanging and its behavior for these inputs is clear and correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100