pertpy 0.9.4__tar.gz → 0.10.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/pull_request_template.md +3 -3
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/release-drafter.yml +2 -2
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/workflows/build.yml +2 -2
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/workflows/release.yml +2 -2
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/workflows/test.yml +8 -11
- {pertpy-0.9.4 → pertpy-0.10.0}/.gitignore +11 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.pre-commit-config.yaml +5 -5
- pertpy-0.10.0/.readthedocs.yml +18 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/CODE_OF_CONDUCT.md +14 -14
- {pertpy-0.9.4 → pertpy-0.10.0}/PKG-INFO +6 -6
- pertpy-0.10.0/docs/_static/docstring_previews/de_fold_change.png +0 -0
- pertpy-0.10.0/docs/_static/docstring_previews/de_multicomparison_fc.png +0 -0
- pertpy-0.10.0/docs/_static/docstring_previews/de_paired_expression.png +0 -0
- pertpy-0.10.0/docs/_static/docstring_previews/de_volcano.png +0 -0
- pertpy-0.10.0/docs/_static/docstring_previews/pseudobulk_samples.png +0 -0
- pertpy-0.10.0/docs/_static/tutorials/mcfarland.png +0 -0
- pertpy-0.10.0/docs/_static/tutorials/norman.png +0 -0
- pertpy-0.10.0/docs/_static/tutorials/zhang.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/conf.py +3 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/contributing.md +9 -9
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/index.md +6 -2
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/tutorials/index.md +28 -5
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/usage/usage.md +6 -6
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/__init__.py +1 -1
- pertpy-0.10.0/pertpy/_doc.py +19 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/data/_datasets.py +1 -1
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/metadata/_cell_line.py +18 -8
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/metadata/_compound.py +3 -4
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/metadata/_metadata.py +1 -1
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/preprocessing/_guide_rna.py +114 -13
- pertpy-0.10.0/pertpy/preprocessing/_guide_rna_mixture.py +179 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/__init__.py +1 -1
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_augur.py +64 -86
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_cinemaot.py +21 -17
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_coda/_base_coda.py +90 -117
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_dialogue.py +32 -40
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_differential_gene_expression/__init__.py +1 -2
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_differential_gene_expression/_base.py +486 -112
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_differential_gene_expression/_edger.py +30 -21
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_differential_gene_expression/_pydeseq2.py +15 -29
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_differential_gene_expression/_statsmodels.py +0 -11
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_distances/_distances.py +71 -56
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_enrichment.py +16 -8
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_milo.py +54 -50
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_mixscape.py +307 -208
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_perturbation_space/_perturbation_space.py +40 -31
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_perturbation_space/_simple.py +48 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_scgen/_scgen.py +35 -27
- {pertpy-0.9.4 → pertpy-0.10.0}/pyproject.toml +23 -8
- pertpy-0.10.0/tests/preprocessing/test_grna_assignment.py +62 -0
- pertpy-0.10.0/tests/tools/_differential_gene_expression/test_edger.py +62 -0
- pertpy-0.10.0/tests/tools/_differential_gene_expression/test_pydeseq2.py +65 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_distances/test_distances.py +2 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_perturbation_space/test_simple_perturbation_space.py +10 -2
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/test_augur.py +2 -3
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/test_mixscape.py +81 -5
- pertpy-0.9.4/.readthedocs.yml +0 -23
- pertpy-0.9.4/pertpy/tools/_differential_gene_expression/_formulaic.py +0 -189
- pertpy-0.9.4/tests/preprocessing/test_grna_assignment.py +0 -50
- pertpy-0.9.4/tests/tools/_differential_gene_expression/test_edger.py +0 -33
- pertpy-0.9.4/tests/tools/_differential_gene_expression/test_formulaic.py +0 -208
- pertpy-0.9.4/tests/tools/_differential_gene_expression/test_pydeseq2.py +0 -33
- {pertpy-0.9.4 → pertpy-0.10.0}/.editorconfig +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.gitattributes +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/labels.yml +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/workflows/labeler.yml +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.github/workflows/release_drafter.yml +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/.gitmodules +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/LICENSE +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/README.md +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/codecov.yml +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/Makefile +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_ext/edit_on_github.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_ext/typed_returns.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/SCVI_LICENSE +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/css/overwrite.css +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/css/sphinx_gallery.css +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/augur_dp_scatter.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/augur_important_features.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/augur_lollipop.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/augur_scatterplot.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/dialogue_pairplot.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/dialogue_violin.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/enrichment_dotplot.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/enrichment_gsea.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/milo_da_beeswarm.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/milo_nhood.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/milo_nhood_graph.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/mixscape_barplot.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/mixscape_heatmap.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/mixscape_lda.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/mixscape_perturbscore.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/mixscape_violin.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/sccoda_boxplots.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/sccoda_effects_barplot.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/sccoda_rel_abundance_dispersion_plot.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/sccoda_stacked_barplot.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/scgen_reg_mean.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/tasccoda_draw_effects.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/tasccoda_draw_tree.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/docstring_previews/tasccoda_effects_umap.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/icons/code-24px.svg +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/icons/computer-24px.svg +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/icons/library_books-24px.svg +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/icons/play_circle_outline-24px.svg +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/placeholder.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/augur.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/cinemaot.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/dge.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/dialogue.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/distances.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/distances_tests.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/enrichment.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/guide_rna_assignment.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/metadata.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/milo.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/mixscape.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/ontology.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/perturbation_space.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/placeholder.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/sccoda.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/sccoda_extended.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/scgen_perturbation_prediction.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_static/tutorials/tasccoda.png +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_templates/autosummary/class.rst +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/_templates/class_no_inherited.rst +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/code_of_conduct.md +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/installation.md +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/make.bat +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/references.bib +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/references.md +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/docs/utils.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/data/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/data/_dataloader.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/metadata/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/metadata/_drug.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/metadata/_look_up.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/metadata/_moa.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/plot/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/preprocessing/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/py.typed +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_coda/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_coda/_sccoda.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_coda/_tasccoda.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_differential_gene_expression/_checks.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_differential_gene_expression/_dge_comparison.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_differential_gene_expression/_simple_tests.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_distances/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_distances/_distance_tests.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_kernel_pca.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_perturbation_space/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_perturbation_space/_clustering.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_perturbation_space/_comparison.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_perturbation_space/_discriminator_classifiers.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_perturbation_space/_metrics.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_scgen/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_scgen/_base_components.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_scgen/_scgenvae.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/_scgen/_utils.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/decoupler_LICENSE +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/pertpy/tools/transferlearning_MMD_LICENSE +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/conftest.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/metadata/test_cell_line.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/metadata/test_compound.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/metadata/test_drug.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/metadata/test_moa.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_coda/test_sccoda.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_coda/test_tasccoda.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_differential_gene_expression/__init__.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_differential_gene_expression/conftest.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_differential_gene_expression/test_base.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_differential_gene_expression/test_compare_groups.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_differential_gene_expression/test_dge.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_differential_gene_expression/test_input_checks.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_differential_gene_expression/test_simple_tests.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_differential_gene_expression/test_statsmodels.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_distances/test_distance_tests.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_perturbation_space/test_comparison.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_perturbation_space/test_discriminator_classifiers.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/_perturbation_space/test_simple_cluster_space.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/haber_data.csv +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/r_result.csv +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/test_cinemaot.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/test_dialogue.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/test_enrichment.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/test_milo.py +0 -0
- {pertpy-0.9.4 → pertpy-0.10.0}/tests/tools/test_scgen.py +0 -0
@@ -4,9 +4,9 @@
|
|
4
4
|
|
5
5
|
<!-- Please fill in the appropriate checklist below (delete whatever is not relevant). These are the most common things requested on pull requests (PRs). -->
|
6
6
|
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
7
|
+
- [ ] Referenced issue is linked
|
8
|
+
- [ ] If you've fixed a bug or added code that should be tested, add tests!
|
9
|
+
- [ ] Documentation in `docs` is updated
|
10
10
|
|
11
11
|
**Description of changes**
|
12
12
|
|
@@ -16,10 +16,10 @@ jobs:
|
|
16
16
|
steps:
|
17
17
|
- uses: actions/checkout@v4
|
18
18
|
|
19
|
-
- name: Set up Python
|
19
|
+
- name: Set up Python
|
20
20
|
uses: actions/setup-python@v5
|
21
21
|
with:
|
22
|
-
python-version: "3.
|
22
|
+
python-version: "3.12"
|
23
23
|
cache: "pip"
|
24
24
|
cache-dependency-path: "**/pyproject.toml"
|
25
25
|
|
@@ -13,10 +13,10 @@ jobs:
|
|
13
13
|
- name: Checkout code
|
14
14
|
uses: actions/checkout@v4
|
15
15
|
|
16
|
-
- name: Set up Python 3.
|
16
|
+
- name: Set up Python 3.12
|
17
17
|
uses: actions/setup-python@v5
|
18
18
|
with:
|
19
|
-
python-version: "3.
|
19
|
+
python-version: "3.12"
|
20
20
|
|
21
21
|
- name: Install hatch
|
22
22
|
run: pip install hatch
|
@@ -21,19 +21,16 @@ jobs:
|
|
21
21
|
fail-fast: false
|
22
22
|
matrix:
|
23
23
|
include:
|
24
|
-
- os: ubuntu-latest
|
25
|
-
python: "3.10"
|
26
|
-
run_mode: "slow"
|
27
|
-
- os: ubuntu-latest
|
24
|
+
- os: ubuntu-22.04 # ubuntu-latest is currently broken for joblib
|
28
25
|
python: "3.12"
|
29
26
|
run_mode: "slow"
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
27
|
+
- os: ubuntu-22.04
|
28
|
+
python: "3.12"
|
29
|
+
run_mode: "fast"
|
30
|
+
# - os: ubuntu-latest
|
31
|
+
# python: "3.12"
|
32
|
+
# run_mode: slow
|
33
|
+
# pip-flags: "--pre"
|
37
34
|
|
38
35
|
env:
|
39
36
|
OS: ${{ matrix.os }}
|
@@ -137,6 +137,9 @@ dmypy.json
|
|
137
137
|
# Jetbrains IDE
|
138
138
|
.idea/
|
139
139
|
|
140
|
+
# VSCode
|
141
|
+
.vscode
|
142
|
+
|
140
143
|
# Coala
|
141
144
|
*.orig
|
142
145
|
|
@@ -155,3 +158,11 @@ lightning_logs/*
|
|
155
158
|
*/lightning_logs/*
|
156
159
|
|
157
160
|
node_modules
|
161
|
+
|
162
|
+
# lamindb
|
163
|
+
test.ipynb
|
164
|
+
test-perturbation
|
165
|
+
test-bug
|
166
|
+
|
167
|
+
# uv
|
168
|
+
uv.lock
|
@@ -2,8 +2,8 @@ fail_fast: false
|
|
2
2
|
default_language_version:
|
3
3
|
python: python3
|
4
4
|
default_stages:
|
5
|
-
- commit
|
6
|
-
- push
|
5
|
+
- pre-commit
|
6
|
+
- pre-push
|
7
7
|
minimum_pre_commit_version: 2.16.0
|
8
8
|
repos:
|
9
9
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
@@ -11,7 +11,7 @@ repos:
|
|
11
11
|
hooks:
|
12
12
|
- id: prettier
|
13
13
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
14
|
-
rev: v0.
|
14
|
+
rev: v0.8.6
|
15
15
|
hooks:
|
16
16
|
- id: ruff
|
17
17
|
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
|
@@ -27,12 +27,12 @@ repos:
|
|
27
27
|
- id: trailing-whitespace
|
28
28
|
- id: check-case-conflict
|
29
29
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
30
|
-
rev: v1.
|
30
|
+
rev: v1.14.1
|
31
31
|
hooks:
|
32
32
|
- id: mypy
|
33
33
|
args: [--no-strict-optional, --ignore-missing-imports]
|
34
34
|
additional_dependencies:
|
35
|
-
["types-
|
35
|
+
["types-setuptools", "types-requests", "types-attrs"]
|
36
36
|
- repo: local
|
37
37
|
hooks:
|
38
38
|
- id: forbid-to-commit
|
@@ -0,0 +1,18 @@
|
|
1
|
+
version: 2
|
2
|
+
build:
|
3
|
+
os: ubuntu-24.04
|
4
|
+
tools:
|
5
|
+
python: "3.12"
|
6
|
+
commands:
|
7
|
+
- asdf plugin add uv
|
8
|
+
- asdf install uv latest
|
9
|
+
- asdf global uv latest
|
10
|
+
- uv venv
|
11
|
+
- uv pip install .[doc,coda,de]
|
12
|
+
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
|
13
|
+
sphinx:
|
14
|
+
configuration: docs/conf.py
|
15
|
+
fail_on_warning: false
|
16
|
+
|
17
|
+
submodules:
|
18
|
+
include: all
|
@@ -14,23 +14,23 @@ religion, or sexual identity and orientation.
|
|
14
14
|
Examples of behavior that contributes to creating a positive environment
|
15
15
|
include:
|
16
16
|
|
17
|
-
-
|
18
|
-
-
|
19
|
-
-
|
20
|
-
-
|
21
|
-
-
|
17
|
+
- Using welcoming and inclusive language
|
18
|
+
- Being respectful of differing viewpoints and experiences
|
19
|
+
- Gracefully accepting constructive criticism
|
20
|
+
- Focusing on what is best for the community
|
21
|
+
- Showing empathy towards other community members
|
22
22
|
|
23
23
|
Examples of unacceptable behavior by participants include:
|
24
24
|
|
25
|
-
-
|
26
|
-
|
27
|
-
-
|
28
|
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
|
32
|
-
-
|
33
|
-
|
25
|
+
- The use of sexualized language or imagery and unwelcome sexual
|
26
|
+
attention or advances
|
27
|
+
- Trolling, insulting/derogatory comments, and personal or political
|
28
|
+
attacks
|
29
|
+
- Public or private harassment
|
30
|
+
- Publishing others’ private information, such as a physical or
|
31
|
+
electronic address, without explicit permission
|
32
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
33
|
+
professional setting
|
34
34
|
|
35
35
|
## Our Responsibilities
|
36
36
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: pertpy
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.10.0
|
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
|
@@ -44,9 +44,8 @@ Classifier: Programming Language :: Python :: 3.11
|
|
44
44
|
Classifier: Programming Language :: Python :: 3.12
|
45
45
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
46
46
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
47
|
-
Requires-Python:
|
47
|
+
Requires-Python: <3.13,>=3.10
|
48
48
|
Requires-Dist: adjusttext
|
49
|
-
Requires-Dist: anndata<0.10.9
|
50
49
|
Requires-Dist: blitzgsea
|
51
50
|
Requires-Dist: decoupler
|
52
51
|
Requires-Dist: lamin-utils
|
@@ -58,8 +57,8 @@ Requires-Dist: pyarrow
|
|
58
57
|
Requires-Dist: requests
|
59
58
|
Requires-Dist: rich
|
60
59
|
Requires-Dist: scanpy[leiden]
|
60
|
+
Requires-Dist: scikit-learn>=1.4
|
61
61
|
Requires-Dist: scikit-misc
|
62
|
-
Requires-Dist: scipy
|
63
62
|
Requires-Dist: scvi-tools
|
64
63
|
Requires-Dist: sparsecca
|
65
64
|
Provides-Extra: coda
|
@@ -69,7 +68,8 @@ Requires-Dist: pyqt5; extra == 'coda'
|
|
69
68
|
Requires-Dist: toytree; extra == 'coda'
|
70
69
|
Provides-Extra: de
|
71
70
|
Requires-Dist: formulaic; extra == 'de'
|
72
|
-
Requires-Dist:
|
71
|
+
Requires-Dist: formulaic-contrasts>=0.2.0; extra == 'de'
|
72
|
+
Requires-Dist: pydeseq2>=v0.5.0pre1; extra == 'de'
|
73
73
|
Provides-Extra: dev
|
74
74
|
Requires-Dist: pre-commit; extra == 'dev'
|
75
75
|
Provides-Extra: doc
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -195,4 +195,7 @@ nbsphinx_thumbnails = {
|
|
195
195
|
"tutorials/notebooks/differential_gene_expression": "_static/tutorials/dge.png",
|
196
196
|
"tutorials/notebooks/metadata_annotation": "_static/tutorials/metadata.png",
|
197
197
|
"tutorials/notebooks/ontology_mapping": "_static/tutorials/ontology.png",
|
198
|
+
"tutorials/notebooks/norman_use_case": "_static/tutorials/norman.png",
|
199
|
+
"tutorials/notebooks/mcfarland_use_case": "_static/tutorials/mcfarland.png",
|
200
|
+
"tutorials/notebooks/zhang_use_case": "_static/tutorials/zhang.png",
|
198
201
|
}
|
@@ -132,11 +132,11 @@ in the cookiecutter-scverse template.
|
|
132
132
|
|
133
133
|
Please write documentation for new or changed features and use-cases. This project uses [sphinx][] with the following features:
|
134
134
|
|
135
|
-
-
|
136
|
-
-
|
137
|
-
-
|
138
|
-
-
|
139
|
-
-
|
135
|
+
- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text
|
136
|
+
- Google-style docstrings
|
137
|
+
- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks))
|
138
|
+
- [Sphinx autodoc typehints][], to automatically reference annotated input and output types
|
139
|
+
- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/)
|
140
140
|
|
141
141
|
See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information
|
142
142
|
on how to write documentation.
|
@@ -150,10 +150,10 @@ These notebooks come from [pert-tutorials](https://github.com/scverse/pertpy-tut
|
|
150
150
|
|
151
151
|
#### Hints
|
152
152
|
|
153
|
-
-
|
154
|
-
|
155
|
-
-
|
156
|
-
|
153
|
+
- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only
|
154
|
+
if you do so can sphinx automatically create a link to the external documentation.
|
155
|
+
- If building the documentation fails because of a missing link that is outside your control, you can add an entry to
|
156
|
+
the `nitpick_ignore` list in `docs/conf.py`
|
157
157
|
|
158
158
|
#### Building the docs locally
|
159
159
|
|
@@ -54,8 +54,12 @@ Discussions <https://github.com/scverse/pertpy/discussions>
|
|
54
54
|
references
|
55
55
|
```
|
56
56
|
|
57
|
-
|
58
|
-
|
57
|
+
## Citation
|
58
|
+
|
59
|
+
[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
|
60
|
+
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)
|
61
|
+
|
62
|
+
Consider citing [scanpy Genome Biology (2018)] along with the original {doc}`references <references>`.
|
59
63
|
|
60
64
|
# Indices and tables
|
61
65
|
|
@@ -11,13 +11,25 @@ Many are also designed to work seamlessly in Google colab.
|
|
11
11
|
For questions about the usage of pertpy use the [scverse discourse](https://discourse.scverse.org/).
|
12
12
|
:::
|
13
13
|
|
14
|
-
## Quick start
|
14
|
+
## Quick start: Tool specific tutorials
|
15
|
+
|
16
|
+
### Data transformation
|
15
17
|
|
16
18
|
```{eval-rst}
|
17
19
|
.. nbgallery::
|
18
20
|
|
19
21
|
notebooks/guide_rna_assignment
|
20
22
|
notebooks/mixscape
|
23
|
+
notebooks/perturbation_space
|
24
|
+
notebooks/metadata_annotation
|
25
|
+
notebooks/ontology_mapping
|
26
|
+
```
|
27
|
+
|
28
|
+
### Knowledge inference
|
29
|
+
|
30
|
+
```{eval-rst}
|
31
|
+
.. nbgallery::
|
32
|
+
|
21
33
|
notebooks/augur
|
22
34
|
notebooks/sccoda
|
23
35
|
notebooks/sccoda_extended
|
@@ -29,13 +41,24 @@ For questions about the usage of pertpy use the [scverse discourse](https://disc
|
|
29
41
|
notebooks/distance_tests
|
30
42
|
notebooks/cinemaot
|
31
43
|
notebooks/scgen_perturbation_prediction
|
32
|
-
notebooks/perturbation_space
|
33
44
|
notebooks/differential_gene_expression
|
34
|
-
notebooks/metadata_annotation
|
35
|
-
notebooks/ontology_mapping
|
36
45
|
```
|
37
46
|
|
38
|
-
|
47
|
+
## Use cases
|
48
|
+
|
49
|
+
Our use cases showcase a variety of pertpy tools applied to one dataset.
|
50
|
+
They are designed to give you a sense of how to use pertpy in a real-world scenario.
|
51
|
+
The use cases featured here are those we present in the pertpy [preprint](https://www.biorxiv.org/content/10.1101/2024.08.04.606516v1).
|
52
|
+
|
53
|
+
```{eval-rst}
|
54
|
+
.. nbgallery::
|
55
|
+
|
56
|
+
notebooks/norman_use_case
|
57
|
+
notebooks/mcfarland_use_case
|
58
|
+
notebooks/zhang_use_case
|
59
|
+
```
|
60
|
+
|
61
|
+
## Glossary
|
39
62
|
|
40
63
|
```{eval-rst}
|
41
64
|
.. tab-set::
|
@@ -563,9 +563,9 @@ including cell line annotation, bulk RNA and protein expression data.
|
|
563
563
|
|
564
564
|
Available databases for cell line metadata:
|
565
565
|
|
566
|
-
-
|
567
|
-
-
|
568
|
-
-
|
566
|
+
- [The Cancer Dependency Map Project at Broad](https://depmap.org/portal/)
|
567
|
+
- [The Cancer Dependency Map Project at Sanger](https://depmap.sanger.ac.uk/)
|
568
|
+
- [Genomics of Drug Sensitivity in Cancer (GDSC)](https://www.cancerrxgene.org/)
|
569
569
|
|
570
570
|
### Compound
|
571
571
|
|
@@ -573,7 +573,7 @@ The Compound module enables the retrieval of various types of information relate
|
|
573
573
|
|
574
574
|
Available databases for compound metadata:
|
575
575
|
|
576
|
-
-
|
576
|
+
- [PubChem](https://pubchem.ncbi.nlm.nih.gov/)
|
577
577
|
|
578
578
|
### Mechanism of Action
|
579
579
|
|
@@ -581,7 +581,7 @@ This module aims to retrieve metadata of mechanism of action studies related to
|
|
581
581
|
|
582
582
|
Available databases for mechanism of action metadata:
|
583
583
|
|
584
|
-
-
|
584
|
+
- [CLUE](https://clue.io/)
|
585
585
|
|
586
586
|
### Drug
|
587
587
|
|
@@ -589,7 +589,7 @@ This module allows for the retrieval of Drug target information.
|
|
589
589
|
|
590
590
|
Available databases for drug metadata:
|
591
591
|
|
592
|
-
-
|
592
|
+
- [chembl](https://www.ebi.ac.uk/chembl/)
|
593
593
|
|
594
594
|
```{eval-rst}
|
595
595
|
.. autosummary::
|
@@ -0,0 +1,19 @@
|
|
1
|
+
from textwrap import dedent
|
2
|
+
|
3
|
+
|
4
|
+
def _doc_params(**kwds): # pragma: no cover
|
5
|
+
"""\
|
6
|
+
Docstrings should start with "\" in the first line for proper formatting.
|
7
|
+
"""
|
8
|
+
|
9
|
+
def dec(obj):
|
10
|
+
obj.__orig_doc__ = obj.__doc__
|
11
|
+
obj.__doc__ = dedent(obj.__doc__.format_map(kwds))
|
12
|
+
return obj
|
13
|
+
|
14
|
+
return dec
|
15
|
+
|
16
|
+
|
17
|
+
doc_common_plot_args = """\
|
18
|
+
return_fig: if `True`, returns figure of the plot, that can be used for saving.\
|
19
|
+
"""
|
@@ -66,7 +66,7 @@ def sc_sim_augur() -> AnnData: # pragma: no cover
|
|
66
66
|
output_file_path = settings.datasetdir / output_file_name
|
67
67
|
if not Path(output_file_path).exists():
|
68
68
|
_download(
|
69
|
-
url="https://figshare.com/ndownloader/files/
|
69
|
+
url="https://figshare.com/ndownloader/files/49828902",
|
70
70
|
output_file_name=output_file_name,
|
71
71
|
output_path=settings.datasetdir,
|
72
72
|
is_zip=False,
|
@@ -8,12 +8,15 @@ from lamin_utils import logger
|
|
8
8
|
if TYPE_CHECKING:
|
9
9
|
from collections.abc import Iterable
|
10
10
|
|
11
|
+
from matplotlib.pyplot import Figure
|
12
|
+
|
11
13
|
import matplotlib.pyplot as plt
|
12
14
|
import numpy as np
|
13
15
|
import pandas as pd
|
14
16
|
from scanpy import settings
|
15
17
|
from scipy import stats
|
16
18
|
|
19
|
+
from pertpy._doc import _doc_params, doc_common_plot_args
|
17
20
|
from pertpy.data._dataloader import _download
|
18
21
|
|
19
22
|
from ._look_up import LookUp
|
@@ -338,8 +341,8 @@ class CellLine(MetaData):
|
|
338
341
|
# then we can compare these keys and fetch the corresponding metadata.
|
339
342
|
if query_id not in adata.obs.columns:
|
340
343
|
raise ValueError(
|
341
|
-
f"The specified `query_id` {query_id} can't be found in the `adata.obs
|
342
|
-
"Ensure that you are using one of the available query IDs present in the adata.obs for the annotation
|
344
|
+
f"The specified `query_id` {query_id} can't be found in the `adata.obs`. \n"
|
345
|
+
"Ensure that you are using one of the available query IDs present in the adata.obs for the annotation."
|
343
346
|
"If the desired query ID is not available, you can fetch the cell line metadata "
|
344
347
|
"using the `annotate()` function before calling 'annotate_bulk_rna()'. "
|
345
348
|
"This ensures that the required query ID is included in your data, e.g. stripped_cell_line_name, DepMap ID."
|
@@ -356,9 +359,8 @@ class CellLine(MetaData):
|
|
356
359
|
else:
|
357
360
|
reference_id = "DepMap_ID"
|
358
361
|
logger.warning(
|
359
|
-
"To annotate bulk RNA data from Broad Institue, `DepMap_ID` is used as default reference and query identifier if no `reference_id` is given
|
360
|
-
"
|
361
|
-
"Alternatively, use `annotate()` to annotate the cell line first "
|
362
|
+
"To annotate bulk RNA data from Broad Institue, `DepMap_ID` is used as default reference and query identifier if no `reference_id` is given."
|
363
|
+
"If `DepMap_ID` isn't available in 'adata.obs', use `annotate()` to annotate the cell line first."
|
362
364
|
)
|
363
365
|
if self.bulk_rna_broad is None:
|
364
366
|
self._download_bulk_rna(cell_line_source="broad")
|
@@ -690,6 +692,7 @@ class CellLine(MetaData):
|
|
690
692
|
|
691
693
|
return corr, pvals, new_corr, new_pvals
|
692
694
|
|
695
|
+
@_doc_params(common_plot_args=doc_common_plot_args)
|
693
696
|
def plot_correlation(
|
694
697
|
self,
|
695
698
|
adata: AnnData,
|
@@ -700,7 +703,8 @@ class CellLine(MetaData):
|
|
700
703
|
metadata_key: str = "bulk_rna_broad",
|
701
704
|
category: str = "cell line",
|
702
705
|
subset_identifier: str | int | Iterable[str] | Iterable[int] | None = None,
|
703
|
-
|
706
|
+
return_fig: bool = False,
|
707
|
+
) -> Figure | None:
|
704
708
|
"""Visualise the correlation of cell lines with annotated metadata.
|
705
709
|
|
706
710
|
Args:
|
@@ -713,6 +717,8 @@ class CellLine(MetaData):
|
|
713
717
|
subset_identifier: Selected identifiers for scatter plot visualization between the X matrix and `metadata_key`.
|
714
718
|
If not None, only the chosen cell line will be plotted, either specified as a value in `identifier` (string) or as an index number.
|
715
719
|
If None, all cell lines will be plotted.
|
720
|
+
{common_plot_args}
|
721
|
+
|
716
722
|
Returns:
|
717
723
|
Pearson correlation coefficients and their corresponding p-values for matched and unmatched cell lines separately.
|
718
724
|
"""
|
@@ -740,7 +746,7 @@ class CellLine(MetaData):
|
|
740
746
|
if all(isinstance(id, str) for id in subset_identifier_list):
|
741
747
|
if set(subset_identifier_list).issubset(adata.obs[identifier].unique()):
|
742
748
|
subset_identifier_list = np.where(
|
743
|
-
np.
|
749
|
+
np.isin(adata.obs[identifier].values, subset_identifier_list)
|
744
750
|
)[0]
|
745
751
|
else:
|
746
752
|
raise ValueError("`Subset_identifier` must be found in adata.obs.`identifier`.")
|
@@ -790,6 +796,10 @@ class CellLine(MetaData):
|
|
790
796
|
"edgecolor": "black",
|
791
797
|
},
|
792
798
|
)
|
799
|
+
|
800
|
+
if return_fig:
|
801
|
+
return plt.gcf()
|
793
802
|
plt.show()
|
803
|
+
return None
|
794
804
|
else:
|
795
|
-
raise NotImplementedError
|
805
|
+
raise NotImplementedError("Only 'cell line' category is supported for correlation comparison.")
|
@@ -42,7 +42,7 @@ class Compound(MetaData):
|
|
42
42
|
adata = adata.copy()
|
43
43
|
|
44
44
|
if query_id not in adata.obs.columns:
|
45
|
-
raise ValueError(f"The requested query_id {query_id} is not in `adata.obs`.\n
|
45
|
+
raise ValueError(f"The requested query_id {query_id} is not in `adata.obs`.\n Please check again.")
|
46
46
|
|
47
47
|
query_dict = {}
|
48
48
|
not_matched_identifiers = []
|
@@ -84,7 +84,7 @@ class Compound(MetaData):
|
|
84
84
|
query_df = pd.DataFrame.from_dict(query_dict, orient="index", columns=["pubchem_name", "pubchem_ID", "smiles"])
|
85
85
|
# Merge and remove duplicate columns
|
86
86
|
# Column is converted to float after merging due to unmatches
|
87
|
-
# Convert back to integers
|
87
|
+
# Convert back to integers afterwards
|
88
88
|
if query_id_type == "cid":
|
89
89
|
query_df.pubchem_ID = query_df.pubchem_ID.astype("Int64")
|
90
90
|
adata.obs = (
|
@@ -119,8 +119,7 @@ class Compound(MetaData):
|
|
119
119
|
|
120
120
|
The LookUp object provides an overview of the metadata to annotate.
|
121
121
|
Each annotate_{metadata} function has a corresponding lookup function in the LookUp object,
|
122
|
-
where users can search the reference_id in the metadata and
|
123
|
-
compare with the query_id in their own data.
|
122
|
+
where users can search the reference_id in the metadata and compare with the query_id in their own data.
|
124
123
|
|
125
124
|
Returns:
|
126
125
|
Returns a LookUp object specific for compound annotation.
|
@@ -62,7 +62,7 @@ class MetaData:
|
|
62
62
|
if verbosity > 0:
|
63
63
|
logger.info(
|
64
64
|
f"There are {total_identifiers} identifiers in `adata.obs`."
|
65
|
-
f"However, {len(unmatched_identifiers)} identifiers can't be found in the {metadata_type} annotation,"
|
65
|
+
f"However, {len(unmatched_identifiers)} identifiers can't be found in the {metadata_type} annotation, "
|
66
66
|
"leading to the presence of NA values for their respective metadata.\n"
|
67
67
|
f"Please check again: *unmatched_identifiers[:verbosity]..."
|
68
68
|
)
|