cell-type-annotation 0.4.2__py3-none-any.whl
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.
- cell_type_annotation/__init__.py +39 -0
- cell_type_annotation/checks.py +318 -0
- cell_type_annotation/data/cell_cycle_tirosh.tsv +98 -0
- cell_type_annotation/hierarchy.py +530 -0
- cell_type_annotation/markers.py +164 -0
- cell_type_annotation/pl.py +869 -0
- cell_type_annotation/report.py +239 -0
- cell_type_annotation/routing.py +371 -0
- cell_type_annotation-0.4.2.dist-info/METADATA +105 -0
- cell_type_annotation-0.4.2.dist-info/RECORD +12 -0
- cell_type_annotation-0.4.2.dist-info/WHEEL +4 -0
- cell_type_annotation-0.4.2.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: cell-type-annotation
|
|
3
|
+
Version: 0.4.2
|
|
4
|
+
Summary: Method routing, evidence checks, label hierarchies and reports for evidence-driven cell-type annotation.
|
|
5
|
+
Project-URL: Source, https://github.com/quadbio/cell-type-annotation
|
|
6
|
+
Author: quadbio
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Requires-Python: >=3.12
|
|
14
|
+
Requires-Dist: anndata>=0.12
|
|
15
|
+
Requires-Dist: matplotlib>=3.8
|
|
16
|
+
Requires-Dist: numpy>=2
|
|
17
|
+
Requires-Dist: pandas>=2
|
|
18
|
+
Requires-Dist: scipy
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# cell-type-annotation
|
|
22
|
+
|
|
23
|
+
A Claude Code plugin for evidence-driven cell-type annotation of pre-clustered single-cell and spatial
|
|
24
|
+
transcriptomics data. Claude is the annotator:
|
|
25
|
+
- it gathers marker evidence and runs one routed automated cross-check;
|
|
26
|
+
- it reasons level by level down a label hierarchy;
|
|
27
|
+
- the user signs off its assumptions before any label exists;
|
|
28
|
+
- critic subagents try to refute every call.
|
|
29
|
+
|
|
30
|
+
Labels are normalized to Cell Ontology ids. Low-quality, cycling and doublet clusters are flagged on a separate
|
|
31
|
+
state axis. Off-panel genes on targeted spatial panels are treated as unmeasured, never as absent.
|
|
32
|
+
|
|
33
|
+
| Part | What it does |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `skills/cell-type-annotation/` | The method: principles, the per-level workflow, and references on methodology, method selection, marker tools and knowledge sources. |
|
|
36
|
+
| `src/cell_type_annotation/` | What task scripts can't get from scanpy or decoupler: cross-check routing, normalization and panel checks, the nested label hierarchy with sibling-restricted marker scoring, the level report, and the annotation-hierarchy figure. |
|
|
37
|
+
|
|
38
|
+
It runs as a task of [analysis-workflow](https://github.com/quadbio/analysis-workflow), which owns the task
|
|
39
|
+
directory, the working object and write-back. The final hierarchy figure follows
|
|
40
|
+
[sci-figures](https://github.com/quadbio/sci-figures).
|
|
41
|
+
|
|
42
|
+
## Use
|
|
43
|
+
|
|
44
|
+
Inside an analysis-workflow task, ask Claude to annotate a working object's clusters: "what are these clusters?",
|
|
45
|
+
"annotate the leiden clusters".
|
|
46
|
+
- **Inputs:** the working object, with a cluster key, an embedding and a log-normalized layer.
|
|
47
|
+
- **Outputs:** in the task directory:
|
|
48
|
+
- the plan;
|
|
49
|
+
- the signed-off assumptions ledger;
|
|
50
|
+
- the curated markers;
|
|
51
|
+
- evidence tables, and a labels table and Markdown report per level;
|
|
52
|
+
- the hierarchy figure.
|
|
53
|
+
- **Write-back:** after sign-off, one versioned `obs` column per level.
|
|
54
|
+
|
|
55
|
+
It requires the [knowledgebase MCP](https://github.com/biocontext-ai/knowledgebase-mcp). The
|
|
56
|
+
[Zotero MCP](https://github.com/54yyyu/zotero-mcp) is strongly preferred.
|
|
57
|
+
|
|
58
|
+
## Install
|
|
59
|
+
|
|
60
|
+
The plugin, once per machine, from the [quadbio marketplace](https://github.com/quadbio/claude-plugins); it
|
|
61
|
+
installs analysis-workflow and sci-figures along with it.
|
|
62
|
+
|
|
63
|
+
The PyPI package `cell-type-annotation`, in the analysis repo's `pixi.toml`, next to the scverse stack the task
|
|
64
|
+
scripts use:
|
|
65
|
+
|
|
66
|
+
```toml
|
|
67
|
+
[pypi-dependencies]
|
|
68
|
+
cell-type-annotation = ">=0.4.2"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Cross-check tools (celltypist, cellmapper, panhumanpy, scvi-tools, scimilarity) are added as a run needs them. Their
|
|
72
|
+
install notes are in `references/method_selection.md`.
|
|
73
|
+
|
|
74
|
+
The last release with the `cta` command line is [v0.3.0](https://github.com/quadbio/cell-type-annotation/tree/v0.3.0).
|
|
75
|
+
|
|
76
|
+
## Develop
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
uv sync --group dev
|
|
80
|
+
uv run pytest
|
|
81
|
+
uv run pre-commit run --all-files
|
|
82
|
+
claude plugin validate .
|
|
83
|
+
claude --plugin-dir . # try the skill from this checkout; its dependencies installed or loaded too
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The routing tables in `references/method_selection.md` are generated; after changing `routing.py`, regenerate them
|
|
87
|
+
(a test fails until you do):
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
uv run python -c "from cell_type_annotation.routing import update_page; \
|
|
91
|
+
update_page('skills/cell-type-annotation/references/method_selection.md')"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
For live package edits in an analysis repo, depend on the checkout:
|
|
95
|
+
`cell-type-annotation = { path = "../cell-type-annotation", editable = true }`.
|
|
96
|
+
|
|
97
|
+
## Release
|
|
98
|
+
|
|
99
|
+
Bump `version` in `.claude-plugin/plugin.json` and merge: the marketplace follows `main`, and users update when the
|
|
100
|
+
version changes. On that merge, `release.yaml` publishes the package to PyPI as `cell-type-annotation`, then tags
|
|
101
|
+
`v<version>` and creates a GitHub Release.
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
cell_type_annotation/__init__.py,sha256=7HmwulyflCTAiBIPEHxFOUSZvQs53R2GOtrEgSXApOQ,1119
|
|
2
|
+
cell_type_annotation/checks.py,sha256=vcJvOUarU3W1HskQZoEbj7LBAtiKjCiMDfF5J65citE,13078
|
|
3
|
+
cell_type_annotation/hierarchy.py,sha256=AqG_ALZmpOO68G8kkDJ0ObYabO9r_hbXwK--tBeNOwg,23189
|
|
4
|
+
cell_type_annotation/markers.py,sha256=WqF51kGRxZfFaWnAOM8jVqKyuw5XZyHCFkHTZs4KgC4,7368
|
|
5
|
+
cell_type_annotation/pl.py,sha256=z8yZ6Ox-V5cXP_7XVZ67vFk5NoLzF4eD03IdRm73EpQ,40215
|
|
6
|
+
cell_type_annotation/report.py,sha256=h1EWQQ8EvQb1z0JEvzQhIFfShlvaJ-aTdUoHr4EPibQ,10247
|
|
7
|
+
cell_type_annotation/routing.py,sha256=IJJvh0yu_RP5QD7RmoyNvb8KB4CAPWS3uJ9bXY1CiG0,16605
|
|
8
|
+
cell_type_annotation/data/cell_cycle_tirosh.tsv,sha256=1JKh9X-e-L7Pq0OF18C-sPYT3CFblDpNTJAxIchTRyU,869
|
|
9
|
+
cell_type_annotation-0.4.2.dist-info/METADATA,sha256=SKDPHx0A0GKkXxkSrs3MDIYc7NSdqlPriumz437bYSc,4397
|
|
10
|
+
cell_type_annotation-0.4.2.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
11
|
+
cell_type_annotation-0.4.2.dist-info/licenses/LICENSE,sha256=4lkOIPKRK48xHbM2EZ3oKqWQ584xZMnfThy0iMECQv0,1064
|
|
12
|
+
cell_type_annotation-0.4.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 quadbio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|