Skip to content

Add colgan26 and yu26 datasets, mouse embryo tutorial, and tree_neighbors fixes (v0.4.0) - #70

Merged
colganwi merged 8 commits into
mainfrom
embryos
Oct 8, 2026
Merged

colganwi merged 8 commits into
mainfrom
embryos

Conversation

@colganwi

@colganwi colganwi commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Datasets: add pycea.datasets.colgan26 (mouse embryo lineage atlas, E7.5-E10.0, with optional embryos subsetting) and pycea.datasets.yu26 (DNA Typewriter mouse lineage). Both load slimmed h5td files from the updated Zenodo record (23195576). Docs and bib entries included, and a --slow-tests flag gates the large-dataset tests.
  • Tutorial: add a mouse embryogenesis tutorial using colgan26 to the docs.
  • tree_neighbors fixes:
    • metric="path" with n_neighbors collected leaves on discovery rather than in distance order, so farther leaves could displace closer ones (138/300 random trees in a brute-force comparison). Nodes are now collected when popped from the queue, and ties are broken randomly. metric="lca" was checked against brute force and needed no change.
    • A single-string obs flagged the queried node instead of its neighbors.
  • depth_key: now defaults to tdata.uns["default_depth"] (falling back to "depth") in clades, n_extant, tree_distance, tree_neighbors, ancestral_linkage and fitness, matching pycea.pl.
  • ancestral_linkage: single-target mode stores per-cell results in tdata.obs['{key_added}_linkage'] when key_added is given. This changes the output column for callers passing key_added with target.
  • ancestral_states: supports boolean data. mean and sum treat True/False as 1/0.
  • Bump version to 0.4.0.

Test plan

  • pytest tests/ passes (225 passed, 5 skipped) before the last two commits; test_ancestral_states.py, test_ancestral_linkage.py and test_default_depth.py pass after them
  • test_colgan26 passes with --internet-tests --slow-tests
  • test_yu26 has not passed yet: the download hit a disk quota error on the author's home directory (environment limit, not a loader bug)
  • pre-commit passes on the changed files
  • The mouse-embryo tutorial's stored outputs should be refreshed by a top-to-bottom run

🤖 Generated with Claude Code

colganwi and others added 7 commits October 7, 2026 14:19
- path metric with n_neighbors collected leaves on discovery rather than in
  distance order, so farther leaves could displace closer ones; nodes are now
  collected when popped from the queue and ties are broken randomly
- single-string obs flagged the query node instead of its neighbors

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add loaders for the mouse embryo lineage tracing datasets, point the Zenodo
record at the new version, and add a --slow-tests flag so the large dataset
tests only run on request.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add get_depth_key and use it in clades, n_extant, tree_distance,
tree_neighbors, ancestral_linkage and fitness, matching pycea.pl.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Treat True/False as 1/0 for the mean and sum methods so internal nodes get
the fraction and number of True leaves.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add a tutorial using the colgan26 dataset to the docs, and remove the
autoreload magic and stale execution count from the growth dynamics
tutorial.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T02:16:21.267595Z d1db063 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.96610% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.65%. Comparing base (91b1802) to head (05372c7).

Files with missing lines Patch % Lines
src/pycea/datasets/datasets.py 18.75% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #70      +/-   ##
==========================================
- Coverage   93.92%   93.65%   -0.27%     
==========================================
  Files          37       37              
  Lines        3373     3405      +32     
==========================================
+ Hits         3168     3189      +21     
- Misses        205      216      +11     
Files with missing lines Coverage Δ
src/pycea/datasets/__init__.py 100.00% <100.00%> (ø)
src/pycea/pl/plot_tree.py 94.56% <100.00%> (ø)
src/pycea/tl/ancestral_linkage.py 95.56% <100.00%> (+0.01%) ⬆️
src/pycea/tl/ancestral_states.py 98.02% <100.00%> (+0.51%) ⬆️
src/pycea/tl/clades.py 98.46% <100.00%> (+0.02%) ⬆️
src/pycea/tl/fitness.py 96.86% <100.00%> (+0.01%) ⬆️
src/pycea/tl/n_extant.py 98.33% <100.00%> (+0.02%) ⬆️
src/pycea/tl/tree_distance.py 99.13% <100.00%> (+<0.01%) ⬆️
src/pycea/tl/tree_neighbors.py 99.34% <100.00%> (-0.03%) ⬇️
src/pycea/utils.py 91.23% <100.00%> (+0.54%) ⬆️
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@colganwi
colganwi merged commit d57fc3e into main Oct 8, 2026
8 checks passed
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