Repository navigation
Highlights
DeseqStatstakes areduceddesign and then tests it against the design of theDeseqDataSetwith a likelihood ratio test, asDESeq(test="LRT", reduced=...)does in DESeq2 (#542).fit_type="local"fits DESeq2's local dispersion trend, for bothdeseq2()andvst(), without depending on locfit (#527).DeseqDataSet.plot_rledraws relative log expression plots (#545).lfc_shrink()withoutcoeffshrinks the coefficient of the contrast again (#543).- Results are much closer to DESeq2 when a coefficient diverges, for instance for a level with a single sample and zero counts (#538).
On the dataset of #217, PyDESeq2 finds 1817 of DESeq2's 1944 genes at padj < 0.05, against 921 before. - LFC shrinkage stops at the MAP for very small dispersions and narrow priors (#547), and its gradient and Hessian no longer overflow (#529).
- Iterative size factors are fitted with L-BFGS-B, so datasets with a zero in every gene no longer look like they hang: 200 samples by 2000 genes take 1.8 s instead of 324 s (#528).
DeseqDataSetwarns when a column of the design matrix is badly scaled (#530), rejects duplicated gene names (#526), and checks the index of a design matrix against the sample names (#536).import pydeseq2.grid_searchworks as the first import (#525), and joblib backends other than loky work (#546).deseq2_norm_transformleaves zero counts of new samples, such as the counts passed tovst_transform, out of the size factor median (#535), andtrimmed_varianceis correct alongaxis=1(#534).- The documentation has a new tutorial on the pasilla dataset from the DESeq2 vignette (#540) and explains how to set the reference level of a factor (#544).
Changed behaviour
- p-values, LFCs and Cook's filtering change for genes with diverging coefficients (#538).
Outliers with 3 or more samples of higher counts are kept only for a single two-level factor, as in DESeq2. - Shrunk LFCs change for genes whose shrinkage fit used to stop before the MAP (#547).
- Iterative size factors differ from the previous ones by at most 0.1% (#528).
- Duplicated gene names raise a
ValueErrorwhen building aDeseqDataSetinstead of failing later indeseq2()(#526). lfc_shrink()withoutcoeffraises aValueErrorwhen the contrast involves several coefficients or has a weight other than 1 on its coefficient (#543, #544).
Set the reference level in the design instead, for example withC(condition, contr.treatment(base="B")).deseq2_norm_transformgives a NaN size factor to a sample with no positive count or a NaN count among the fitted genes (#535).
What's Changed
- fix: import pydeseq2.grid_search without importing another module first by @Zethson in #525
- fix: reject duplicated gene names when building a DeseqDataSet by @Zethson in #526
- feat: add the local dispersion trend fit by @Zethson in #527
- perf: fit iterative size factors with L-BFGS-B and an analytic gradient by @Zethson in #528
- fix: compute the shrinkage gradient and Hessian without overflow by @Zethson in #529
- feat: warn when the design matrix has badly scaled columns by @Zethson in #530
- fix: validate the design matrix index against the sample names by @Zethson in #536
- fix: match DESeq2's GLM fit and Cook's filter for diverging coefficients by @Zethson in #538
- chore: use the scverse pull request template from pertpy by @Zethson in #539
- docs: drop parameter defaults from docstrings by @Zethson in #541
- docs: add a tutorial on the pasilla dataset by @Zethson in #540
- feat: shrink the coefficient of the contrast when lfc_shrink has no coeff by @Zethson in #543
- feat: add the likelihood ratio test by @Zethson in #542
- docs: explain how to set the reference level of a factor by @Zethson in #544
- feat: add relative log expression plots by @Zethson in #545
- fix: support joblib backends other than loky by @Zethson in #546
- fix: stop the shrinkage fit at the MAP by @Zethson in #547
- fix: centre trimmed_variance along the requested axis by @Namra-5 in #534
- fix: ignore zero counts in size factor median of deseq2_norm_transform by @Namra-5 in #535
- Chore(deps): bump the pre-commit group with 2 updates by @dependabot[bot] in #548
New Contributors
Full Changelog: v0.6.0...v0.7.0