Skip to content

Commit 3ef59de

Browse files
authored
Compound Label (#47)
* Add compound label decomposition and Hungarian cytescore_compound scoring; add ontology name columns and fix pair_index shadowing in compound pairs; update docs, notebook, and Modal worker/status handling; add Modal smoke scripts and tests; bump dependencies and production pyproject metadata * wip * wip
1 parent c254912 commit 3ef59de

20 files changed

Lines changed: 2710 additions & 563 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ tmp/
44
.env
55
.mypy_cache/
66
.pytest_cache/
7+
.ruff_cache/
78
*.csv
89
*.owl
910
*.npz
1011
*.npz.meta
1112
*.json
13+
cyteonto_results/
14+
dist/

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
`cyteonto` compares two sets of cell type annotations against the [Cell Ontology (CL)](https://obofoundry.org/ontology/cl.html). Given label lists from a study author and one or more annotation algorithms, it:
44

5-
1. Generates a structured description for every label with an LLM.
6-
2. Embeds those descriptions with a configured embedding model.
7-
3. Matches each embedding to the closest CL term.
8-
4. Scores each author/algorithm pair using an ontology-aware similarity metric (default: a Gaussian kernel on the cosine similarity of the CL term embeddings).
9-
5. Returns a tidy DataFrame with one row per `(algorithm, pair_index)`.
5+
1. Decomposes mixture labels (doublets, mixed populations) into cell-type parts with an LLM when needed.
6+
2. Generates a structured description for every label (or part) with an LLM.
7+
3. Embeds those descriptions with a configured embedding model.
8+
4. Matches each embedding to the closest CL term.
9+
5. Scores each author/algorithm pair using an ontology-aware similarity metric (default: a Gaussian kernel on the cosine similarity of the CL term embeddings). Compound pairs use Hungarian bipartite matching with an optional coverage penalty when part counts differ.
10+
6. Returns a tidy DataFrame with one row per `(algorithm, pair_index)`.
1011

11-
Updated ReadMe: [cyteonto/README.md](cyteonto/README.md). More documentation to follow!
12+
Updated ReadMe: [cyteonto/README.md](cyteonto/README.md). Process flow and file layout: [docs/WORKFLOW.md](docs/WORKFLOW.md), [docs/FILE_MANAGEMENT.md](docs/FILE_MANAGEMENT.md).
1213

1314

1415
## Modal Service

cyteonto/README.md

Lines changed: 88 additions & 44 deletions
Large diffs are not rendered by default.

cyteonto/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ class Config:
7878
"author_label",
7979
"algorithm_label",
8080
"author_ontology_id",
81+
"author_ontology_name",
8182
"author_embedding_similarity",
8283
"algorithm_ontology_id",
84+
"algorithm_ontology_name",
8385
"algorithm_embedding_similarity",
8486
"cytescore_similarity",
8587
"similarity_method",

0 commit comments

Comments
 (0)