annotuneagent 0.1.1__tar.gz → 0.1.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.
Files changed (80) hide show
  1. annotuneagent-0.1.3/CHANGELOG.md +153 -0
  2. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/CITATION.cff +2 -2
  3. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/PKG-INFO +11 -4
  4. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/README.md +9 -3
  5. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/api/index.md +5 -0
  6. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/index.md +1 -0
  7. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/installation.md +4 -2
  8. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/quickstart.md +26 -4
  9. annotuneagent-0.1.3/docs/tutorials/gse266598_annotation.ipynb +2043 -0
  10. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/tutorials/index.md +11 -0
  11. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/tutorials/report.md +1 -1
  12. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/pyproject.toml +1 -0
  13. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/__init__.py +9 -1
  14. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/_version.py +1 -1
  15. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/annotate.py +29 -5
  16. annotuneagent-0.1.3/src/annotuneagent/arbitrate.py +208 -0
  17. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/cli.py +51 -13
  18. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/decide.py +47 -16
  19. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/evaluate.py +56 -2
  20. annotuneagent-0.1.3/src/annotuneagent/geo.py +619 -0
  21. annotuneagent-0.1.3/src/annotuneagent/hypotheses.py +46 -0
  22. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/local_lora.py +95 -20
  23. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/markers.py +25 -0
  24. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/markers.tsv +24 -1
  25. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/ontology/ontology_map.jsonl +11 -0
  26. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/prepare.py +33 -0
  27. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/votes.py +15 -2
  28. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/workflow.py +359 -34
  29. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent.egg-info/SOURCES.txt +4 -0
  30. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_annotate.py +164 -19
  31. annotuneagent-0.1.3/tests/test_bugfixes_1111.py +341 -0
  32. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_cli.py +37 -0
  33. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_decide.py +51 -0
  34. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_evaluate.py +34 -0
  35. annotuneagent-0.1.3/tests/test_geo.py +238 -0
  36. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_local_lora.py +46 -0
  37. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_markers.py +26 -4
  38. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_prepare.py +7 -0
  39. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_version.py +2 -2
  40. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_votes.py +17 -0
  41. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_workflow.py +393 -3
  42. annotuneagent-0.1.1/CHANGELOG.md +0 -66
  43. annotuneagent-0.1.1/src/annotuneagent/arbitrate.py +0 -141
  44. annotuneagent-0.1.1/src/annotuneagent/hypotheses.py +0 -38
  45. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/.github/workflows/publish.yml +0 -0
  46. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/.github/workflows/tests.yml +0 -0
  47. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/.gitignore +0 -0
  48. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/.readthedocs.yaml +0 -0
  49. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/LICENSE +0 -0
  50. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/MANIFEST.in +0 -0
  51. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/SECURITY.md +0 -0
  52. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/_static/css/custom.css +0 -0
  53. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/_templates/README.md +0 -0
  54. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/conf.py +0 -0
  55. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/marker_sources.md +0 -0
  56. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/requirements.txt +0 -0
  57. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/tutorials/load_model.ipynb +0 -0
  58. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/docs/tutorials/pbmc8k_annotation.ipynb +0 -0
  59. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/setup.cfg +0 -0
  60. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/__main__.py +0 -0
  61. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/evidence.py +0 -0
  62. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/granularity/__init__.py +0 -0
  63. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/granularity/cl_dag.py +0 -0
  64. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/granularity/ontology_map.py +0 -0
  65. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/granularity/relations.py +0 -0
  66. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/marker_plot.py +0 -0
  67. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/mltools.py +0 -0
  68. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/ontology/cl_isa.json +0 -0
  69. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/ontology/granularity_policy.yaml +0 -0
  70. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/py.typed +0 -0
  71. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/read.py +0 -0
  72. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/tokenizer/LICENSE +0 -0
  73. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/tokenizer/merges.txt +0 -0
  74. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/tokenizer/tokenizer.json +0 -0
  75. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/tokenizer/tokenizer_config.json +0 -0
  76. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/src/annotuneagent/tokenizer/vocab.json +0 -0
  77. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_evidence.py +0 -0
  78. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_granularity.py +0 -0
  79. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_mltools.py +0 -0
  80. {annotuneagent-0.1.1 → annotuneagent-0.1.3}/tests/test_read.py +0 -0
