-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixscape reproducibility #683
Conversation
The test fixes are unrelated and I'm hoping to fix them next week. Just ping me if you want a review, please. |
Originally, I wanted to add more to this PR, but I think it’s easier to create a separate one. Feel free to review, if you have time @Zethson! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
-
Input required: The perturbation signature was previously calculated by subtracting the average expression of the N nearest control (NT) cells from the observed expression. But, in the original implementation, this subtraction is performed in the reverse order (see here). This only affects the sign of the result, but aligning our calculation with the original implementation would make it easier to compare scores. I suggest adopting our calculation to the original approach, but happy to discuss this further.
Yes, let's adopt the way they did it. Whenever we can align with them, let's do it.
- I had to merge
main
into your branch to get the CI to run and hopefully pass. You may now also have the code and issue of Why is np.round().astype("int64") applied to post_prob in Mixscape? #694. I'll have a look at this ASAP but your results may now be different.
copy: bool | None = False, | ||
): | ||
"""Identify perturbed and non-perturbed gRNA expressing cells that accounts for multiple treatments/conditions/chemical perturbations. | ||
|
||
The implementation resembles https://satijalab.org/seurat/reference/runmixscape | ||
The implementation resembles https://satijalab.org/seurat/reference/runmixscape. Note that in the original implementation, the | ||
perturbation signature is calculated on unscaled data by default and we therefore recommend to do the same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we test somewhere whether the data is unscaled and print a warning if it is? We can at least test whether the input is count or normalized data. There's code somewhere in pertpy for this I think. If not, please ping me.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #683 +/- ##
==========================================
- Coverage 65.56% 64.89% -0.68%
==========================================
Files 47 46 -1
Lines 6105 5994 -111
==========================================
- Hits 4003 3890 -113
- Misses 2102 2104 +2
|
* Set legend anchor as parameter (#660) * Fix missing space * Remove explicit anndata in dependencies (#666) * Incorporate use case tutorials (#665) * Fixed DEG layer retrieval * Use-case tutorial icons * Restructure tutorial page * Subgroup tutorials * Improve KNN label_transfer in PerturbationSpace (#658) * Add uncertainty score in KNN label_transfer in PerturbationSpace Certainty is quantified as the fraction of nearest neighbors belonging to the classified (i.e. the most abundant) label compared to the total number of nearest neighbors. * Update pre-commit-config.yaml Replaces yanked dependency of mypy "types-pkg-resources" with "types-setuptools" as recommended: https://pypi.org/project/types-pkg-resources/ * Improve label imputation in PerturbationSpace class Key changes: - Now uses KNN graph in adata: saves cost and increases consistency - Vectorized operations instead of expensive for loop - Distance weighting for KNN imputation - Quantifies uncertainty as local KNN label entropy * Fixed plotting for mixscape.plot_barplot and sccoda.plot_effects_barplot (#667) * Augur scsim warnings (#670) * Augur scsim warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Submodules Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Add PerturbationDataValidator (#672) * Augur scsim warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Submodules Signed-off-by: zethson <lukas.heumos@posteo.net> * Add super draft of pertpy validator Signed-off-by: zethson <lukas.heumos@posteo.net> * Polish Signed-off-by: zethson <lukas.heumos@posteo.net> * Polish Signed-off-by: zethson <lukas.heumos@posteo.net> * Nested try Signed-off-by: zethson <lukas.heumos@posteo.net> * validator in test Signed-off-by: zethson <lukas.heumos@posteo.net> * try uv for rtd Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv fix Signed-off-by: zethson <lukas.heumos@posteo.net> * mb sphinx fix for validator Signed-off-by: zethson <lukas.heumos@posteo.net> * docs Signed-off-by: zethson <lukas.heumos@posteo.net> * remove PerturbationValidator from docs Signed-off-by: zethson <lukas.heumos@posteo.net> * remove PerturbationValidator from docs Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Latest OS for RTD * Remove curator again Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix jax random array (#686) * Fix jax random array Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix further jax warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix edger Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix choice Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Switch to formulaic-contrasts (#682) * Switch to formulaic-contrasts * Cleanup * removing design matrix workaround (#691) Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> * Fix PyDESeq2 * Update tests * fix typo in gitignore * Remove contrast dataclass, which isnt used anywhere * Fix edgeR rpy2 tests (#692) * fix broken rpy2 edger tests * updated edger tests * Fix tests (scipy) Signed-off-by: zethson <lukas.heumos@posteo.net> * submodule Signed-off-by: zethson <lukas.heumos@posteo.net> * Remove unused code Signed-off-by: zethson <lukas.heumos@posteo.net> * type hints Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> Co-authored-by: zethson <lukas.heumos@posteo.net> * Release 0.9.5 Signed-off-by: zethson <lukas.heumos@posteo.net> * Prepare 0.10.0 Signed-off-by: zethson <lukas.heumos@posteo.net> * Added Mixscape seeds and test (#683) Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix probability data type (#696) Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize MeanVarDistributionDistance (#697) * Fix probability data type Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize mean_var distance Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize test speed (#699) * Try buildjet Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Try buildjet large Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * speed up predict_differential_prioritization Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * speed up tests Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Lower bound for scikit-learn (#701) Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix type annotation Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix empty figure returns when show=True in plotting functions (#703) * Removed show parameter * Adapt plotting API for Augur, Coda, Dialogue * Adapted plotting API for Milo, Mixscape, scgen * Add joblib * Remove joblib --------- Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix scikit-learn intendation Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Lilly May <93096564+Lilly-May@users.noreply.github.com> Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Gregor Sturm <mail@gregor-sturm.de> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu>
* Set legend anchor as parameter (#660) * Fix missing space * Remove explicit anndata in dependencies (#666) * Incorporate use case tutorials (#665) * Fixed DEG layer retrieval * Use-case tutorial icons * Restructure tutorial page * Subgroup tutorials * Improve KNN label_transfer in PerturbationSpace (#658) * Add uncertainty score in KNN label_transfer in PerturbationSpace Certainty is quantified as the fraction of nearest neighbors belonging to the classified (i.e. the most abundant) label compared to the total number of nearest neighbors. * Update pre-commit-config.yaml Replaces yanked dependency of mypy "types-pkg-resources" with "types-setuptools" as recommended: https://pypi.org/project/types-pkg-resources/ * Improve label imputation in PerturbationSpace class Key changes: - Now uses KNN graph in adata: saves cost and increases consistency - Vectorized operations instead of expensive for loop - Distance weighting for KNN imputation - Quantifies uncertainty as local KNN label entropy * Fixed plotting for mixscape.plot_barplot and sccoda.plot_effects_barplot (#667) * Augur scsim warnings (#670) * Augur scsim warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Submodules Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Add PerturbationDataValidator (#672) * Augur scsim warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Submodules Signed-off-by: zethson <lukas.heumos@posteo.net> * Add super draft of pertpy validator Signed-off-by: zethson <lukas.heumos@posteo.net> * Polish Signed-off-by: zethson <lukas.heumos@posteo.net> * Polish Signed-off-by: zethson <lukas.heumos@posteo.net> * Nested try Signed-off-by: zethson <lukas.heumos@posteo.net> * validator in test Signed-off-by: zethson <lukas.heumos@posteo.net> * try uv for rtd Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv fix Signed-off-by: zethson <lukas.heumos@posteo.net> * mb sphinx fix for validator Signed-off-by: zethson <lukas.heumos@posteo.net> * docs Signed-off-by: zethson <lukas.heumos@posteo.net> * remove PerturbationValidator from docs Signed-off-by: zethson <lukas.heumos@posteo.net> * remove PerturbationValidator from docs Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Latest OS for RTD * Remove curator again Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix jax random array (#686) * Fix jax random array Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix further jax warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix edger Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix choice Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Switch to formulaic-contrasts (#682) * Switch to formulaic-contrasts * Cleanup * removing design matrix workaround (#691) Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> * Fix PyDESeq2 * Update tests * fix typo in gitignore * Remove contrast dataclass, which isnt used anywhere * Fix edgeR rpy2 tests (#692) * fix broken rpy2 edger tests * updated edger tests * Fix tests (scipy) Signed-off-by: zethson <lukas.heumos@posteo.net> * submodule Signed-off-by: zethson <lukas.heumos@posteo.net> * Remove unused code Signed-off-by: zethson <lukas.heumos@posteo.net> * type hints Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> Co-authored-by: zethson <lukas.heumos@posteo.net> * Release 0.9.5 Signed-off-by: zethson <lukas.heumos@posteo.net> * Prepare 0.10.0 Signed-off-by: zethson <lukas.heumos@posteo.net> * Added Mixscape seeds and test (#683) Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix probability data type (#696) Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize MeanVarDistributionDistance (#697) * Fix probability data type Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize mean_var distance Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize test speed (#699) * Try buildjet Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Try buildjet large Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * speed up predict_differential_prioritization Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * speed up tests Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Lower bound for scikit-learn (#701) Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix type annotation Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix empty figure returns when show=True in plotting functions (#703) * Removed show parameter * Adapt plotting API for Augur, Coda, Dialogue * Adapted plotting API for Milo, Mixscape, scgen * Add joblib * Remove joblib --------- Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix scikit-learn intendation Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Lilly May <93096564+Lilly-May@users.noreply.github.com> Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Gregor Sturm <mail@gregor-sturm.de> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu>
* Implement mixture models for guide assignment Key additions: - Added a base abstract class "MixtureModel" with numpyro - Added a first mixture model "Poisson_Gauss_Mixture" - New function "assign_mixture_model" in GuideAssignment class * Merge main into branch (#705) * Set legend anchor as parameter (#660) * Fix missing space * Remove explicit anndata in dependencies (#666) * Incorporate use case tutorials (#665) * Fixed DEG layer retrieval * Use-case tutorial icons * Restructure tutorial page * Subgroup tutorials * Improve KNN label_transfer in PerturbationSpace (#658) * Add uncertainty score in KNN label_transfer in PerturbationSpace Certainty is quantified as the fraction of nearest neighbors belonging to the classified (i.e. the most abundant) label compared to the total number of nearest neighbors. * Update pre-commit-config.yaml Replaces yanked dependency of mypy "types-pkg-resources" with "types-setuptools" as recommended: https://pypi.org/project/types-pkg-resources/ * Improve label imputation in PerturbationSpace class Key changes: - Now uses KNN graph in adata: saves cost and increases consistency - Vectorized operations instead of expensive for loop - Distance weighting for KNN imputation - Quantifies uncertainty as local KNN label entropy * Fixed plotting for mixscape.plot_barplot and sccoda.plot_effects_barplot (#667) * Augur scsim warnings (#670) * Augur scsim warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Submodules Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Add PerturbationDataValidator (#672) * Augur scsim warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Submodules Signed-off-by: zethson <lukas.heumos@posteo.net> * Add super draft of pertpy validator Signed-off-by: zethson <lukas.heumos@posteo.net> * Polish Signed-off-by: zethson <lukas.heumos@posteo.net> * Polish Signed-off-by: zethson <lukas.heumos@posteo.net> * Nested try Signed-off-by: zethson <lukas.heumos@posteo.net> * validator in test Signed-off-by: zethson <lukas.heumos@posteo.net> * try uv for rtd Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv fix Signed-off-by: zethson <lukas.heumos@posteo.net> * mb sphinx fix for validator Signed-off-by: zethson <lukas.heumos@posteo.net> * docs Signed-off-by: zethson <lukas.heumos@posteo.net> * remove PerturbationValidator from docs Signed-off-by: zethson <lukas.heumos@posteo.net> * remove PerturbationValidator from docs Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Latest OS for RTD * Remove curator again Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix jax random array (#686) * Fix jax random array Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix further jax warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix edger Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix choice Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Switch to formulaic-contrasts (#682) * Switch to formulaic-contrasts * Cleanup * removing design matrix workaround (#691) Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> * Fix PyDESeq2 * Update tests * fix typo in gitignore * Remove contrast dataclass, which isnt used anywhere * Fix edgeR rpy2 tests (#692) * fix broken rpy2 edger tests * updated edger tests * Fix tests (scipy) Signed-off-by: zethson <lukas.heumos@posteo.net> * submodule Signed-off-by: zethson <lukas.heumos@posteo.net> * Remove unused code Signed-off-by: zethson <lukas.heumos@posteo.net> * type hints Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> Co-authored-by: zethson <lukas.heumos@posteo.net> * Release 0.9.5 Signed-off-by: zethson <lukas.heumos@posteo.net> * Prepare 0.10.0 Signed-off-by: zethson <lukas.heumos@posteo.net> * Added Mixscape seeds and test (#683) Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix probability data type (#696) Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize MeanVarDistributionDistance (#697) * Fix probability data type Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize mean_var distance Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize test speed (#699) * Try buildjet Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Try buildjet large Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * speed up predict_differential_prioritization Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * speed up tests Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Lower bound for scikit-learn (#701) Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix type annotation Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix empty figure returns when show=True in plotting functions (#703) * Removed show parameter * Adapt plotting API for Augur, Coda, Dialogue * Adapted plotting API for Milo, Mixscape, scgen * Add joblib * Remove joblib --------- Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix scikit-learn intendation Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Lilly May <93096564+Lilly-May@users.noreply.github.com> Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Gregor Sturm <mail@gregor-sturm.de> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> * Merge main into branch (#706) * Set legend anchor as parameter (#660) * Fix missing space * Remove explicit anndata in dependencies (#666) * Incorporate use case tutorials (#665) * Fixed DEG layer retrieval * Use-case tutorial icons * Restructure tutorial page * Subgroup tutorials * Improve KNN label_transfer in PerturbationSpace (#658) * Add uncertainty score in KNN label_transfer in PerturbationSpace Certainty is quantified as the fraction of nearest neighbors belonging to the classified (i.e. the most abundant) label compared to the total number of nearest neighbors. * Update pre-commit-config.yaml Replaces yanked dependency of mypy "types-pkg-resources" with "types-setuptools" as recommended: https://pypi.org/project/types-pkg-resources/ * Improve label imputation in PerturbationSpace class Key changes: - Now uses KNN graph in adata: saves cost and increases consistency - Vectorized operations instead of expensive for loop - Distance weighting for KNN imputation - Quantifies uncertainty as local KNN label entropy * Fixed plotting for mixscape.plot_barplot and sccoda.plot_effects_barplot (#667) * Augur scsim warnings (#670) * Augur scsim warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Submodules Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Add PerturbationDataValidator (#672) * Augur scsim warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Submodules Signed-off-by: zethson <lukas.heumos@posteo.net> * Add super draft of pertpy validator Signed-off-by: zethson <lukas.heumos@posteo.net> * Polish Signed-off-by: zethson <lukas.heumos@posteo.net> * Polish Signed-off-by: zethson <lukas.heumos@posteo.net> * Nested try Signed-off-by: zethson <lukas.heumos@posteo.net> * validator in test Signed-off-by: zethson <lukas.heumos@posteo.net> * try uv for rtd Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv Signed-off-by: zethson <lukas.heumos@posteo.net> * rtd uv fix Signed-off-by: zethson <lukas.heumos@posteo.net> * mb sphinx fix for validator Signed-off-by: zethson <lukas.heumos@posteo.net> * docs Signed-off-by: zethson <lukas.heumos@posteo.net> * remove PerturbationValidator from docs Signed-off-by: zethson <lukas.heumos@posteo.net> * remove PerturbationValidator from docs Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Latest OS for RTD * Remove curator again Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix jax random array (#686) * Fix jax random array Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix further jax warnings Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix edger Signed-off-by: zethson <lukas.heumos@posteo.net> * Fix choice Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> * Switch to formulaic-contrasts (#682) * Switch to formulaic-contrasts * Cleanup * removing design matrix workaround (#691) Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> * Fix PyDESeq2 * Update tests * fix typo in gitignore * Remove contrast dataclass, which isnt used anywhere * Fix edgeR rpy2 tests (#692) * fix broken rpy2 edger tests * updated edger tests * Fix tests (scipy) Signed-off-by: zethson <lukas.heumos@posteo.net> * submodule Signed-off-by: zethson <lukas.heumos@posteo.net> * Remove unused code Signed-off-by: zethson <lukas.heumos@posteo.net> * type hints Signed-off-by: zethson <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> Co-authored-by: zethson <lukas.heumos@posteo.net> * Release 0.9.5 Signed-off-by: zethson <lukas.heumos@posteo.net> * Prepare 0.10.0 Signed-off-by: zethson <lukas.heumos@posteo.net> * Added Mixscape seeds and test (#683) Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix probability data type (#696) Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize MeanVarDistributionDistance (#697) * Fix probability data type Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize mean_var distance Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Optimize test speed (#699) * Try buildjet Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Try buildjet large Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * speed up predict_differential_prioritization Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * speed up tests Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Lower bound for scikit-learn (#701) Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix type annotation Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix empty figure returns when show=True in plotting functions (#703) * Removed show parameter * Adapt plotting API for Augur, Coda, Dialogue * Adapted plotting API for Milo, Mixscape, scgen * Add joblib * Remove joblib --------- Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Fix scikit-learn intendation Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Lilly May <93096564+Lilly-May@users.noreply.github.com> Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Gregor Sturm <mail@gregor-sturm.de> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu> * Refactor guide assignment logic and enhance mixture model parameters * Cleanup MixtureModel class * Enhance guide assignment validation and error handling in GuideAssignment class * Update dev nb * Add test for grna_mixture_model * Remove dev nb * Update notebook for guide assignment * Update guide assignment notebooks * Apply suggestions from code review Review comments by @Zethson Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> * Improve code to fit review suggestions - Added lots of type hints and return types - Improved naming of variables - Added and removed a few comments - Added user warnings if a guide is not expressed at all * Fix sloppy data dimensions for numpyro Previously data was (N,1) dim. Now applying ravel, and changed numpyro plates accordingly for correct batching. * Update test_grna_assignment.py We changed "Negative" to "negative" :) * Polish Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> * Polish Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> --------- Signed-off-by: zethson <lukas.heumos@posteo.net> Signed-off-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Lilly May <93096564+Lilly-May@users.noreply.github.com> Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net> Co-authored-by: Gregor Sturm <mail@gregor-sturm.de> Co-authored-by: Emma Dann <32264060+emdann@users.noreply.github.com> Co-authored-by: Emma Dann <emmadann@comino.stanford.edu>
PR Checklist
docs
is updatedDescription of changes
GaussianMixture
model. I added a seed parameter topt.tl.Mixscape.mixscape
.n_dims
, which specifies the number of dimensions from the chosen representation (usually PCA) to be used for determining the nearest neighbors. I have added this parameter to our implementation ofpt.tl.Mixscape.perturbation_signature
and set its default value to 15, which is also the default used in the original implementation.pt.tl.Mixscape.perturbation_signature
that not only verifies that a layer has been added to the AnnData object but also checks the correctness of the computed scores