pertpy 0.8.0__tar.gz → 0.9.3__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/release-drafter.yml +2 -2
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/workflows/test.yml +3 -3
- {pertpy-0.8.0 → pertpy-0.9.3}/PKG-INFO +14 -5
- {pertpy-0.8.0 → pertpy-0.9.3}/README.md +12 -4
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/__init__.py +1 -1
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/preprocessing/_guide_rna.py +4 -4
- pertpy-0.9.3/pertpy/tools/__init__.py +82 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_milo.py +1 -1
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_perturbation_space/_discriminator_classifiers.py +1 -1
- {pertpy-0.8.0 → pertpy-0.9.3}/pyproject.toml +2 -1
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_dge.py +2 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_distances/test_distances.py +5 -1
- pertpy-0.8.0/pertpy/tools/__init__.py +0 -57
- {pertpy-0.8.0 → pertpy-0.9.3}/.editorconfig +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.gitattributes +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/labels.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/pull_request_template.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/workflows/build.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/workflows/labeler.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/workflows/release.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.github/workflows/release_drafter.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.gitignore +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.gitmodules +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.pre-commit-config.yaml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/.readthedocs.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/CODE_OF_CONDUCT.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/LICENSE +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/codecov.yml +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/Makefile +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_ext/edit_on_github.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_ext/typed_returns.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/SCVI_LICENSE +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/css/overwrite.css +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/css/sphinx_gallery.css +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/augur_dp_scatter.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/augur_important_features.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/augur_lollipop.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/augur_scatterplot.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/dialogue_pairplot.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/dialogue_violin.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/enrichment_dotplot.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/enrichment_gsea.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/milo_da_beeswarm.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/milo_nhood.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/milo_nhood_graph.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/mixscape_barplot.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/mixscape_heatmap.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/mixscape_lda.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/mixscape_perturbscore.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/mixscape_violin.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/sccoda_boxplots.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/sccoda_effects_barplot.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/sccoda_rel_abundance_dispersion_plot.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/sccoda_stacked_barplot.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/scgen_reg_mean.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/tasccoda_draw_effects.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/tasccoda_draw_tree.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/docstring_previews/tasccoda_effects_umap.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/icons/code-24px.svg +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/icons/computer-24px.svg +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/icons/library_books-24px.svg +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/icons/play_circle_outline-24px.svg +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/placeholder.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/augur.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/cinemaot.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/dge.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/dialogue.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/distances.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/distances_tests.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/enrichment.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/guide_rna_assignment.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/metadata.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/milo.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/mixscape.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/ontology.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/perturbation_space.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/placeholder.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/sccoda.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/sccoda_extended.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/scgen_perturbation_prediction.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_static/tutorials/tasccoda.png +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_templates/autosummary/class.rst +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/_templates/class_no_inherited.rst +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/code_of_conduct.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/conf.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/contributing.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/index.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/installation.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/make.bat +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/references.bib +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/references.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/tutorials/index.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/usage/usage.md +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/docs/utils.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/data/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/data/_dataloader.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/data/_datasets.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/metadata/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/metadata/_cell_line.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/metadata/_compound.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/metadata/_drug.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/metadata/_look_up.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/metadata/_metadata.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/metadata/_moa.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/plot/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/preprocessing/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/py.typed +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_augur.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_cinemaot.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_coda/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_coda/_base_coda.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_coda/_sccoda.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_coda/_tasccoda.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_dialogue.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/_base.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/_checks.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/_dge_comparison.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/_edger.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/_formulaic.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/_pydeseq2.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/_simple_tests.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_differential_gene_expression/_statsmodels.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_distances/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_distances/_distance_tests.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_distances/_distances.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_enrichment.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_kernel_pca.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_mixscape.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_perturbation_space/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_perturbation_space/_clustering.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_perturbation_space/_comparison.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_perturbation_space/_metrics.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_perturbation_space/_perturbation_space.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_perturbation_space/_simple.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_scgen/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_scgen/_base_components.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_scgen/_scgen.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_scgen/_scgenvae.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_scgen/_utils.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/decoupler_LICENSE +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/transferlearning_MMD_LICENSE +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/conftest.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/metadata/test_cell_line.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/metadata/test_compound.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/metadata/test_drug.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/metadata/test_moa.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/preprocessing/test_grna_assignment.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_coda/test_sccoda.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_coda/test_tasccoda.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/__init__.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/conftest.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_base.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_compare_groups.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_edger.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_formulaic.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_input_checks.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_pydeseq2.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_simple_tests.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_statsmodels.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_distances/test_distance_tests.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_perturbation_space/test_comparison.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_perturbation_space/test_discriminator_classifiers.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_perturbation_space/test_simple_cluster_space.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_perturbation_space/test_simple_perturbation_space.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/haber_data.csv +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/r_result.csv +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/test_augur.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/test_cinemaot.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/test_dialogue.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/test_enrichment.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/test_milo.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/test_mixscape.py +0 -0
- {pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/test_scgen.py +0 -0
@@ -25,13 +25,13 @@ jobs:
|
|
25
25
|
python: "3.10"
|
26
26
|
run_mode: "slow"
|
27
27
|
- os: ubuntu-latest
|
28
|
-
python: "3.
|
28
|
+
python: "3.12"
|
29
29
|
run_mode: "slow"
|
30
30
|
- os: ubuntu-latest
|
31
|
-
python: "3.
|
31
|
+
python: "3.12"
|
32
32
|
run_mode: "fast"
|
33
33
|
- os: ubuntu-latest
|
34
|
-
python: "3.
|
34
|
+
python: "3.12"
|
35
35
|
run_mode: slow
|
36
36
|
pip-flags: "--pre"
|
37
37
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: pertpy
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.9.3
|
4
4
|
Summary: Perturbation Analysis in the scverse ecosystem.
|
5
5
|
Project-URL: Documentation, https://pertpy.readthedocs.io
|
6
6
|
Project-URL: Source, https://github.com/scverse/pertpy
|
@@ -41,6 +41,7 @@ Classifier: Operating System :: POSIX :: Linux
|
|
41
41
|
Classifier: Programming Language :: Python :: 3
|
42
42
|
Classifier: Programming Language :: Python :: 3.10
|
43
43
|
Classifier: Programming Language :: Python :: 3.11
|
44
|
+
Classifier: Programming Language :: Python :: 3.12
|
44
45
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
45
46
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
46
47
|
Requires-Python: >=3.10
|
@@ -108,7 +109,7 @@ Description-Content-Type: text/markdown
|
|
108
109
|
|
109
110
|
# pertpy
|
110
111
|
|
111
|
-

|
112
113
|
|
113
114
|
## Documentation
|
114
115
|
|
@@ -116,7 +117,10 @@ Please read the [documentation](https://pertpy.readthedocs.io/en/latest).
|
|
116
117
|
|
117
118
|
## Installation
|
118
119
|
|
119
|
-
|
120
|
+
We recommend installing and running pertpy on a recent version of Linux (e.g. Ubuntu 24.04 LTS).
|
121
|
+
No particular hardware beyond a standard laptop is required.
|
122
|
+
|
123
|
+
You can install _pertpy_ in less than a minute via [pip] from [PyPI]:
|
120
124
|
|
121
125
|
```console
|
122
126
|
pip install pertpy
|
@@ -125,15 +129,20 @@ pip install pertpy
|
|
125
129
|
if you want to use scCODA or tascCODA, please install pertpy as follows:
|
126
130
|
|
127
131
|
```console
|
128
|
-
pip install pertpy[coda]
|
132
|
+
pip install 'pertpy[coda]'
|
129
133
|
```
|
130
134
|
|
131
135
|
If you want to use the differential gene expression interface, please install pertpy by running:
|
132
136
|
|
133
137
|
```console
|
134
|
-
pip install pertpy[de]
|
138
|
+
pip install 'pertpy[de]'
|
135
139
|
```
|
136
140
|
|
141
|
+
## Citation
|
142
|
+
|
143
|
+
[Lukas Heumos, Yuge Ji, Lilly May, Tessa Green, Xinyue Zhang, Xichen Wu, Johannes Ostner, Stefan Peidli, Antonia Schumacher, Karin Hrovatin, Michaela Mueller, Faye Chong, Gregor Sturm, Alejandro Tejada, Emma Dann, Mingze Dong, Mojtaba Bahrami, Ilan Gold, Sergei Rybakov, Altana Namsaraeva, Amir Ali Moinfar, Zihe Zheng, Eljas Roellin, Isra Mekki, Chris Sander, Mohammad Lotfollahi, Herbert B. Schiller, Fabian J. Theis
|
144
|
+
bioRxiv 2024.08.04.606516; doi: https://doi.org/10.1101/2024.08.04.606516](https://www.biorxiv.org/content/10.1101/2024.08.04.606516v1)
|
145
|
+
|
137
146
|
[pip]: https://pip.pypa.io/
|
138
147
|
[pypi]: https://pypi.org/
|
139
148
|
[usage]: https://pertpy.readthedocs.io/en/latest/usage/usage.html
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
# pertpy
|
12
12
|
|
13
|
-

|
14
14
|
|
15
15
|
## Documentation
|
16
16
|
|
@@ -18,7 +18,10 @@ Please read the [documentation](https://pertpy.readthedocs.io/en/latest).
|
|
18
18
|
|
19
19
|
## Installation
|
20
20
|
|
21
|
-
|
21
|
+
We recommend installing and running pertpy on a recent version of Linux (e.g. Ubuntu 24.04 LTS).
|
22
|
+
No particular hardware beyond a standard laptop is required.
|
23
|
+
|
24
|
+
You can install _pertpy_ in less than a minute via [pip] from [PyPI]:
|
22
25
|
|
23
26
|
```console
|
24
27
|
pip install pertpy
|
@@ -27,15 +30,20 @@ pip install pertpy
|
|
27
30
|
if you want to use scCODA or tascCODA, please install pertpy as follows:
|
28
31
|
|
29
32
|
```console
|
30
|
-
pip install pertpy[coda]
|
33
|
+
pip install 'pertpy[coda]'
|
31
34
|
```
|
32
35
|
|
33
36
|
If you want to use the differential gene expression interface, please install pertpy by running:
|
34
37
|
|
35
38
|
```console
|
36
|
-
pip install pertpy[de]
|
39
|
+
pip install 'pertpy[de]'
|
37
40
|
```
|
38
41
|
|
42
|
+
## Citation
|
43
|
+
|
44
|
+
[Lukas Heumos, Yuge Ji, Lilly May, Tessa Green, Xinyue Zhang, Xichen Wu, Johannes Ostner, Stefan Peidli, Antonia Schumacher, Karin Hrovatin, Michaela Mueller, Faye Chong, Gregor Sturm, Alejandro Tejada, Emma Dann, Mingze Dong, Mojtaba Bahrami, Ilan Gold, Sergei Rybakov, Altana Namsaraeva, Amir Ali Moinfar, Zihe Zheng, Eljas Roellin, Isra Mekki, Chris Sander, Mohammad Lotfollahi, Herbert B. Schiller, Fabian J. Theis
|
45
|
+
bioRxiv 2024.08.04.606516; doi: https://doi.org/10.1101/2024.08.04.606516](https://www.biorxiv.org/content/10.1101/2024.08.04.606516v1)
|
46
|
+
|
39
47
|
[pip]: https://pip.pypa.io/
|
40
48
|
[pypi]: https://pypi.org/
|
41
49
|
[usage]: https://pertpy.readthedocs.io/en/latest/usage/usage.html
|
@@ -48,7 +48,7 @@ class GuideAssignment:
|
|
48
48
|
"""
|
49
49
|
counts = adata.X if layer is None else adata.layers[layer]
|
50
50
|
if scipy.sparse.issparse(counts):
|
51
|
-
counts = counts.
|
51
|
+
counts = counts.toarray()
|
52
52
|
|
53
53
|
assigned_grnas = np.where(counts >= assignment_threshold, 1, 0)
|
54
54
|
assigned_grnas = scipy.sparse.csr_matrix(assigned_grnas)
|
@@ -92,7 +92,7 @@ class GuideAssignment:
|
|
92
92
|
"""
|
93
93
|
counts = adata.X if layer is None else adata.layers[layer]
|
94
94
|
if scipy.sparse.issparse(counts):
|
95
|
-
counts = counts.
|
95
|
+
counts = counts.toarray()
|
96
96
|
|
97
97
|
assigned_grna = np.where(
|
98
98
|
counts.max(axis=1).squeeze() >= assignment_threshold,
|
@@ -152,9 +152,9 @@ class GuideAssignment:
|
|
152
152
|
|
153
153
|
if order_by is None:
|
154
154
|
if scipy.sparse.issparse(data):
|
155
|
-
max_values = data.max(axis=1).
|
155
|
+
max_values = data.max(axis=1).toarray().squeeze()
|
156
156
|
data_argmax = data.argmax(axis=1).A.squeeze()
|
157
|
-
max_guide_index = np.where(max_values != data.min(axis=1).
|
157
|
+
max_guide_index = np.where(max_values != data.min(axis=1).toarray().squeeze(), data_argmax, -1)
|
158
158
|
else:
|
159
159
|
max_guide_index = np.where(
|
160
160
|
data.max(axis=1).squeeze() != data.min(axis=1).squeeze(), data.argmax(axis=1).squeeze(), -1
|
@@ -0,0 +1,82 @@
|
|
1
|
+
from functools import wraps
|
2
|
+
from importlib import import_module
|
3
|
+
|
4
|
+
|
5
|
+
def lazy_import(module_path, class_name, extras):
|
6
|
+
def _import():
|
7
|
+
try:
|
8
|
+
for extra in extras:
|
9
|
+
import_module(extra)
|
10
|
+
except ImportError as e:
|
11
|
+
raise ImportError(
|
12
|
+
f"Extra dependencies required: {', '.join(extras)}. "
|
13
|
+
f"Please install with: pip install {' '.join(extras)}"
|
14
|
+
) from e
|
15
|
+
module = import_module(module_path)
|
16
|
+
return getattr(module, class_name)
|
17
|
+
|
18
|
+
@wraps(_import)
|
19
|
+
def wrapper(*args, **kwargs):
|
20
|
+
return _import()(*args, **kwargs)
|
21
|
+
|
22
|
+
return wrapper
|
23
|
+
|
24
|
+
|
25
|
+
from pertpy.tools._augur import Augur
|
26
|
+
from pertpy.tools._cinemaot import Cinemaot
|
27
|
+
from pertpy.tools._dialogue import Dialogue
|
28
|
+
from pertpy.tools._distances._distance_tests import DistanceTest
|
29
|
+
from pertpy.tools._distances._distances import Distance
|
30
|
+
from pertpy.tools._enrichment import Enrichment
|
31
|
+
from pertpy.tools._milo import Milo
|
32
|
+
from pertpy.tools._mixscape import Mixscape
|
33
|
+
from pertpy.tools._perturbation_space._clustering import ClusteringSpace
|
34
|
+
from pertpy.tools._perturbation_space._comparison import PerturbationComparison
|
35
|
+
from pertpy.tools._perturbation_space._discriminator_classifiers import (
|
36
|
+
LRClassifierSpace,
|
37
|
+
MLPClassifierSpace,
|
38
|
+
)
|
39
|
+
from pertpy.tools._perturbation_space._simple import (
|
40
|
+
CentroidSpace,
|
41
|
+
DBSCANSpace,
|
42
|
+
KMeansSpace,
|
43
|
+
PseudobulkSpace,
|
44
|
+
)
|
45
|
+
from pertpy.tools._scgen import Scgen
|
46
|
+
|
47
|
+
CODA_EXTRAS = ["toytree", "arviz", "ete3"] # also pyqt5 technically
|
48
|
+
Sccoda = lazy_import("pertpy.tools._coda._sccoda", "Sccoda", CODA_EXTRAS)
|
49
|
+
Tasccoda = lazy_import("pertpy.tools._coda._tasccoda", "Tasccoda", CODA_EXTRAS)
|
50
|
+
|
51
|
+
DE_EXTRAS = ["formulaic", "pydeseq2"]
|
52
|
+
EdgeR = lazy_import("pertpy.tools._differential_gene_expression", "EdgeR", DE_EXTRAS + ["edger"])
|
53
|
+
PyDESeq2 = lazy_import("pertpy.tools._differential_gene_expression", "PyDESeq2", DE_EXTRAS)
|
54
|
+
Statsmodels = lazy_import("pertpy.tools._differential_gene_expression", "Statsmodels", DE_EXTRAS + ["statsmodels"])
|
55
|
+
TTest = lazy_import("pertpy.tools._differential_gene_expression", "TTest", DE_EXTRAS)
|
56
|
+
WilcoxonTest = lazy_import("pertpy.tools._differential_gene_expression", "WilcoxonTest", DE_EXTRAS)
|
57
|
+
|
58
|
+
__all__ = [
|
59
|
+
"Augur",
|
60
|
+
"Cinemaot",
|
61
|
+
"Sccoda",
|
62
|
+
"Tasccoda",
|
63
|
+
"Dialogue",
|
64
|
+
"EdgeR",
|
65
|
+
"PyDESeq2",
|
66
|
+
"WilcoxonTest",
|
67
|
+
"TTest",
|
68
|
+
"Statsmodels",
|
69
|
+
"DistanceTest",
|
70
|
+
"Distance",
|
71
|
+
"Enrichment",
|
72
|
+
"Milo",
|
73
|
+
"Mixscape",
|
74
|
+
"ClusteringSpace",
|
75
|
+
"LRClassifierSpace",
|
76
|
+
"MLPClassifierSpace",
|
77
|
+
"CentroidSpace",
|
78
|
+
"DBSCANSpace",
|
79
|
+
"KMeansSpace",
|
80
|
+
"PseudobulkSpace",
|
81
|
+
"Scgen",
|
82
|
+
]
|
@@ -1014,7 +1014,7 @@ class Milo:
|
|
1014
1014
|
if subset_nhoods is None:
|
1015
1015
|
subset_nhoods = nhood_adata.obs_names
|
1016
1016
|
|
1017
|
-
pl_df = pd.DataFrame(nhood_adata[subset_nhoods].X.
|
1017
|
+
pl_df = pd.DataFrame(nhood_adata[subset_nhoods].X.toarray(), columns=nhood_adata.var_names).melt(
|
1018
1018
|
var_name=nhood_adata.uns["sample_col"], value_name="n_cells"
|
1019
1019
|
)
|
1020
1020
|
pl_df = pd.merge(pl_df, nhood_adata.var)
|
{pertpy-0.8.0 → pertpy-0.9.3}/pertpy/tools/_perturbation_space/_discriminator_classifiers.py
RENAMED
@@ -408,7 +408,7 @@ class PLDataset(Dataset):
|
|
408
408
|
|
409
409
|
def __getitem__(self, idx):
|
410
410
|
"""Returns a sample and corresponding perturbations applied (labels)"""
|
411
|
-
sample = self.data[idx].
|
411
|
+
sample = self.data[idx].toarray().squeeze() if scipy.sparse.issparse(self.data) else self.data[idx]
|
412
412
|
num_label = self.labels.iloc[idx]
|
413
413
|
str_label = self.pert_labels.iloc[idx]
|
414
414
|
|
@@ -4,7 +4,7 @@ requires = ["hatchling"]
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "pertpy"
|
7
|
-
version = "0.
|
7
|
+
version = "0.9.3"
|
8
8
|
description = "Perturbation Analysis in the scverse ecosystem."
|
9
9
|
readme = "README.md"
|
10
10
|
requires-python = ">=3.10"
|
@@ -43,6 +43,7 @@ classifiers = [
|
|
43
43
|
"Programming Language :: Python :: 3",
|
44
44
|
"Programming Language :: Python :: 3.10",
|
45
45
|
"Programming Language :: Python :: 3.11",
|
46
|
+
"Programming Language :: Python :: 3.12",
|
46
47
|
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
47
48
|
"Topic :: Scientific/Engineering :: Visualization",
|
48
49
|
]
|
@@ -103,7 +103,11 @@ def test_distance_axioms(pairwise_distance, distance):
|
|
103
103
|
def test_triangle_inequality(pairwise_distance, distance, rng):
|
104
104
|
# Test if distances are well-defined in accordance with metric axioms
|
105
105
|
# (M4) Triangle inequality (we just probe this for a few random triplets)
|
106
|
-
for
|
106
|
+
# Some tests are not well defined for the triangle inequality. We skip those.
|
107
|
+
if distance in {"mahalanobis"}:
|
108
|
+
return
|
109
|
+
|
110
|
+
for _ in range(5):
|
107
111
|
triplet = rng.choice(pairwise_distance.index, size=3, replace=False)
|
108
112
|
assert (
|
109
113
|
pairwise_distance.loc[triplet[0], triplet[1]] + pairwise_distance.loc[triplet[1], triplet[2]]
|
@@ -1,57 +0,0 @@
|
|
1
|
-
from pertpy.tools._augur import Augur
|
2
|
-
from pertpy.tools._cinemaot import Cinemaot
|
3
|
-
from pertpy.tools._coda._sccoda import Sccoda
|
4
|
-
from pertpy.tools._coda._tasccoda import Tasccoda
|
5
|
-
from pertpy.tools._dialogue import Dialogue
|
6
|
-
from pertpy.tools._differential_gene_expression import (
|
7
|
-
DGEEVAL,
|
8
|
-
EdgeR,
|
9
|
-
PyDESeq2,
|
10
|
-
Statsmodels,
|
11
|
-
TTest,
|
12
|
-
WilcoxonTest,
|
13
|
-
)
|
14
|
-
from pertpy.tools._distances._distance_tests import DistanceTest
|
15
|
-
from pertpy.tools._distances._distances import Distance
|
16
|
-
from pertpy.tools._enrichment import Enrichment
|
17
|
-
from pertpy.tools._milo import Milo
|
18
|
-
from pertpy.tools._mixscape import Mixscape
|
19
|
-
from pertpy.tools._perturbation_space._clustering import ClusteringSpace
|
20
|
-
from pertpy.tools._perturbation_space._comparison import PerturbationComparison
|
21
|
-
from pertpy.tools._perturbation_space._discriminator_classifiers import (
|
22
|
-
LRClassifierSpace,
|
23
|
-
MLPClassifierSpace,
|
24
|
-
)
|
25
|
-
from pertpy.tools._perturbation_space._simple import (
|
26
|
-
CentroidSpace,
|
27
|
-
DBSCANSpace,
|
28
|
-
KMeansSpace,
|
29
|
-
PseudobulkSpace,
|
30
|
-
)
|
31
|
-
from pertpy.tools._scgen import Scgen
|
32
|
-
|
33
|
-
__all__ = [
|
34
|
-
"Augur",
|
35
|
-
"Cinemaot",
|
36
|
-
"Sccoda",
|
37
|
-
"Tasccoda",
|
38
|
-
"Dialogue",
|
39
|
-
"EdgeR",
|
40
|
-
"PyDESeq2",
|
41
|
-
"WilcoxonTest",
|
42
|
-
"TTest",
|
43
|
-
"Statsmodels",
|
44
|
-
"DistanceTest",
|
45
|
-
"Distance",
|
46
|
-
"Enrichment",
|
47
|
-
"Milo",
|
48
|
-
"Mixscape",
|
49
|
-
"ClusteringSpace",
|
50
|
-
"LRClassifierSpace",
|
51
|
-
"MLPClassifierSpace",
|
52
|
-
"CentroidSpace",
|
53
|
-
"DBSCANSpace",
|
54
|
-
"KMeansSpace",
|
55
|
-
"PseudobulkSpace",
|
56
|
-
"Scgen",
|
57
|
-
]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_compare_groups.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_input_checks.py
RENAMED
File without changes
|
File without changes
|
{pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_differential_gene_expression/test_simple_tests.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_perturbation_space/test_discriminator_classifiers.py
RENAMED
File without changes
|
File without changes
|
{pertpy-0.8.0 → pertpy-0.9.3}/tests/tools/_perturbation_space/test_simple_perturbation_space.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|