Repository navigation
Relax version bounds so ScreenPro2 installs on Python 3.10 to 3.13 - #116
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates several project dependencies in pyproject.toml (including Python, pandas, numpy, matplotlib, pyarrow, and pydeseq2) and adapts the DeseqDataSet initialization in screenpro/phenoscore/deseq.py to use the design parameter. The review feedback correctly points out that the new string interpolation for design could fail if the input is already a formula or a list of factors, and provides a robust code suggestion to dynamically construct the formula.
97b46be to
0baf2b9
Compare
|
I adopted Gemini's suggestion on list designs: runDESeq now builds the formula the same way pydeseq2 did from design_factors, so both a single factor and a list like ['batch', 'condition'] work. Tested against the old design_factors call on pydeseq2 0.5.2 and 0.7.0 - identical results for both. I left out the "~"-prefixed case, since design_factors never accepted a formula. |
FYI here is the repo where I'm working on benchmarking tasks – https://github.com/FunGI-cap/ScreenPro-Benchmarking |
|
Done - pydeseq2 now has no upper bound. pydeseq2 0.6+ needs Python 3.12, though, so the ScreenPro-Benchmarking env (Python 3.11) still resolves 0.5.4 and gets 0.5.x p-values; the benchmark needs 3.12+ to run on 0.7. That env also runs pandas 3.0.1, and the |
|
There is a similar problem in the docs environment, it keeps failing when I try to build it in ReadTheDocs ... @crtag do you have any thoughts in case the environment files in |
|
The Main's config hasn't been built yet: The file is stale as well: |
@crtag can you open another PR about this? I'll merge and release a new subvsersion based this PR for now. |
Fixes #114.
Of the six bounds, four turned out to be leftovers and two needed a different form:
python >=3.9,<3.12>=3.10pandas <2.0<3getBestTargetByTSSin thecollapse_varpath (KeyError: 'target'), hence<3for now.numpy <2.0matplotlib <3.7pyarrow <26pydeseq2 <0.5>=0.5.2deseq2(); 0.5.2 has the fix. No upper bound: 3.12+ resolves the newest pydeseq2, while 3.10 and 3.11 land on 0.5.x because 0.6+ requires 3.12.design_factorsis deprecated, sorunDESeqpassesdesign="~" + " + ".join(factors)instead, which is the formula pydeseq2 used to build from it. A single factor and a list both work, and the results match the old call exactly on pydeseq2 0.5.2, 0.5.4 and 0.7.0.Testing: fresh
python:3.10to3.13containers (Linux x86_64, no Rust), plain pip. Every version installs and passespytest tests. Against the current 3.11 install I compared 38 output tables covering FASTQ counts, the CLI guide counter, the README workflow, phenotype scores and DESeq. 3.10 and 3.11 (pydeseq2 0.5.2, 0.5.4) match on all 38: counts exactly, the rest within 4e-12 relative. 3.12 and 3.13 (pydeseq2 0.7.0) match on 35; the other three are DESeq tables from a deliberately hard synthetic set (all-zero guides plus an outlier), where 0.7's new p-value for one low-count guide moves the numbers by up to 0.8 relative, padj included. macOS 3.12 installs from wheels. biobear ships no wheel for macOS 3.10, Windows 3.13 or anything on 3.14, so there pip has to compile it with Rust: with Rust hidden, macOS 3.10 stops at that build, and with Rust available it completes.Left out on purpose:
environment.yml, which still carries the old pins; touching it means a fresh conda solve on CI, so it fits better as its own change.Possible next steps, roughly in order of payoff:
getBestTargetByTSSchange for pandas 3, after which<3can go.>=0.7on 3.12+,>=0.5.2below) to keep every 3.12+ install on 0.7; 0.6 and 0.7 changed dispersion fallbacks, p-values and Cook's filtering relative to 0.5.x.