Skip to content

splitting annotate.py into quatitate.py and assign.py#1

Open
SamuelKrause133 wants to merge 1 commit intoDamLabResources:mainfrom
SamuelKrause133:phenotyping
Open

splitting annotate.py into quatitate.py and assign.py#1
SamuelKrause133 wants to merge 1 commit intoDamLabResources:mainfrom
SamuelKrause133:phenotyping

Conversation

@SamuelKrause133
Copy link
Copy Markdown

  • xenium_process quantitate: runs MLM/ULM enrichment scoring on a custom
    marker gene list and/or decoupler built-in resources (panglao, hallmark,
    collectri, dorothea, progeny). Supports --filter-obs to restrict scoring
    to a subset of cells (scores written back with NaN for excluded cells).

  • xenium_process assign: reads an obsm score matrix produced by quantitate
    and assigns a cell type label to each cluster using a pluggable strategy
    (default: top_positive; threshold and top_n_vote stubbed for future use).
    Optionally runs per-cluster differential expression.

Core changes:

  • annotation.py: add filter_cells_by_obs, run_enrichment_scoring,
    load_preset_resource, assign_clusters, STRATEGY_REGISTRY; refactor
    annotate_with_markers to delegate to new primitives
  • cli.py: register quantitate + assign; remove annotate
  • Delete xenium_process/commands/annotate.py

Config/docs:

  • example_config.toml, projects/PDAC_HIV/config.toml: replace [annotate]
    with [quantitate] + [assign] sections
  • makefile: run target updated to 6 steps (quantitate + assign replace annotate)

Tests:

  • Add tests/unit/test_quantitate_command.py (10 tests)
  • Add tests/unit/test_assign_command.py (9 tests)
  • Update test_commands.py, test_annotation.py (10 new core function tests)
  • Update functional pipeline and config in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant