panhumanpy 0.5.0__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.
Files changed (62) hide show
  1. panhumanpy-0.5.0/.devcontainer/Dockerfile +13 -0
  2. panhumanpy-0.5.0/.devcontainer/devcontainer.json +18 -0
  3. panhumanpy-0.5.0/.flake8 +16 -0
  4. panhumanpy-0.5.0/.gitattributes +2 -0
  5. panhumanpy-0.5.0/.github/pull_request_template.md +51 -0
  6. panhumanpy-0.5.0/.gitignore +103 -0
  7. panhumanpy-0.5.0/.pre-commit-config.yaml +28 -0
  8. panhumanpy-0.5.0/CONTRIBUTING.md +118 -0
  9. panhumanpy-0.5.0/PKG-INFO +95 -0
  10. panhumanpy-0.5.0/README.md +75 -0
  11. panhumanpy-0.5.0/pixi.lock +6811 -0
  12. panhumanpy-0.5.0/pyproject.toml +61 -0
  13. panhumanpy-0.5.0/queries/test_obj.h5ad +0 -0
  14. panhumanpy-0.5.0/scripts/bump_version.py +258 -0
  15. panhumanpy-0.5.0/src/panhumanpy/ANNotate.py +2642 -0
  16. panhumanpy-0.5.0/src/panhumanpy/ANNotate_tools.py +3931 -0
  17. panhumanpy-0.5.0/src/panhumanpy/__init__.py +27 -0
  18. panhumanpy-0.5.0/src/panhumanpy/_tools/__init__.py +3 -0
  19. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/__init__.py +14 -0
  20. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/calibration/__init__.py +0 -0
  21. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/cell_ontology_map/__init__.py +0 -0
  22. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/cell_ontology_map/cell_ontology_map.csv +447 -0
  23. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/inference_encoders/__init__.py +0 -0
  24. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/inference_encoders/inference_encoders.pkl +0 -0
  25. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/inference_feature_panel/__init__.py +0 -0
  26. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/inference_feature_panel/inference_feature_panel.txt +5039 -0
  27. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/inference_model/__init__.py +0 -0
  28. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/postprocessing/__init__.py +0 -0
  29. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/postprocessing/panhuman_annotate_broad.csv +393 -0
  30. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/postprocessing/panhuman_annotate_fine.csv +398 -0
  31. panhumanpy-0.5.0/src/panhumanpy/_tools/v0/postprocessing/panhuman_annotate_medium.csv +393 -0
  32. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/__init__.py +14 -0
  33. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/__init__.py +0 -0
  34. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/custom_objects.py +151 -0
  35. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/temp_scaler_L_1.keras +0 -0
  36. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/temp_scaler_L_2.keras +0 -0
  37. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/temp_scaler_L_3.keras +0 -0
  38. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/temp_scaler_L_4.keras +0 -0
  39. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/temp_scaler_L_5.keras +0 -0
  40. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/temp_scaler_L_6.keras +0 -0
  41. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/temp_scaler_L_7.keras +0 -0
  42. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/calibration/temp_scaler_L_8.keras +0 -0
  43. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/cell_ontology_map/__init__.py +0 -0
  44. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/cell_ontology_map/cell_ontology_map.csv +447 -0
  45. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/inference_encoders/__init__.py +0 -0
  46. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/inference_encoders/inference_encoders.pkl +0 -0
  47. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/inference_feature_panel/__init__.py +0 -0
  48. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/inference_feature_panel/inference_feature_panel.txt +5055 -0
  49. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/inference_model/__init__.py +0 -0
  50. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/postprocessing/__init__.py +0 -0
  51. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/postprocessing/panhuman_annotate_broad.csv +395 -0
  52. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/postprocessing/panhuman_annotate_fine.csv +399 -0
  53. panhumanpy-0.5.0/src/panhumanpy/_tools/v1/postprocessing/panhuman_annotate_medium.csv +395 -0
  54. panhumanpy-0.5.0/src/panhumanpy/loss_fn.py +40 -0
  55. panhumanpy-0.5.0/tests/__init__.py +0 -0
  56. panhumanpy-0.5.0/tests/test_annotate.py +1706 -0
  57. panhumanpy-0.5.0/tests/test_annotate_tools.py +520 -0
  58. panhumanpy-0.5.0/tests/test_bump_version.py +224 -0
  59. panhumanpy-0.5.0/tests/test_imports.py +101 -0
  60. panhumanpy-0.5.0/tests/test_model_download.py +119 -0
  61. panhumanpy-0.5.0/tests/test_package_structure.py +173 -0
  62. panhumanpy-0.5.0/tutorial_panhumanpy.ipynb +513 -0
@@ -0,0 +1,13 @@
1
+ FROM mcr.microsoft.com/devcontainers/base:jammy
2
+
3
+ ARG PIXI_VERSION=v0.41.4
4
+
5
+ RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix-dev/pixi/releases/download/${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \
6
+ && chmod +x /usr/local/bin/pixi \
7
+ && pixi info
8
+
9
+ # set some user and workdir settings to work nicely with vscode
10
+ USER vscode
11
+ WORKDIR /home/vscode
12
+
13
+ RUN echo 'eval "$(pixi completion -s bash)"' >> /home/vscode/.bashrc
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "panhumanpy",
3
+ "build": {
4
+ "dockerfile": "Dockerfile",
5
+ "context": ".."
6
+ },
7
+ "customizations": {
8
+ "vscode": {
9
+ "settings": {},
10
+ "extensions": ["ms-python.python", "charliermarsh.ruff", "GitHub.copilot"]
11
+ }
12
+ },
13
+ "features": {
14
+ "ghcr.io/devcontainers/features/docker-in-docker:2": {}
15
+ },
16
+ "mounts": ["source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"],
17
+ "postCreateCommand": "sudo chown vscode .pixi && pixi install && pixi exec pre-commit install"
18
+ }
@@ -0,0 +1,16 @@
1
+ [flake8]
2
+ # Black and Flake8 don't always agree, see:
3
+
4
+ # Black recommends that rule "E501" be tweaked to conform with it's 80
5
+ # character maximum line length but we'll allow up to 132 character instead. We
6
+ # arrive at 132 by applying Black's 10% rule to the typical maximum line length
7
+ # for comments of 120. Since we're running `black` as a pre-commit hook, we
8
+ # should only ever expect `flake8` to complain about long comment lines.
9
+ max-line-length = 132
10
+
11
+ # Black also recommends that `flake8` rules "E203" and "E501" are ignored,
12
+ # for more details, see:
13
+ # https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#minimal-configuration.
14
+ # We will also ignore rule W503 since it's soon to be reversed, for more details,
15
+ # see: https://www.flake8rules.com/rules/W503.html.
16
+ extend-ignore = E203, E701, W503
@@ -0,0 +1,2 @@
1
+ # SCM syntax highlighting
2
+ pixi.lock linguist-language=YAML linguist-generated=true
@@ -0,0 +1,51 @@
1
+ ## Description
2
+ Checklist of guidelines to go through when making a PR.
3
+
4
+ ## Type of Change
5
+ - [ ] Bug fix (patch version)
6
+ - [ ] New or updated feature (minor version)
7
+ - [ ] New default model (major version + new constellation for version name)
8
+ - [ ] Documentation update
9
+ - [ ] Internal refactoring
10
+
11
+ **Does this PR introduce a breaking change to the *public API* of existing features/models?**
12
+ - [ ] Yes (If yes, this *will* require a Major version bump. Explain in "Additional Notes")
13
+ - [ ] No
14
+
15
+ ## Pre-Merge Checklist
16
+ **Please check each item before requesting review:**
17
+
18
+ ### Code Quality
19
+ - [ ] Tests pass locally: `python -m pytest tests/`
20
+ - [ ] New functionality has tests written
21
+ - [ ] No debugging code left behind (print statements, breakpoints)
22
+ - [ ] Package installs cleanly: `pip install -e .`
23
+
24
+ ### Documentation
25
+ - [ ] README.md updated for user-facing changes and model version updates if necessary
26
+ - [ ] Docstrings added for new functions
27
+ - [ ] Tutorial notebook updated if needed
28
+
29
+ ### Model Changes (if applicable)
30
+ - [ ] New models tested with sample data
31
+ - [ ] Model files added to appropriate `_tools/` subdirectory
32
+ - [ ] Backward compatibility maintained (old models still work)
33
+
34
+ ### Git Hygiene
35
+ - [ ] Branch is up to date with main
36
+ - [ ] No `__pycache__` files committed
37
+ - [ ] Commit messages are descriptive
38
+ - [ ] No merge conflicts
39
+
40
+ ## Version Impact (Maintainer Decision)
41
+ - [ ] No version change needed
42
+ - [ ] Should trigger version bump:
43
+ - [ ] Patch (bug fix)
44
+ - [ ] Minor (new or updated feature)
45
+ - [ ] Major (breaking change to existing API, **or a new default model** which is a "soft" breaking change) - change constellation for version name
46
+
47
+ ## Testing
48
+ How was this change tested?
49
+
50
+ ## Additional Notes
51
+
@@ -0,0 +1,103 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+
23
+
24
+ # Unit test / coverage reports
25
+ htmlcov/
26
+ .tox/
27
+ .coverage
28
+ .coverage.*
29
+ .cache
30
+ nosetests.xml
31
+ coverage.xml
32
+ *.cover
33
+ .hypothesis/
34
+ .pytest_cache/
35
+
36
+ # Jupyter Notebook
37
+ .ipynb_checkpoints
38
+
39
+ # pyenv
40
+ .python-version
41
+
42
+ # Environment
43
+ .env
44
+ .venv
45
+ env/
46
+ venv/
47
+ ENV/
48
+
49
+ # Pixi environments
50
+ .pixi/
51
+
52
+ # IDE
53
+ .idea/
54
+ .vscode/
55
+ *.swp
56
+ *.swo
57
+
58
+ # PyInstaller
59
+ # Usually these files are written by a python script from a template
60
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
61
+ *.manifest
62
+ *.spec
63
+
64
+ # Installer logs
65
+ pip-log.txt
66
+ pip-delete-this-directory.txt
67
+
68
+ # Translations
69
+ *.mo
70
+ *.pot
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
80
+ __pypackages__/
81
+
82
+ # mkdocs documentation
83
+ /site
84
+
85
+ # mypy
86
+ .mypy_cache/
87
+ .dmypy.json
88
+ dmypy.json
89
+
90
+ # Pyright
91
+ .pyrightcache/
92
+
93
+ # Pyre type checker
94
+ .pyre/
95
+
96
+ # pytype static type analyzer
97
+ .pytype/
98
+
99
+ # Cython debug symbols
100
+ cython_debug/
101
+
102
+ # macOS system files
103
+ .DS_Store
@@ -0,0 +1,28 @@
1
+ repos:
2
+ # Some basic pre-commit checks
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v4.5.0
5
+ hooks:
6
+ - id: trailing-whitespace
7
+ - id: end-of-file-fixer
8
+ - id: check-yaml
9
+ - id: check-toml
10
+ - id: check-added-large-files
11
+
12
+ # Run `isort` to sort imports.
13
+ - repo: https://github.com/PyCQA/isort
14
+ rev: 5.12.0
15
+ hooks:
16
+ - id: isort
17
+
18
+ # Run `black` to format code.
19
+ - repo: https://github.com/psf/black
20
+ rev: 23.9.1
21
+ hooks:
22
+ - id: black
23
+
24
+ # Run `flake8` for linting
25
+ - repo: https://github.com/pycqa/flake8
26
+ rev: 6.1.0
27
+ hooks:
28
+ - id: flake8
@@ -0,0 +1,118 @@
1
+ ## Developer's Guide
2
+
3
+ ### VSCode
4
+
5
+ This project uses the [Dev Containers extension](https://code.visualstudio.com/docs/devcontainers/containers) for [VSCode](https://code.visualstudio.com/docs) to create reproducible development environments, please ensure that you have the IDE and extension installed. When you open the project in VSCode, the `.devcontainer` folder should be automatically detected and you will prompted you to build the container and
6
+ re-open the project inside it. If not, open the Command Palette (`Ctrl+Shift+P` on Windows/Linux or `Cmd+Shift+P` on macOS) and select `Remote-Containers: Reopen in Container`.
7
+
8
+ ### pixi
9
+
10
+ This project uses [pixi](https://pixi.sh/v0.41.4/) for dependency management and workflow automation. `pixi` uses the contents of the `pyproject.toml` file to generate a cross-platform `pixi.lock` file, providing deterministic, reproducible installations, while seamlessly resolving dependencies from multiple sources (`PyPI`, `conda-forge` etc.).
11
+
12
+ ### pre-commit, isort, & black
13
+
14
+ This project uses [pre-commit](https://pre-commit.com/) hooks to automatically enforce certain coding standards. Before every commit [isort](https://pycqa.github.io/isort/) and [black](https://black.readthedocs.io/en/stable/index.html) are executed on staged files to ensure that all committed code is formatted consistently. The command can also be invoked manually:
15
+
16
+ ```bash
17
+ pixi run pre-commit
18
+ ```
19
+
20
+ Similarly, both tools can be run individually:
21
+
22
+ ```bash
23
+ pixi run isort
24
+ pixi run black
25
+ ```
26
+
27
+ When invoked in this way all files under the `src/` and `tests/` directories will be reformatted, not just staged changes.
28
+
29
+ ### pytest
30
+
31
+ This project uses [pytest](https://docs.pytest.org/en/stable/) for automated testing. To execute the test suite, run:
32
+
33
+ ```bash
34
+ pixi run pytest
35
+ ```
36
+
37
+ ### flake8, & pyright
38
+
39
+ This project uses [flake8](https://flake8.pycqa.org/en/latest/) for linting and style enforcement (in addition to `black`). It also uses [pyright](https://microsoft.github.io/pyright/#/) for static type checking. To perform pre-merge checks combining these tools, run:
40
+
41
+ ```bash
42
+ pixi run pre-merge
43
+ ```
44
+
45
+ Alternatively, you can run them individually:
46
+
47
+ ```bash
48
+ pixi run flake8
49
+ pixi run pyright
50
+ ```
51
+
52
+ ### Versioning Protocol
53
+
54
+ This project follows a generalised semantic versioning where major versions are associated with a constellation as a codename.
55
+
56
+ **Format:** `MAJOR.MINOR.PATCH (Constellation Name)`
57
+
58
+ #### Version Types:
59
+ - **MAJOR (X.0.0):** New default model added, and/or breaking changes to the API → New constellation name
60
+ - **MINOR (X.Y.0):** New features/functionality
61
+ - **PATCH (X.Y.Z):** Bug fixes, small improvements
62
+
63
+ #### Current Version:
64
+ - 0.5.0 (Andromeda)
65
+
66
+ #### Version Philosophy:
67
+ - **New default models, and/or breaking changes to API = Major versions** because they represent ("soft") breaking changes.
68
+ - **Version bumps are at maintainer discretion** - not every PR requires a version change.
69
+ - When versions are updated, `pyproject.toml`, `src/panhumanpy/__init__.py`, `README.md`, and `CONTRIBUTING.md` must be kept in sync.
70
+ - Use versioning script for version bumps executed in a consistent fashion.
71
+
72
+ #### Rules:
73
+ 1. The default model version number must match the package major version
74
+ - Package `0.2.1` → Model `v0` as default
75
+ - Package `1.3.2` → Model `v1` as default
76
+ 2. Non-model artifacts are stored in `src/panhumanpy/_tools/v{i}/` and models are saved on zenodo as mentioned in the README
77
+ 3. When bumping major package version, create new `v{i}` directory with updated models and set default model version in ANNotate.py appropriately.
78
+
79
+ #### Example:
80
+ ```python
81
+ # In __init__.py
82
+ __version__ = "0.2.1"
83
+
84
+ # In ANNotate.py
85
+ model_version_default = 'v0' # Must match major version (0)
86
+ ```
87
+
88
+
89
+ ### Using the Version Bump Script
90
+
91
+ For consistent version updates, use the provided script:
92
+
93
+ ```bash
94
+ # Check current version
95
+ python scripts/bump_version.py current
96
+
97
+ # Check version consistency across files
98
+ python scripts/bump_version.py check
99
+
100
+ # Bug fixes (patch)
101
+ python scripts/bump_version.py patch
102
+
103
+ # New features (minor)
104
+ python scripts/bump_version.py minor
105
+
106
+ # New models or breaking changes (major)
107
+ python scripts/bump_version.py major Cassiopeia
108
+
109
+ # Run tests that will ensure version consistency across scripts and docs
110
+ pytest
111
+
112
+ # Push changes and tags on git
113
+ git diff
114
+ git add . && git commit -m 'Bump version to 0.2.0'
115
+ git tag v0.2.0-andromeda
116
+ git push --follow-tags # if on branch main
117
+ git push origin version_bump_branch --tags # if on a separate branch
118
+ ```
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.4
2
+ Name: panhumanpy
3
+ Version: 0.5.0
4
+ Summary: A Python package for automated cell type annotation in scRNA-seq using Azimuth Neural Network.
5
+ License: MIT
6
+ Requires-Python: >=3.9
7
+ Requires-Dist: anndata
8
+ Requires-Dist: jupyter>=1.0.0
9
+ Requires-Dist: numpy
10
+ Requires-Dist: pandas
11
+ Requires-Dist: plotly
12
+ Requires-Dist: scikit-learn==1.6.0
13
+ Requires-Dist: scipy
14
+ Requires-Dist: tensorflow==2.17
15
+ Requires-Dist: umap-learn
16
+ Requires-Dist: xarray
17
+ Provides-Extra: gpu
18
+ Requires-Dist: tensorflow[and-cuda]==2.17; extra == 'gpu'
19
+ Description-Content-Type: text/markdown
20
+
21
+ # panhumanpy
22
+
23
+ **Current version: 0.5.0 (Andromeda)**
24
+
25
+ A package for cell annotation using Azimuth Neural Network.
26
+
27
+ ## Prerequisites
28
+
29
+ - `python` >=3.9
30
+ - `pip`
31
+ - `git`
32
+
33
+ ## Installation
34
+
35
+ To install the base version of the package (with CPU support only), run:
36
+
37
+ ```bash
38
+ pip install panhumanpy
39
+ ```
40
+
41
+ or to install from GitHub, run:
42
+
43
+ ```bash
44
+ pip install git+https://github.com/satijalab/panhumanpy.git
45
+ ```
46
+
47
+ If you require GPU acceleration for enhanced performance on compatible hardware, install the package with GPU dependencies:
48
+
49
+ ```bash
50
+ pip install panhumanpy[gpu]
51
+ ```
52
+
53
+ or from GitHub:
54
+
55
+
56
+ ```bash
57
+ pip install git+https://github.com/satijalab/panhumanpy.git#egg=panhumanpy[gpu]
58
+ ```
59
+
60
+ ## Model Versions
61
+
62
+ panhumanpy uses versioned models corresponding to major package releases. The package defaults to model 'v{i}' where i is the major package version. For example for panhumanpy 0.2.1 (Andromeda), the default model version is 'v0'. For most users, the default version is recommended. The user can also choose to use a different model version as outlined in the tutorial mentioned below.
63
+
64
+ Currently available model versions: 'v0', 'v1'
65
+
66
+ ## Model Weights
67
+
68
+ Model weights are hosted on Zenodo and downloaded automatically on first use, cached in `~/.cache/panhumanpy/`. No manual download is required.
69
+
70
+ | Field | Detail |
71
+ |---|---|
72
+ | DOI | https://doi.org/10.5281/zenodo.20401417 |
73
+ | Models | v0, v1 |
74
+ | License | CC BY 4.0 |
75
+
76
+ ## Cell Ontology Mapping
77
+
78
+ panhumanpy includes a built-in crosswalk that maps Pan-human Azimuth cell type annotations to [Cell Ontology](https://obofoundry.org/ontology/cl.html) (CL) terms. This mapping is versioned alongside the model and can be applied to annotation outputs via the `map_to_cell_ontology` function in `ANNotate_tools` or the `map_to_cell_ontology` method on `AzimuthNN` and `AzimuthNN_base`.
79
+
80
+ **Crosswalk provenance:**
81
+
82
+ | Field | Detail |
83
+ |---|---|
84
+ | Title | Crosswalk of Pan-human Azimuth Types annotated cells to Cell Ontology |
85
+ | Author | Aleix Puig-Barbe |
86
+ | Author ORCID | 0000-0001-6677-8489 |
87
+ | Reviewers | Bruce Herr II, Katy Borner, Jie Zheng |
88
+ | Reviewer ORCIDs | 0000-0002-6703-7647, 0000-0002-3321-6137, 0000-0002-2999-0103 |
89
+ | Data DOI | https://doi.org/10.48539/HBM727.TLKL.237 |
90
+ | Date | December 15, 2025 |
91
+ | Version | v1.1 |
92
+
93
+ ## Tutorial
94
+
95
+ For an introductory tutorial, please check out this [notebook](https://github.com/satijalab/panhumanpy/blob/main/tutorial_panhumanpy.ipynb).
@@ -0,0 +1,75 @@
1
+ # panhumanpy
2
+
3
+ **Current version: 0.5.0 (Andromeda)**
4
+
5
+ A package for cell annotation using Azimuth Neural Network.
6
+
7
+ ## Prerequisites
8
+
9
+ - `python` >=3.9
10
+ - `pip`
11
+ - `git`
12
+
13
+ ## Installation
14
+
15
+ To install the base version of the package (with CPU support only), run:
16
+
17
+ ```bash
18
+ pip install panhumanpy
19
+ ```
20
+
21
+ or to install from GitHub, run:
22
+
23
+ ```bash
24
+ pip install git+https://github.com/satijalab/panhumanpy.git
25
+ ```
26
+
27
+ If you require GPU acceleration for enhanced performance on compatible hardware, install the package with GPU dependencies:
28
+
29
+ ```bash
30
+ pip install panhumanpy[gpu]
31
+ ```
32
+
33
+ or from GitHub:
34
+
35
+
36
+ ```bash
37
+ pip install git+https://github.com/satijalab/panhumanpy.git#egg=panhumanpy[gpu]
38
+ ```
39
+
40
+ ## Model Versions
41
+
42
+ panhumanpy uses versioned models corresponding to major package releases. The package defaults to model 'v{i}' where i is the major package version. For example for panhumanpy 0.2.1 (Andromeda), the default model version is 'v0'. For most users, the default version is recommended. The user can also choose to use a different model version as outlined in the tutorial mentioned below.
43
+
44
+ Currently available model versions: 'v0', 'v1'
45
+
46
+ ## Model Weights
47
+
48
+ Model weights are hosted on Zenodo and downloaded automatically on first use, cached in `~/.cache/panhumanpy/`. No manual download is required.
49
+
50
+ | Field | Detail |
51
+ |---|---|
52
+ | DOI | https://doi.org/10.5281/zenodo.20401417 |
53
+ | Models | v0, v1 |
54
+ | License | CC BY 4.0 |
55
+
56
+ ## Cell Ontology Mapping
57
+
58
+ panhumanpy includes a built-in crosswalk that maps Pan-human Azimuth cell type annotations to [Cell Ontology](https://obofoundry.org/ontology/cl.html) (CL) terms. This mapping is versioned alongside the model and can be applied to annotation outputs via the `map_to_cell_ontology` function in `ANNotate_tools` or the `map_to_cell_ontology` method on `AzimuthNN` and `AzimuthNN_base`.
59
+
60
+ **Crosswalk provenance:**
61
+
62
+ | Field | Detail |
63
+ |---|---|
64
+ | Title | Crosswalk of Pan-human Azimuth Types annotated cells to Cell Ontology |
65
+ | Author | Aleix Puig-Barbe |
66
+ | Author ORCID | 0000-0001-6677-8489 |
67
+ | Reviewers | Bruce Herr II, Katy Borner, Jie Zheng |
68
+ | Reviewer ORCIDs | 0000-0002-6703-7647, 0000-0002-3321-6137, 0000-0002-2999-0103 |
69
+ | Data DOI | https://doi.org/10.48539/HBM727.TLKL.237 |
70
+ | Date | December 15, 2025 |
71
+ | Version | v1.1 |
72
+
73
+ ## Tutorial
74
+
75
+ For an introductory tutorial, please check out this [notebook](https://github.com/satijalab/panhumanpy/blob/main/tutorial_panhumanpy.ipynb).