pertpy 0.11.1__tar.gz → 0.11.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/release-drafter.yml +2 -2
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/workflows/test.yml +0 -8
- {pertpy-0.11.1 → pertpy-0.11.3}/.pre-commit-config.yaml +2 -2
- {pertpy-0.11.1 → pertpy-0.11.3}/PKG-INFO +34 -6
- {pertpy-0.11.1 → pertpy-0.11.3}/README.md +33 -5
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/pertpy_logo.svg +0 -1
- pertpy-0.11.3/docs/about/background.md +49 -0
- pertpy-0.11.3/docs/about/cite.md +20 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/changelog.md +14 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/conf.py +1 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/index.md +26 -4
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/installation.md +29 -17
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/__init__.py +1 -1
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/data/_dataloader.py +2 -2
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/metadata/_cell_line.py +21 -37
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/metadata/_compound.py +2 -1
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/metadata/_look_up.py +1 -1
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/metadata/_metadata.py +4 -9
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/metadata/_moa.py +0 -2
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_augur.py +0 -1
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_mixscape.py +3 -4
- {pertpy-0.11.1 → pertpy-0.11.3}/pyproject.toml +1 -2
- pertpy-0.11.3/tests/conftest.py +7 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/metadata/test_cell_line.py +0 -1
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_coda/test_sccoda.py +0 -1
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_distances/test_distance_tests.py +0 -3
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/test_augur.py +0 -1
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/test_dialogue.py +0 -2
- pertpy-0.11.1/tests/conftest.py +0 -20
- {pertpy-0.11.1 → pertpy-0.11.3}/.editorconfig +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.gitattributes +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/labels.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/pull_request_template.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/workflows/build.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/workflows/labeler.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/workflows/release.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.github/workflows/release_drafter.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.gitignore +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.gitmodules +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/.readthedocs.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/LICENSE +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/biome.jsonc +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/codecov.yml +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/Makefile +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_ext/edit_on_github.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_ext/typed_returns.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/SCVI_LICENSE +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/css/overwrite.css +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/css/sphinx_gallery.css +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/augur_dp_scatter.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/augur_important_features.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/augur_lollipop.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/augur_scatterplot.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/de_fold_change.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/de_multicomparison_fc.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/de_paired_expression.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/de_volcano.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/dialogue_pairplot.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/dialogue_violin.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/enrichment_dotplot.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/enrichment_gsea.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/milo_da_beeswarm.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/milo_nhood.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/milo_nhood_graph.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/mixscape_barplot.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/mixscape_heatmap.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/mixscape_lda.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/mixscape_perturbscore.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/mixscape_violin.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/pseudobulk_samples.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/sccoda_boxplots.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/sccoda_effects_barplot.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/sccoda_rel_abundance_dispersion_plot.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/sccoda_stacked_barplot.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/scgen_reg_mean.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/tasccoda_draw_effects.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/tasccoda_draw_tree.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/docstring_previews/tasccoda_effects_umap.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/icons/code-24px.svg +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/icons/computer-24px.svg +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/icons/library_books-24px.svg +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/icons/play_circle_outline-24px.svg +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/pertpy_logo.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/placeholder.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/augur.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/cinemaot.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/dge.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/dialogue.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/distances.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/distances_tests.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/enrichment.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/guide_rna_assignment.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/mcfarland.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/metadata.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/milo.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/mixscape.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/norman.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/ontology.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/perturbation_space.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/placeholder.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/sccoda.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/sccoda_extended.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/scgen_perturbation_prediction.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/tasccoda.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_static/tutorials/zhang.png +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/_templates/autosummary/class.rst +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/api/datasets_index.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/api/metadata_index.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/api/preprocessing_index.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/api/tools_index.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/api.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/contributing.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/make.bat +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/references.bib +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/references.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/tutorials/metadata.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/tutorials/preprocessing.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/tutorials/tools.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/tutorials.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/usecases.md +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/docs/utils.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/_doc.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/_types.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/data/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/data/_datasets.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/metadata/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/metadata/_drug.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/plot/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/preprocessing/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/preprocessing/_guide_rna.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/preprocessing/_guide_rna_mixture.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/py.typed +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_cinemaot.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_coda/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_coda/_base_coda.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_coda/_sccoda.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_coda/_tasccoda.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_dialogue.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_differential_gene_expression/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_differential_gene_expression/_base.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_differential_gene_expression/_checks.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_differential_gene_expression/_dge_comparison.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_differential_gene_expression/_edger.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_differential_gene_expression/_pydeseq2.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_differential_gene_expression/_simple_tests.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_differential_gene_expression/_statsmodels.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_distances/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_distances/_distance_tests.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_distances/_distances.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_enrichment.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_milo.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_perturbation_space/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_perturbation_space/_clustering.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_perturbation_space/_comparison.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_perturbation_space/_discriminator_classifiers.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_perturbation_space/_metrics.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_perturbation_space/_perturbation_space.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_perturbation_space/_simple.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_scgen/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_scgen/_base_components.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_scgen/_scgen.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_scgen/_scgenvae.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/_scgen/_utils.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/decoupler_LICENSE +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/pertpy/tools/transferlearning_MMD_LICENSE +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/metadata/test_compound.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/metadata/test_drug.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/metadata/test_moa.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/preprocessing/test_grna_assignment.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_coda/test_tasccoda.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/__init__.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/conftest.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/test_base.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/test_compare_groups.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/test_dge.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/test_edger.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/test_input_checks.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/test_pydeseq2.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/test_simple_tests.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_differential_gene_expression/test_statsmodels.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_distances/test_distances.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_perturbation_space/test_comparison.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_perturbation_space/test_discriminator_classifiers.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_perturbation_space/test_simple_cluster_space.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/_perturbation_space/test_simple_perturbation_space.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/test_cinemaot.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/test_enrichment.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/test_milo.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/test_mixscape.py +0 -0
- {pertpy-0.11.1 → pertpy-0.11.3}/tests/tools/test_scgen.py +0 -0
@@ -24,13 +24,8 @@ jobs:
|
|
24
24
|
include:
|
25
25
|
- os: ubuntu-latest
|
26
26
|
python: "3.13"
|
27
|
-
run_mode: "slow"
|
28
27
|
- os: ubuntu-latest
|
29
28
|
python: "3.13"
|
30
|
-
run_mode: "fast"
|
31
|
-
- os: ubuntu-latest
|
32
|
-
python: "3.13"
|
33
|
-
run_mode: slow
|
34
29
|
pip-flags: "--pre"
|
35
30
|
|
36
31
|
env:
|
@@ -91,9 +86,6 @@ jobs:
|
|
91
86
|
DISPLAY: :42
|
92
87
|
run: |
|
93
88
|
pytest_args="-m pytest -v --color=yes"
|
94
|
-
if [ "${{ matrix.run_mode }}" = "slow" ]; then
|
95
|
-
pytest_args="$pytest_args --runslow"
|
96
|
-
fi
|
97
89
|
coverage run $pytest_args
|
98
90
|
|
99
91
|
- name: Show coverage report
|
@@ -11,7 +11,7 @@ repos:
|
|
11
11
|
hooks:
|
12
12
|
- id: biome-format
|
13
13
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
14
|
-
rev: v0.11.
|
14
|
+
rev: v0.11.9
|
15
15
|
hooks:
|
16
16
|
- id: ruff
|
17
17
|
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
|
@@ -33,7 +33,7 @@ repos:
|
|
33
33
|
- id: no-commit-to-branch
|
34
34
|
args: ["--branch=main"]
|
35
35
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
36
|
-
rev: v1.
|
36
|
+
rev: v1.15.0
|
37
37
|
hooks:
|
38
38
|
- id: mypy
|
39
39
|
args: [--no-strict-optional, --ignore-missing-imports]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pertpy
|
3
|
-
Version: 0.11.
|
3
|
+
Version: 0.11.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
|
@@ -132,26 +132,54 @@ You can install _pertpy_ in less than a minute via [pip] from [PyPI]:
|
|
132
132
|
pip install pertpy
|
133
133
|
```
|
134
134
|
|
135
|
+
### Differential gene expression
|
136
|
+
|
137
|
+
If you want to use the differential gene expression interface, please install pertpy by running:
|
138
|
+
|
139
|
+
```console
|
140
|
+
pip install 'pertpy[de]'
|
141
|
+
```
|
142
|
+
|
143
|
+
### tascCODA
|
144
|
+
|
135
145
|
if you want to use tascCODA, please install pertpy as follows:
|
136
146
|
|
137
147
|
```console
|
138
148
|
pip install 'pertpy[tcoda]'
|
139
149
|
```
|
140
150
|
|
141
|
-
|
151
|
+
### milo
|
152
|
+
|
153
|
+
milo further requires edger, statmod, and rpy2 to be installed:
|
154
|
+
|
155
|
+
```R
|
156
|
+
BiocManager::install("edgeR")
|
157
|
+
BiocManager::install("statmod")
|
158
|
+
```
|
142
159
|
|
143
160
|
```console
|
144
|
-
pip install
|
161
|
+
pip install rpy2
|
145
162
|
```
|
146
163
|
|
147
164
|
## Citation
|
148
165
|
|
149
|
-
|
150
|
-
|
166
|
+
```bibtex
|
167
|
+
@article {Heumos2024.08.04.606516,
|
168
|
+
author = {Heumos, Lukas and Ji, Yuge and May, Lilly and Green, Tessa and Zhang, Xinyue and Wu, Xichen and Ostner, Johannes and Peidli, Stefan and Schumacher, Antonia and Hrovatin, Karin and Müller, Michaela and Chong, Faye and Sturm, Gregor and Tejada, Alejandro and Dann, Emma and Dong, Mingze and Bahrami, Mojtaba and Gold, Ilan and Rybakov, Sergei and Namsaraeva, Altana and Moinfar, Amir and Zheng, Zihe and Roellin, Eljas and Mekki, Isra and Sander, Chris and Lotfollahi, Mohammad and Schiller, Herbert B. and Theis, Fabian J.},
|
169
|
+
title = {Pertpy: an end-to-end framework for perturbation analysis},
|
170
|
+
elocation-id = {2024.08.04.606516},
|
171
|
+
year = {2024},
|
172
|
+
doi = {10.1101/2024.08.04.606516},
|
173
|
+
publisher = {Cold Spring Harbor Laboratory},
|
174
|
+
URL = {https://www.biorxiv.org/content/early/2024/08/07/2024.08.04.606516},
|
175
|
+
eprint = {https://www.biorxiv.org/content/early/2024/08/07/2024.08.04.606516.full.pdf},
|
176
|
+
journal = {bioRxiv}
|
177
|
+
}
|
178
|
+
```
|
151
179
|
|
152
180
|
[pip]: https://pip.pypa.io/
|
153
181
|
[pypi]: https://pypi.org/
|
154
|
-
[api]: https://pertpy.readthedocs.io/en/latest/api
|
182
|
+
[api]: https://pertpy.readthedocs.io/en/latest/api.html
|
155
183
|
[//]: # "numfocus-fiscal-sponsor-attribution"
|
156
184
|
|
157
185
|
pertpy is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
|
@@ -29,26 +29,54 @@ You can install _pertpy_ in less than a minute via [pip] from [PyPI]:
|
|
29
29
|
pip install pertpy
|
30
30
|
```
|
31
31
|
|
32
|
+
### Differential gene expression
|
33
|
+
|
34
|
+
If you want to use the differential gene expression interface, please install pertpy by running:
|
35
|
+
|
36
|
+
```console
|
37
|
+
pip install 'pertpy[de]'
|
38
|
+
```
|
39
|
+
|
40
|
+
### tascCODA
|
41
|
+
|
32
42
|
if you want to use tascCODA, please install pertpy as follows:
|
33
43
|
|
34
44
|
```console
|
35
45
|
pip install 'pertpy[tcoda]'
|
36
46
|
```
|
37
47
|
|
38
|
-
|
48
|
+
### milo
|
49
|
+
|
50
|
+
milo further requires edger, statmod, and rpy2 to be installed:
|
51
|
+
|
52
|
+
```R
|
53
|
+
BiocManager::install("edgeR")
|
54
|
+
BiocManager::install("statmod")
|
55
|
+
```
|
39
56
|
|
40
57
|
```console
|
41
|
-
pip install
|
58
|
+
pip install rpy2
|
42
59
|
```
|
43
60
|
|
44
61
|
## Citation
|
45
62
|
|
46
|
-
|
47
|
-
|
63
|
+
```bibtex
|
64
|
+
@article {Heumos2024.08.04.606516,
|
65
|
+
author = {Heumos, Lukas and Ji, Yuge and May, Lilly and Green, Tessa and Zhang, Xinyue and Wu, Xichen and Ostner, Johannes and Peidli, Stefan and Schumacher, Antonia and Hrovatin, Karin and Müller, Michaela and Chong, Faye and Sturm, Gregor and Tejada, Alejandro and Dann, Emma and Dong, Mingze and Bahrami, Mojtaba and Gold, Ilan and Rybakov, Sergei and Namsaraeva, Altana and Moinfar, Amir and Zheng, Zihe and Roellin, Eljas and Mekki, Isra and Sander, Chris and Lotfollahi, Mohammad and Schiller, Herbert B. and Theis, Fabian J.},
|
66
|
+
title = {Pertpy: an end-to-end framework for perturbation analysis},
|
67
|
+
elocation-id = {2024.08.04.606516},
|
68
|
+
year = {2024},
|
69
|
+
doi = {10.1101/2024.08.04.606516},
|
70
|
+
publisher = {Cold Spring Harbor Laboratory},
|
71
|
+
URL = {https://www.biorxiv.org/content/early/2024/08/07/2024.08.04.606516},
|
72
|
+
eprint = {https://www.biorxiv.org/content/early/2024/08/07/2024.08.04.606516.full.pdf},
|
73
|
+
journal = {bioRxiv}
|
74
|
+
}
|
75
|
+
```
|
48
76
|
|
49
77
|
[pip]: https://pip.pypa.io/
|
50
78
|
[pypi]: https://pypi.org/
|
51
|
-
[api]: https://pertpy.readthedocs.io/en/latest/api
|
79
|
+
[api]: https://pertpy.readthedocs.io/en/latest/api.html
|
52
80
|
[//]: # "numfocus-fiscal-sponsor-attribution"
|
53
81
|
|
54
82
|
pertpy is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
|
@@ -1,5 +1,4 @@
|
|
1
1
|
<svg width="308" height="105" viewBox="0 0 308 105" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<rect width="308" height="105" fill="#1E1E1E"/>
|
3
2
|
<path d="M26.432 17.656C41.664 17.4 48.576 31.736 48.704 47.992C48.704 62.328 41.536 75.768 26.176 76.28C19.904 76.28 14.528 74.36 9.28 71.16V104.312L0.0640001 100.984L0.192 27.384C0.0640001 27.384 7.36 17.784 26.304 17.528L26.432 17.656ZM24.128 69.624C36.416 68.856 37.952 56.824 37.952 47.352C37.952 38.136 36.416 24.312 24.768 23.8C16.832 23.288 10.432 27 9.152 28.28V64.76C12.224 66.68 18.368 70.008 24.128 69.624ZM105.92 69.88C102.976 71.8 100.032 73.464 96.32 74.616C88.256 76.92 77.76 77.048 71.104 71.416C64.96 66.168 61.248 57.336 61.248 47.864C61.376 33.144 67.392 17.912 83.776 17.912C99.392 17.912 105.152 28.664 105.408 45.944H71.104C70.08 60.536 77.504 70.392 88 70.008C94.4 69.88 99.008 67.704 103.744 65.4L105.92 69.88ZM95.936 40.44L96.064 40.568C96.064 32.376 92.48 23.672 84.16 23.672C75.2 23.672 72 32.376 71.36 40.44H95.936ZM142.476 24.568H142.348C136.204 24.568 131.98 26.872 128.652 29.688V75H119.308V28.408C122.764 24.568 127.372 21.496 132.62 19.704C138.252 17.656 143.628 16.376 151.436 17.784C150.284 20.088 148.748 23.032 147.724 25.336C145.932 24.952 143.756 24.568 142.476 24.568ZM163.362 24.952H156.962V18.936H163.362V3.32L172.706 -0.00800323V18.936H183.202V24.952H172.706V61.432C172.706 68.856 176.674 70.648 183.202 70.904V75.768C170.786 76.92 163.362 71.288 163.362 61.688V24.952Z" fill="#30679A"/>
|
4
3
|
<path d="M223.307 17.656C238.539 17.4 245.451 31.736 245.579 47.992C245.579 62.328 238.411 75.768 223.051 76.28C216.779 76.28 211.403 74.36 206.155 71.16V104.312L196.939 100.984L197.067 27.384C196.939 27.384 204.235 17.784 223.179 17.528L223.307 17.656ZM221.003 69.624C233.291 68.856 234.827 56.824 234.827 47.352C234.827 38.136 233.291 24.312 221.643 23.8C213.707 23.288 207.307 27 206.027 28.28V64.76C209.099 66.68 215.243 70.008 221.003 69.624ZM270.411 56.824V56.696C270.411 65.272 276.555 69.752 284.875 69.624C289.867 69.496 295.499 66.68 298.571 64.632V18.936H307.915V69.752C307.915 76.28 307.531 86.136 304.843 91.256C300.107 100.216 286.795 103.8 277.323 104.056L275.787 98.168C282.955 97.144 293.195 96.12 297.035 88.824C298.955 85.24 299.083 78.2 299.083 74.104C299.083 72.696 299.211 73.08 299.083 71.672C296.267 72.952 289.995 76.024 278.987 76.024C270.539 76.024 260.939 70.008 260.939 59.64V20.728L270.411 17.528V56.824Z" fill="#D2455E"/>
|
5
4
|
</svg>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# About Pertpy
|
2
|
+
|
3
|
+
Pertpy is an end-to-end framework for the analysis of large-scale single-cell perturbation experiments.
|
4
|
+
It provides access to harmonized perturbation datasets and metadata databases along with numerous fast and user-friendly implementations of both established and novel methods such as automatic metadata annotation or perturbation distances to efficiently analyze perturbation data.
|
5
|
+
As part of the scverse ecosystem, pertpy interoperates with existing single-cell analysis libraries and is designed to be easily extended.
|
6
|
+
If you find pertpy useful for your research, please check out {doc}`cite`.
|
7
|
+
|
8
|
+
## Design principles
|
9
|
+
|
10
|
+
Our framework is based on three key principles: `Modularity`, `Flexibility`, and `Scalability`.
|
11
|
+
|
12
|
+
### Modularity
|
13
|
+
|
14
|
+
Pertpy includes modules for analysis of single and combinatorial perturbations covering diverse types of perturbation data including genetic knockouts, drug screens, and disease states.
|
15
|
+
The framework is designed for flexibility, offering more than 100 composable and interoperable analysis functions organized in modules which further ease downstream interpretation and visualization.
|
16
|
+
These modules host fundamental building blocks for implementation and methods that share functionality and can be chained into custom pipelines.
|
17
|
+
|
18
|
+
A typical Pertpy workflow consists of several steps:
|
19
|
+
|
20
|
+
* Initial **data transformation** such as guide RNA assignment for CRISPR screens
|
21
|
+
* **Quality control** to address confounding factors and technical variation
|
22
|
+
* **Metadata annotation** against ontologies and enrichment from databases
|
23
|
+
* **Perturbation space analysis** to learn biologically interpretable embeddings
|
24
|
+
* **Downstream analysis** including differential expression, compositional analysis, and distance calculation
|
25
|
+
|
26
|
+
This modular approach yields a powerful and flexible framework as many analysis steps can be independently applied or chained together.
|
27
|
+
|
28
|
+
### Flexibility
|
29
|
+
|
30
|
+
Pertpy is purpose-built to organize, analyze, and visualize complex perturbation datasets.
|
31
|
+
It is flexible and can be applied to datasets of different assays, data types, sizes, and perturbations, thereby unifying previous data-type- or assay-specific single-problem approaches.
|
32
|
+
Designed to integrate external metadata with measured data, it enables unprecedented contextualization of results through swiftly built, experiment-specific pipelines, leading to more robust outcomes.
|
33
|
+
|
34
|
+
The inputs to a typical analysis with pertpy are unimodal scRNA-seq or multimodal perturbation readouts stored in AnnData or MuData objects.
|
35
|
+
While pertpy is primarily designed to explore perturbations such as genetic modifications, drug treatments, exposure to pathogens, and other environmental conditions, its utility extends to various other perturbation settings, including diverse disease states where experimental perturbations have not been applied.
|
36
|
+
|
37
|
+
### Scalability
|
38
|
+
|
39
|
+
Pertpy addresses a wide array of use-cases and different types of growing datasets through its sparse and memory-efficient implementations, which leverage the parallelization and GPU acceleration library Jax, and numba, thereby making them substantially faster than original implementations.
|
40
|
+
The framework can be applied to datasets ranging from thousands to millions of cells.
|
41
|
+
|
42
|
+
For example, when analyzing CRISPR screens, Pertpy's implementation of Mixscape is optimized using PyNNDescent for nearest neighbor search during the calculation of perturbation signatures.
|
43
|
+
Other methods such as scCODA and tascCODA are accelerated by replacing the Hamiltonian Monte Carlo algorithm in TensorFlow with the no-U-turn sampler from numpyro.
|
44
|
+
CINEMA-OT is optimized with ott-jax to make the implementation portable across hardware, enabling GPU acceleration.
|
45
|
+
|
46
|
+
## Why is it called "Pertpy"?
|
47
|
+
|
48
|
+
Pertpy is named for its core purpose: The analysis of **pert**urbations in **Py**thon.
|
49
|
+
The framework unifies perturbation analysis approaches across different data types and experimental designs, providing a comprehensive solution for understanding cellular responses to various stimuli.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Citing pertpy
|
2
|
+
|
3
|
+
If you find pertpy useful for your research, please consider citing our work as follows:
|
4
|
+
|
5
|
+
```bibtex
|
6
|
+
@article {Heumos2024.08.04.606516,
|
7
|
+
author = {Heumos, Lukas and Ji, Yuge and May, Lilly and Green, Tessa and Zhang, Xinyue and Wu, Xichen and Ostner, Johannes and Peidli, Stefan and Schumacher, Antonia and Hrovatin, Karin and Müller, Michaela and Chong, Faye and Sturm, Gregor and Tejada, Alejandro and Dann, Emma and Dong, Mingze and Bahrami, Mojtaba and Gold, Ilan and Rybakov, Sergei and Namsaraeva, Altana and Moinfar, Amir and Zheng, Zihe and Roellin, Eljas and Mekki, Isra and Sander, Chris and Lotfollahi, Mohammad and Schiller, Herbert B. and Theis, Fabian J.},
|
8
|
+
title = {Pertpy: an end-to-end framework for perturbation analysis},
|
9
|
+
elocation-id = {2024.08.04.606516},
|
10
|
+
year = {2024},
|
11
|
+
doi = {10.1101/2024.08.04.606516},
|
12
|
+
publisher = {Cold Spring Harbor Laboratory},
|
13
|
+
URL = {https://www.biorxiv.org/content/early/2024/08/07/2024.08.04.606516},
|
14
|
+
eprint = {https://www.biorxiv.org/content/early/2024/08/07/2024.08.04.606516.full.pdf},
|
15
|
+
journal = {bioRxiv}
|
16
|
+
}
|
17
|
+
```
|
18
|
+
|
19
|
+
If you are using any previously published tool, please also cite the original publication.
|
20
|
+
All tool specific references can be found here: {doc}`../references`.
|
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## v0.11.3
|
9
|
+
|
10
|
+
## 🚀 Features
|
11
|
+
|
12
|
+
* add about page (#770) @Zethson
|
13
|
+
* Simplify Metadata errors (#765) @Zethson
|
14
|
+
* Standardize scCODA plot palette interface (#773) @mschilli87
|
15
|
+
|
16
|
+
## v0.11.2
|
17
|
+
|
18
|
+
### 🚀 Features
|
19
|
+
|
20
|
+
* Simplify Metadata errors ([#765](https://github.com/scverse/pertpy/pull/765)) @Zethson
|
21
|
+
|
8
22
|
## v0.11.1
|
9
23
|
|
10
24
|
### 🐛 Bug Fixes
|
@@ -128,6 +128,7 @@ nitpick_ignore = [
|
|
128
128
|
("py:class", "pertpy.tools._distances._distances.MeanVar"),
|
129
129
|
("py:class", "The requested data as a NumPy array."),
|
130
130
|
("py:class", "The full registry saved with the model"),
|
131
|
+
("py:class", "The requested data."),
|
131
132
|
("py:class", "Model with loaded state dictionaries."),
|
132
133
|
("py:class", "pertpy.tools.lazy_import.<locals>.Placeholder"),
|
133
134
|
]
|
@@ -46,7 +46,7 @@ It provides tools for harmonizing perturbation datasets, automating metadata ann
|
|
46
46
|
```
|
47
47
|
|
48
48
|
```{toctree}
|
49
|
-
:caption: 'General
|
49
|
+
:caption: 'General'
|
50
50
|
:hidden: true
|
51
51
|
:maxdepth: 1
|
52
52
|
|
@@ -58,7 +58,7 @@ references
|
|
58
58
|
```
|
59
59
|
|
60
60
|
```{toctree}
|
61
|
-
:caption: 'Gallery
|
61
|
+
:caption: 'Gallery'
|
62
62
|
:hidden: true
|
63
63
|
:maxdepth: 1
|
64
64
|
|
@@ -66,10 +66,32 @@ tutorials
|
|
66
66
|
usecases
|
67
67
|
```
|
68
68
|
|
69
|
+
```{toctree}
|
70
|
+
:caption: 'About'
|
71
|
+
:hidden: true
|
72
|
+
:maxdepth: 1
|
73
|
+
|
74
|
+
about/background
|
75
|
+
about/cite
|
76
|
+
GitHub <https://github.com/scverse/pertpy>
|
77
|
+
Discourse <https://discourse.scverse.org/c/ecosystem/pertpy/46>
|
78
|
+
```
|
79
|
+
|
69
80
|
## Citation
|
70
81
|
|
71
|
-
|
72
|
-
|
82
|
+
```bibtex
|
83
|
+
@article {Heumos2024.08.04.606516,
|
84
|
+
author = {Heumos, Lukas and Ji, Yuge and May, Lilly and Green, Tessa and Zhang, Xinyue and Wu, Xichen and Ostner, Johannes and Peidli, Stefan and Schumacher, Antonia and Hrovatin, Karin and Müller, Michaela and Chong, Faye and Sturm, Gregor and Tejada, Alejandro and Dann, Emma and Dong, Mingze and Bahrami, Mojtaba and Gold, Ilan and Rybakov, Sergei and Namsaraeva, Altana and Moinfar, Amir and Zheng, Zihe and Roellin, Eljas and Mekki, Isra and Sander, Chris and Lotfollahi, Mohammad and Schiller, Herbert B. and Theis, Fabian J.},
|
85
|
+
title = {Pertpy: an end-to-end framework for perturbation analysis},
|
86
|
+
elocation-id = {2024.08.04.606516},
|
87
|
+
year = {2024},
|
88
|
+
doi = {10.1101/2024.08.04.606516},
|
89
|
+
publisher = {Cold Spring Harbor Laboratory},
|
90
|
+
URL = {https://www.biorxiv.org/content/early/2024/08/07/2024.08.04.606516},
|
91
|
+
eprint = {https://www.biorxiv.org/content/early/2024/08/07/2024.08.04.606516.full.pdf},
|
92
|
+
journal = {bioRxiv}
|
93
|
+
}
|
94
|
+
```
|
73
95
|
|
74
96
|
## NumFOCUS
|
75
97
|
|
@@ -16,17 +16,9 @@ This is the preferred method to install pertpy, as it will always install the mo
|
|
16
16
|
|
17
17
|
If you don't have [pip] installed, this [Python installation guide] can guide you through the process.
|
18
18
|
|
19
|
-
|
19
|
+
### Additional dependency groups
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
TascCODA requires an additional set of dependencies (ete4, pyqt6, and toytree) that can be installed by running:
|
24
|
-
|
25
|
-
```console
|
26
|
-
pip install pertpy[tcoda]
|
27
|
-
```
|
28
|
-
|
29
|
-
## Differential gene expression interface
|
21
|
+
#### Differential gene expression interface
|
30
22
|
|
31
23
|
The DGE interface of pertpy requires additional dependencies that can be installed by running:
|
32
24
|
|
@@ -44,21 +36,25 @@ BiocManager::install("edgeR")
|
|
44
36
|
pip install rpy2
|
45
37
|
```
|
46
38
|
|
47
|
-
|
39
|
+
#### milo
|
48
40
|
|
49
|
-
|
50
|
-
Please note that you require [poetry] to be installed.
|
41
|
+
milo further requires edger, statmod, and rpy2 to be installed:
|
51
42
|
|
52
|
-
|
43
|
+
```R
|
44
|
+
BiocManager::install("edgeR")
|
45
|
+
BiocManager::install("statmod")
|
46
|
+
```
|
53
47
|
|
54
48
|
```console
|
55
|
-
|
49
|
+
pip install rpy2
|
56
50
|
```
|
57
51
|
|
58
|
-
|
52
|
+
#### tascCODA
|
53
|
+
|
54
|
+
TascCODA requires an additional set of dependencies (ete4, pyqt6, and toytree) that can be installed by running:
|
59
55
|
|
60
56
|
```console
|
61
|
-
|
57
|
+
pip install pertpy[tcoda]
|
62
58
|
```
|
63
59
|
|
64
60
|
## Apple Silicon
|
@@ -100,6 +96,22 @@ Follow these steps to install pertpy on an Apple Silicon machine (tested on a Ma
|
|
100
96
|
|
101
97
|
Now you're ready to use pertpy as usual within the environment (`import pertpy`).
|
102
98
|
|
99
|
+
## From sources
|
100
|
+
|
101
|
+
The sources for pertpy can be downloaded from the [Github repo].
|
102
|
+
|
103
|
+
You can either clone the public repository:
|
104
|
+
|
105
|
+
```console
|
106
|
+
$ git clone git://github.com/scverse/pertpy
|
107
|
+
```
|
108
|
+
|
109
|
+
Or download the [tarball]:
|
110
|
+
|
111
|
+
```console
|
112
|
+
$ curl -OJL https://github.com/scverse/pertpy/tarball/master
|
113
|
+
```
|
114
|
+
|
103
115
|
[github repo]: https://github.com/scverse/pertpy
|
104
116
|
[pip]: https://pip.pypa.io
|
105
117
|
[poetry]: https://python-poetry.org/
|
@@ -15,8 +15,8 @@ from rich.progress import Progress
|
|
15
15
|
|
16
16
|
def _download( # pragma: no cover
|
17
17
|
url: str,
|
18
|
-
output_file_name: str = None,
|
19
|
-
output_path: str | Path = None,
|
18
|
+
output_file_name: str | None = None,
|
19
|
+
output_path: str | Path | None = None,
|
20
20
|
block_size: int = 1024,
|
21
21
|
overwrite: bool = False,
|
22
22
|
is_zip: bool = False,
|
@@ -215,7 +215,7 @@ class CellLine(MetaData):
|
|
215
215
|
For each cell, we fetch cell line annotation from either the Dependency Map (DepMap) or The Genomics of Drug Sensitivity in Cancer Project (Cancerxgene).
|
216
216
|
|
217
217
|
Args:
|
218
|
-
adata: The
|
218
|
+
adata: The AnnData object to annotate.
|
219
219
|
query_id: The column of ``.obs`` with cell line information.
|
220
220
|
reference_id: The type of cell line identifier in the metadata, e.g. ModelID, CellLineName or StrippedCellLineName.
|
221
221
|
If fetching cell line metadata from Cancerrxgene, it is recommended to choose "stripped_cell_line_name".
|
@@ -311,11 +311,9 @@ class CellLine(MetaData):
|
|
311
311
|
|
312
312
|
else:
|
313
313
|
raise ValueError(
|
314
|
-
f"The requested cell line type {reference_id} is
|
315
|
-
"Refer to the available reference identifier in the chosen database
|
316
|
-
"
|
317
|
-
"Alternatively, create a `CellLineMetaData.lookup()` object to "
|
318
|
-
"obtain the available reference identifiers in the metadata."
|
314
|
+
f"The requested cell line type {reference_id} is unavailable."
|
315
|
+
"Refer to the available reference identifier in the chosen database."
|
316
|
+
"Alternatively, create a `CellLineMetaData.lookup()` object to obtain the available reference identifiers in the metadata."
|
319
317
|
)
|
320
318
|
|
321
319
|
return adata
|
@@ -362,11 +360,9 @@ class CellLine(MetaData):
|
|
362
360
|
# then we can compare these keys and fetch the corresponding metadata.
|
363
361
|
if query_id not in adata.obs.columns and query_id is not None:
|
364
362
|
raise ValueError(
|
365
|
-
f"
|
366
|
-
"
|
367
|
-
"
|
368
|
-
"using the `annotate()` function before calling 'annotate_bulk_rna()'. "
|
369
|
-
"This ensures that the required query ID is included in your data, e.g. stripped_cell_line_name, DepMap ID."
|
363
|
+
f"Specified `query_id` {query_id} can't be found in `adata.obs`. \n"
|
364
|
+
"If the desired query ID is not available, fetch the cell line metadata "
|
365
|
+
"using the `annotate()` function before calling 'annotate_bulk_rna()'."
|
370
366
|
)
|
371
367
|
if query_id is None:
|
372
368
|
query_id = "cell_line_name" if cell_line_source == "sanger" else "DepMap_ID"
|
@@ -376,9 +372,8 @@ class CellLine(MetaData):
|
|
376
372
|
if cell_line_source == "sanger":
|
377
373
|
if query_id not in adata.obs.columns:
|
378
374
|
raise ValueError(
|
379
|
-
"
|
380
|
-
"
|
381
|
-
"If cell line name isn't available in 'adata.obs', use `annotate()` to annotate the cell line first."
|
375
|
+
f"Missing '{query_id}' in `adata.obs`. For Sanger, need `cell_line_name` column "
|
376
|
+
f"or specify column with cell line names via `query_id` parameter."
|
382
377
|
)
|
383
378
|
if self.bulk_rna_sanger is None:
|
384
379
|
self._download_bulk_rna(cell_line_source="sanger")
|
@@ -387,9 +382,8 @@ class CellLine(MetaData):
|
|
387
382
|
else:
|
388
383
|
if query_id not in adata.obs.columns:
|
389
384
|
raise ValueError(
|
390
|
-
"
|
391
|
-
"
|
392
|
-
"If DepMap ID isn't available in 'adata.obs', use `annotate()` to annotate the cell line first."
|
385
|
+
f"Missing '{query_id}' in `adata.obs`. For Broad Institute data, need `DepMap_ID` column "
|
386
|
+
f"or specify column with DepMap IDs via `query_id` parameter."
|
393
387
|
)
|
394
388
|
reference_id = "DepMap_ID"
|
395
389
|
|
@@ -472,19 +466,16 @@ class CellLine(MetaData):
|
|
472
466
|
# then we can compare these keys and fetch the corresponding metadata.
|
473
467
|
if query_id not in adata.obs.columns:
|
474
468
|
raise ValueError(
|
475
|
-
f"The specified `query_id` {query_id}
|
476
|
-
"
|
477
|
-
"using the `annotate()` function before calling annotate_protein_expression(). \n"
|
478
|
-
"This ensures that the required query ID is included in your data."
|
469
|
+
f"The specified `query_id` `{query_id}` not found in `adata.obs`. "
|
470
|
+
"Fetch cell line metadata with `annotate()` before calling `annotate_protein_expression()`."
|
479
471
|
)
|
480
472
|
# Lazily download the proteomics data
|
481
473
|
if self.proteomics is None:
|
482
474
|
self._download_proteomics()
|
483
475
|
if reference_id not in self.proteomics.columns:
|
484
476
|
raise ValueError(
|
485
|
-
f"
|
486
|
-
"
|
487
|
-
"Alternatively, create a `CellLineMetaData.lookup()` object to obtain the available reference identifiers in the metadata."
|
477
|
+
f"Specified `reference_id` `{reference_id}` not found in protein expression data. "
|
478
|
+
f"Use available reference identifiers in metadata or create `CellLineMetaData.lookup()` object."
|
488
479
|
)
|
489
480
|
|
490
481
|
identifier_num_all = len(adata.obs[query_id].unique())
|
@@ -551,11 +542,8 @@ class CellLine(MetaData):
|
|
551
542
|
adata = adata.copy()
|
552
543
|
if query_id not in adata.obs.columns:
|
553
544
|
raise ValueError(
|
554
|
-
f"
|
555
|
-
"
|
556
|
-
"If the desired query ID is not available, you can fetch the cell line metadata "
|
557
|
-
"using the `annotate()` function before calling `annotate_from_gdsc()`. "
|
558
|
-
"This ensures that the required query ID is included in your data."
|
545
|
+
f"Specified `query_id` `{query_id}` not found in `adata.obs`. "
|
546
|
+
"Use an available ID or fetch cell line metadata with `annotate()` before calling `annotate_from_gdsc()`."
|
559
547
|
)
|
560
548
|
# Lazily download the GDSC data
|
561
549
|
if gdsc_dataset == "gdsc_1":
|
@@ -626,11 +614,8 @@ class CellLine(MetaData):
|
|
626
614
|
adata = adata.copy()
|
627
615
|
if query_id not in adata.obs.columns:
|
628
616
|
raise ValueError(
|
629
|
-
f"
|
630
|
-
"
|
631
|
-
"If the desired query ID is not available, you can fetch the cell line metadata "
|
632
|
-
"using the `annotate()` function before calling `annotate_from_prism()`. "
|
633
|
-
"This ensures that the required query ID is included in your data."
|
617
|
+
f"Specified `query_id` `{query_id}` not found in `adata.obs`. "
|
618
|
+
"Use an available ID or fetch cell line metadata with `annotate()` before calling `annotate_from_prism()`."
|
634
619
|
)
|
635
620
|
if self.drug_response_prism is None:
|
636
621
|
self._download_prism()
|
@@ -700,7 +685,6 @@ class CellLine(MetaData):
|
|
700
685
|
if self.drug_response_prism is None:
|
701
686
|
self._download_prism()
|
702
687
|
|
703
|
-
# Transfer the data
|
704
688
|
return LookUp(
|
705
689
|
type="cell_line",
|
706
690
|
transfer_metadata=[
|
@@ -775,7 +759,7 @@ class CellLine(MetaData):
|
|
775
759
|
and sum(adata.obsm[metadata_key].columns != adata.var.index.values) > 0
|
776
760
|
):
|
777
761
|
raise ValueError(
|
778
|
-
"Column name of metadata is not the same as the index of adata.var
|
762
|
+
"Column name of metadata is not the same as the index of `adata.var`. Ensure that the genes are in the same order."
|
779
763
|
)
|
780
764
|
|
781
765
|
# Divide cell lines into those are present and not present in the metadata
|
@@ -832,7 +816,7 @@ class CellLine(MetaData):
|
|
832
816
|
"""
|
833
817
|
if corr is None or pval is None:
|
834
818
|
raise ValueError(
|
835
|
-
"Missing required input parameter: 'corr' or 'pval'.
|
819
|
+
"Missing required input parameter: 'corr' or 'pval'. Call `pt.md.CellLine.correlate()` before proceeding."
|
836
820
|
)
|
837
821
|
|
838
822
|
if category == "cell line":
|
@@ -3,7 +3,6 @@ from __future__ import annotations
|
|
3
3
|
from typing import TYPE_CHECKING, Literal
|
4
4
|
|
5
5
|
import pandas as pd
|
6
|
-
import pubchempy as pcp
|
7
6
|
|
8
7
|
from ._look_up import LookUp
|
9
8
|
from ._metadata import MetaData
|
@@ -44,6 +43,8 @@ class Compound(MetaData):
|
|
44
43
|
if query_id not in adata.obs.columns:
|
45
44
|
raise ValueError(f"The requested query_id {query_id} is not in `adata.obs`.\n Please check again.")
|
46
45
|
|
46
|
+
import pubchempy as pcp
|
47
|
+
|
47
48
|
query_dict = {}
|
48
49
|
not_matched_identifiers = []
|
49
50
|
for compound in adata.obs[query_id].dropna().astype(str).unique():
|
@@ -27,7 +27,7 @@ class LookUp:
|
|
27
27
|
Args:
|
28
28
|
type: Metadata type for annotation. One of 'cell_line', 'compound', 'moa' or 'drug.
|
29
29
|
transfer_metadata: DataFrames used to generate Lookup object.
|
30
|
-
|
30
|
+
Currently set to None for CompoundMetaData which does not require any DataFrames for transfer.
|
31
31
|
"""
|
32
32
|
self.type = type
|
33
33
|
if type == "cell_line":
|
@@ -49,11 +49,8 @@ class MetaData:
|
|
49
49
|
if metadata_type in ["protein expression", "bulk RNA", "drug response"]:
|
50
50
|
hint = "Additionally, call the `CellLineMetaData.annotate()` function to acquire more possible query IDs that can be used for cell line annotation purposes."
|
51
51
|
raise ValueError(
|
52
|
-
f"
|
53
|
-
"
|
54
|
-
"To resolve this issue, call the `lookup()` function to create a LookUp object.\n"
|
55
|
-
"This enables obtaining the count of matched identifiers in the AnnData object for different types of reference and query IDs.\n"
|
56
|
-
f"{hint}"
|
52
|
+
f"No matches between `{query_id}` in adata.obs and `{reference_id}` in {metadata_type} data. "
|
53
|
+
f"Use `lookup()` to check compatible identifier types. {hint}"
|
57
54
|
)
|
58
55
|
if len(unmatched_identifiers) == 0:
|
59
56
|
return
|
@@ -61,10 +58,8 @@ class MetaData:
|
|
61
58
|
verbosity = min(verbosity, len(unmatched_identifiers))
|
62
59
|
if verbosity > 0:
|
63
60
|
logger.info(
|
64
|
-
f"
|
65
|
-
f"
|
66
|
-
"leading to the presence of NA values for their respective metadata.\n"
|
67
|
-
f"Please check again: *unmatched_identifiers[:verbosity]..."
|
61
|
+
f"{total_identifiers} identifiers in `adata.obs`, {len(unmatched_identifiers)} not found in {metadata_type} data. "
|
62
|
+
f"NA values present. Unmatched: {unmatched_identifiers[:verbosity]}"
|
68
63
|
)
|
69
64
|
else:
|
70
65
|
raise ValueError("Only 'all' or a non-negative value is accepted.")
|