@@ -0,0 +1,153 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ ## [0.1.3] - 2026-11-11
6
+
7
+ ### Added
8
+
9
+ - Dictionary rows for macrophage, mature NK T cell, choroid plexus epithelium,
10
+ kidney connecting tubule epithelium, retinal horizontal and amacrine cells,
11
+ skeletal muscle myoblast, ovarian stroma, Merkel cell, small-intestine
12
+ transit amplifying cell, limb Schwann cell, and brain innate lymphoid cell.
13
+ - `evaluate(..., raw_label_key=...)`. A mapped name is the reference only when
14
+ it is the majority of every author-labeled cell. An unmapped raw majority
15
+ stays unmapped.
16
+ - `write_h5ad` saves a prepared AnnData with its QC report.
17
+ - `ANNOTUNE_API_KEY` is sent as a bearer token.
18
+
19
+ ### Changed
20
+
21
+ - A marker score caps each gene's log2 fold change at 3. A fired negative marker
22
+ subtracts half of one positive gene's share and still blocks a hard marker
23
+ label.
24
+ - When a call touches both CD4 and CD8, the written title is T cell. A cluster
25
+ whose NK and T panels are both specific is a cytotoxic mixture. A tissue
26
+ macrophage or alveolar fibroblast named by a model is kept when its own
27
+ panel is on. Effector-memory CD8 is not written when a MAIT marker is
28
+ enriched.
29
+
30
+ ### Fixed
31
+
32
+ - `dictionary_hits` order no longer depends on the input file name. The
33
+ command line and the Python API use the same fixed seed.
34
+ - A negative marker that is absent from the matrix stays on the ML panel.
35
+ `n_negative_unmeasured` counts it, and the marker score does not.
36
+ - `annotuneagent[models]` installs `jinja2`, which the chat template needs.
37
+ `run` with model endpoints checks `transformers` and `jinja2` before
38
+ scoring instead of failing at the first cluster.
39
+ - Model runs no longer stop on a one-cell cluster, an integer cluster
40
+ column, or unused categories. Wilcoxon skips clusters with fewer than two
41
+ cells; their model calls are recorded as failed.
42
+ - A label needs a positive gene that is enriched and detected in 25% of the
43
+ cluster, the same rule as the score.
44
+ - A model URL with a trailing slash no longer posts to `//completion` (404).
45
+ - A server not started by this process is called with the adapter ids its
46
+ `/lora-adapters` file names give, so `--lora ml.gguf,name.gguf` is not
47
+ swapped. A server started with repeated `--lora` flags is recognized.
48
+ - `TaskEndpoint(system=...)` is used on the URL path.
49
+ - The report shows `escalate` for an ML escalation instead of `null`.
50
+ - `--hypotheses` reads UTF-8 with or without a BOM, accepts `support` and
51
+ `requires_any`, and rejects non-list gene fields. `Hypothesis("x",
52
+ positive="CD3E")` is one gene, not four letters.
53
+ - `read_geo` keeps an uncompressed `features.tsv` or `genes.tsv`.
54
+ - `evaluate` treats a cluster with no record as uncertain.
55
+
56
+ ## [0.1.2] - 2026-11-10
57
+
58
+ ### Added
59
+
60
+ - `geo_info` reads a GEO series record: sample titles, accessions, and
61
+ characteristics, without the count matrices. `read_geo` downloads the
62
+ samples you name and joins them. `groups` sets `obs["group"]`. The GEO
63
+ title stays in `obs["sample"]`.
64
+ - A tutorial runs [GSE266598](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE266598)
65
+ from the series page through `prepare` and annotation.
66
+
67
+ ### Fixed
68
+
69
+ - The CLI refuses to write the JSON report, the labeled h5ad, or the marker
70
+ PDF onto an input file, or to use one path for two of those outputs.
71
+ - A T-cell subtype with no receptor gene detected in 25% of the cluster is
72
+ left out of `dictionary_hits`, is not a vote, and is not written when it is
73
+ the only name still in the judgment.
74
+ - `read_geo` keeps an uncompressed 10x file uncompressed. Several h5 matrices
75
+ use the one filtered file; otherwise the call raises. A sample title that
76
+ contains spaces can be passed as one string.
77
+ - Reusing a server this process did not start checks `/props` and
78
+ `/lora-adapters` again.
79
+
80
+ - `prepare` drops a stored neighbors record that has no `n_neighbors` before
81
+ it builds the graph. Hao 2021 PBMC carries that record, and Scanpy raised
82
+ `KeyError` on it.
83
+ - A marker score keeps every positive gene in the mean. A gene detected in
84
+ fewer than 25% of the cells contributes 0. Dropping that gene let monocyte
85
+ clusters match memory CD4 T cell on `S100a4` and `Cd44` alone.
86
+ - A name whose cited markers fail the expression check is not kept when the
87
+ name and ML models agree on another lineage. A marker call that already
88
+ failed is not written again in its place.
89
+ - A name under T cell cannot win the marker score unless `CD3D`, `CD3E`,
90
+ `CD3G`, or `TRAC` is detected in at least 25% of the cluster. Mouse symbols
91
+ are `Cd3d`, `Cd3e`, `Cd3g`, and `Trac`. The T cell row itself is unchanged.
92
+ - Human memory CD4 T cell uses `SLC4A10` and `TRAV1-2` as negative markers.
93
+
94
+ ## [0.1.1] - 2026-11-09
95
+
96
+ ### Fixed
97
+
98
+ - A running server is checked with `/props` and `/lora-adapters` when `/proc`
99
+ is unavailable, so Windows and macOS can reuse a server this package did
100
+ not start.
101
+ - A `TaskEndpoint` URL calls `/completion` and enables one LoRA adapter for
102
+ that request. When `maxlen` is omitted, name allows 2048 tokens and ML
103
+ allows 8192. An ML prompt does not fit in the name limit.
104
+ - A model request waits 600 seconds. `ANNOTUNE_TIMEOUT` or the `timeout`
105
+ argument overrides it. Health checks stay at 2 seconds.
106
+ - On Windows, a process check does not call `os.kill`.
107
+
108
+ ### Changed
109
+
110
+ - The load-model tutorial points Windows users to
111
+ [AnnoTuneLoader](https://github.com/leelieber2025/AnnoTuneLoader).
112
+ - A tutorial explains each field of the `run` report. The `Queries` paragraph
113
+ is text to paste into another model.
114
+
115
+ ## [0.1.0] - 2026-11-09
116
+
117
+ First public release.
118
+
119
+ ### Added
120
+
121
+ - `read_10x(base, samples)` reads one filtered 10x matrix per sample folder
122
+ (h5 preferred over the mtx directory), makes gene and cell names unique,
123
+ and joins the samples.
124
+ - `prepare` fits QC per sample and prints the numeric cutoffs: total counts,
125
+ genes per cell, percent of counts in the top 20 genes, and mitochondrial
126
+ percent together with the 8% floor. Ribosomal and hemoglobin shares are
127
+ recorded and not used as filters.
128
+ - `prepare` normalization is `norm="log1p"` (default) or `norm="shifted"`.
129
+ Neighbor-graph batch correction is `none`, `harmony`, `combat`,
130
+ `scanorama`, `scvi`, or `scvi+harmony`.
131
+ - Scrublet and SOLO run per sample on the filtered unnormalized counts.
132
+ `doublet_chip` is `"10k"` (0.8% multiplets per 1,000 recovered cells) or
133
+ `"20k"` (0.4% per 1,000). `solo_expected_rates` replaces that rate.
134
+ AmbiDose, when enabled, runs per sample.
135
+ - `run` collects three results for each cluster: the marker score, the name
136
+ model, and the ML model. A judgment reads those results and writes the
137
+ title. The title is a dictionary name. The name and ML models run when a
138
+ model chain is passed. The name model copies a name from the marker
139
+ dictionary. The ML model is trained on machine-learning measurements of
140
+ the cluster (differential expression and marker-panel statistics) and
141
+ copies a name from those candidates. A cluster can stay unnamed. A cluster
142
+ with two programs and fewer than 40 cells keeps the name when marker,
143
+ name, and ML agree. An unclear cluster can take the title of the one clear
144
+ cluster it touches.
145
+ - `annotate` scores caller-supplied positive and negative markers.
146
+ `evaluate` compares cluster labels with a majority author label.
147
+ - The CLI entry point is `annotuneagent`.
148
+
149
+ ### Changed
150
+
151
+ - GGUF weights are not in the package. They are downloaded separately. The
152
+ tokenizer, marker table, and Cell Ontology snapshot are installed with the
153
+ package.
@@ -17,8 +17,8 @@ authors:
17
17
  orcid: "https://orcid.org/0000-0002-9276-9129"
18
18
  repository-code: "https://github.com/leelieber2025/AnnoTuneAgent"
19
19
  license: Apache-2.0
20
- version: 0.1.1
21
- date-released: "2026-11-09"
20
+ version: 0.1.3
21
+ date-released: "2026-11-11"
22
22
  keywords:
23
23
  - single-cell
24
24
  - RNA-seq
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: annotuneagent
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Cluster-level cell-type annotation from marker, name, and ML results
5
5
  Author-email: "Zhao Li (李钊)" <leelieber@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -37,6 +37,7 @@ Provides-Extra: scvi
37
37
  Requires-Dist: scvi-tools>=1.1.3; extra == "scvi"
38
38
  Provides-Extra: models
39
39
  Requires-Dist: transformers; extra == "models"
40
+ Requires-Dist: jinja2>=3.1; extra == "models"
40
41
  Provides-Extra: scfair
41
42
  Requires-Dist: scfair>=0.8; extra == "scfair"
42
43
  Provides-Extra: dev
@@ -125,7 +126,8 @@ Python 3.10–3.13.
125
126
  pip install annotuneagent
126
127
  ```
127
128
 
128
- Local GGUF models need `pip install 'annotuneagent[models]'`. Optional methods:
129
+ Local GGUF models need `pip install 'annotuneagent[models]'`, which installs
130
+ the tokenizer stack (`transformers` and `jinja2`). Optional methods:
129
131
  AmbiDose (`denoise=True`, [install](https://github.com/leelieber2025/AmbiDose)),
130
132
  scVI and SOLO (`annotuneagent[scvi]`), scFair (`annotuneagent[scfair]`),
131
133
  Harmony, and Scanorama. If you select one that is missing, `prepare` prints
@@ -159,6 +161,11 @@ directory when there is no h5). Scrublet and SOLO run per sample on those
159
161
  filtered counts. `doublet_chip="10k"` (default) uses 0.8% multiplets per
160
162
  1,000 recovered cells, and `"20k"` uses 0.4%.
161
163
 
164
+ `geo_info("GSE341410")` lists the samples in a GEO series. `read_geo` then
165
+ downloads the ones you name, and `groups` sets the condition in `obs["group"]`.
166
+ [docs/tutorials/gse266598_annotation.ipynb](docs/tutorials/gse266598_annotation.ipynb)
167
+ follows one series from the GEO page through annotation.
168
+
162
169
  To score a caller-supplied list instead of the built-in dictionary:
163
170
 
164
171
  ```python
@@ -207,12 +214,12 @@ The tokenizer is installed with the package. See
207
214
 
208
215
  ## Status
209
216
 
210
- **0.1.1 (Alpha).** Import as `import annotuneagent as ata`.
217
+ **0.1.3 (Alpha).** Import as `import annotuneagent as ata`.
211
218
 
212
219
  ## Citation
213
220
 
214
221
  For the software record, cite the [Zenodo DOI](https://doi.org/10.5281/zenodo.24092828).
215
- Pin the package version used in the analysis, for example `annotuneagent==0.1.1`.
222
+ Pin the package version used in the analysis, for example `annotuneagent==0.1.3`.
216
223
 
217
224
  ## License
218
225
 
@@ -72,7 +72,8 @@ Python 3.10–3.13.
72
72
  pip install annotuneagent
73
73
  ```
74
74
 
75
- Local GGUF models need `pip install 'annotuneagent[models]'`. Optional methods:
75
+ Local GGUF models need `pip install 'annotuneagent[models]'`, which installs
76
+ the tokenizer stack (`transformers` and `jinja2`). Optional methods:
76
77
  AmbiDose (`denoise=True`, [install](https://github.com/leelieber2025/AmbiDose)),
77
78
  scVI and SOLO (`annotuneagent[scvi]`), scFair (`annotuneagent[scfair]`),
78
79
  Harmony, and Scanorama. If you select one that is missing, `prepare` prints
@@ -106,6 +107,11 @@ directory when there is no h5). Scrublet and SOLO run per sample on those
106
107
  filtered counts. `doublet_chip="10k"` (default) uses 0.8% multiplets per
107
108
  1,000 recovered cells, and `"20k"` uses 0.4%.
108
109
 
110
+ `geo_info("GSE341410")` lists the samples in a GEO series. `read_geo` then
111
+ downloads the ones you name, and `groups` sets the condition in `obs["group"]`.
112
+ [docs/tutorials/gse266598_annotation.ipynb](docs/tutorials/gse266598_annotation.ipynb)
113
+ follows one series from the GEO page through annotation.
114
+
109
115
  To score a caller-supplied list instead of the built-in dictionary:
110
116
 
111
117
  ```python
@@ -154,12 +160,12 @@ The tokenizer is installed with the package. See
154
160
 
155
161
  ## Status
156
162
 
157
- **0.1.1 (Alpha).** Import as `import annotuneagent as ata`.
163
+ **0.1.3 (Alpha).** Import as `import annotuneagent as ata`.
158
164
 
159
165
  ## Citation
160
166
 
161
167
  For the software record, cite the [Zenodo DOI](https://doi.org/10.5281/zenodo.24092828).
162
- Pin the package version used in the analysis, for example `annotuneagent==0.1.1`.
168
+ Pin the package version used in the analysis, for example `annotuneagent==0.1.3`.
163
169
 
164
170
  ## License
165
171
 
@@ -14,7 +14,12 @@ The public API is the names below and `annotuneagent.__version__`.
14
14
  :nosignatures:
15
15
 
16
16
  read_10x
17
+ geo_info
18
+ read_geo
19
+ GeoSeries
20
+ GeoSample
17
21
  prepare
22
+ write_h5ad
18
23
  run
19
24
  annotate
20
25
  evaluate
@@ -58,6 +58,7 @@ scFair supplies the gene list and the resolution is half of its suggestion.
58
58
  |------|----------|
59
59
  | {doc}`installation`, {doc}`quickstart` | Install, then a first call |
60
60
  | {doc}`tutorials/pbmc8k_annotation` | PBMC 8k: `prepare`, then the name and ML models |
61
+ | {doc}`tutorials/gse266598_annotation` | GEO GSE266598: download, then `prepare` and annotation |
61
62
  | {doc}`tutorials/load_model` | Download the weights and run a local or remote model server |
62
63
  | {doc}`tutorials/report` | What each part of the `run` report is for, including the text to paste |
63
64
  | {doc}`api/index` | Function signatures |
@@ -11,7 +11,7 @@ import annotuneagent as ata
11
11
  print(ata.__version__)
12
12
  ```
13
13
 
14
- The version is set in `src/annotuneagent/_version.py` (currently **0.1.1**).
14
+ The version is set in `src/annotuneagent/_version.py` (currently **0.1.3**).
15
15
 
16
16
  From a checkout:
17
17
 
@@ -54,4 +54,6 @@ the reviewed name map. The tokenizer files come from `Qwen/Qwen3.5-4B`
54
54
  ## Next
55
55
 
56
56
  {doc}`quickstart` for a first call, {doc}`tutorials/pbmc8k_annotation` for QC and
57
- annotation, {doc}`tutorials/load_model` for a local or remote model server.
57
+ annotation, {doc}`tutorials/gse266598_annotation` for a GEO series from the
58
+ series page through annotation, and {doc}`tutorials/load_model` for a local or
59
+ remote model server.
@@ -28,6 +28,23 @@ adata = ata.read_10x("outs", ["sample_a", "sample_b"])
28
28
  adata = ata.prepare(adata, species="mouse", batch_key="sample")
29
29
  ```
30
30
 
31
+ To start from a GEO series, `ata.geo_info` reads the series record and lists
32
+ each sample title, accession, and characteristics. It does not download
33
+ counts. Print that result, choose the samples, and pass the names you want
34
+ to `ata.read_geo`. `obs["sample"]` stays the GEO title. `obs["group"]` is the
35
+ name you pass. Use either column as `batch_key`.
36
+
37
+ ```python
38
+ info = ata.geo_info("GSE341410")
39
+ adata = ata.read_geo(info, samples=["B1", "B3"], groups="B1: control B3: Day7")
40
+ adata = ata.prepare(adata, species="mouse", batch_key="sample")
41
+ ```
42
+
43
+ {doc}`tutorials/gse266598_annotation` runs this path on
44
+ [GSE266598](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE266598):
45
+ read the series page, download the two calvarial samples, then `prepare` and
46
+ `run`.
47
+
31
48
  ## Run the name and ML models
32
49
 
33
50
  The call above collects the marker score only. To also run the name and ML
@@ -140,7 +157,9 @@ annotuneagent --input counts.h5ad --output report.json --output-h5ad prepared.h5
140
157
 
141
158
  When the CLI writes a prepared `.h5ad`, it stores `uns["annotune_prep"]` as a
142
159
  JSON string so AnnData can write the nested QC report. After reloading, use
143
- `json.loads(adata.uns["annotune_prep"])`.
160
+ `json.loads(adata.uns["annotune_prep"])`. From Python, save with
161
+ `ata.write_h5ad(adata, "prepared.h5ad")`; `adata.write_h5ad` raises on that
162
+ report.
144
163
 
145
164
  ## Outputs
146
165
 
@@ -176,8 +195,9 @@ panel, not to each gene separately.
176
195
 
177
196
  ### Report fields
178
197
 
179
- - `dropped_hypotheses`: each dictionary type left out, and the positive markers
180
- missing from the matrix.
198
+ - `dropped_hypotheses`: each dictionary type left out because none of its
199
+ positive markers are in the matrix. One missing positive gene is omitted
200
+ and the type stays.
181
201
  - `review`: clusters that still need a look. The order is not an accuracy
182
202
  score.
183
203
  - `annotation_code`: an editable cluster mapping, `fine_order`, a `marker_dict`,
@@ -236,7 +256,9 @@ result, and writes the title. Doubt is recorded in `annotune_hint` and in
236
256
  - `no_marker_passed`: none of the name's cited markers passed the expression
237
257
  check. The name stays, the hint reads `no marker passed`, and the dotplot
238
258
  shows the best-measured cited genes. If the marker call is a different name
239
- that did pass, that name is written instead.
259
+ that did pass, that name is written instead. An unchecked marker call is
260
+ tried once. If it fails, and the name and ML models agree on another
261
+ lineage, that agreed name is written instead.
240
262
  - `mixed_programs`: a cluster under 40 cells shows two programs. It is named
241
263
  only when the marker score, name model, and ML model give the same name. The
242
264
  hint lists the programs. Otherwise the cluster stays unnamed.