Skip to content

feat(archetype): add archetype projection - #4412

Open
SupaNautilus wants to merge 17 commits into
scverse:mainfrom
SupaNautilus:add-archetype-projection
Open

SupaNautilus wants to merge 17 commits into
scverse:mainfrom
SupaNautilus:add-archetype-projection

Conversation

@SupaNautilus

Copy link
Copy Markdown

This package provides a system for scoring phenotypic states of single-cell data using archetypal analysis. The input is a single-cell gene expression matrix, which is transformed using a pre-trained weighting matrix and scaling matrix to identify representative phenotypic states based on gene expression. The output is a set of archetype representations and corresponding archetype projections for each cell, stored in the AnnData object.

Biological validation:
We applied this archetypal method to single-cell RNA sequencing data from breast cancer primary tumors and brain metastases, based on the dataset described by Yan, Y., Lin, Y., Kumar, T., et al. Ecotypes of triple-negative breast cancer in response to chemotherapy. Nature 654, 1088–1097 (2026). https://doi.org/10.1038/s41586-026-10469-9. The resulting archetype projections were used to identify differences in transcriptional phenotypes associated with response to chemotherapy. In particular, the proliferation archetype showed significantly greater activity in tumors from patients who achieved pathological complete response (pCR) after chemotherapy than in patients with residual disease (RD; p = 0.0026), supporting the archetypal method's ability to recover biologically meaningful tumor-state differences.

output501

This work was developed with guidance from Corey Weistuch, Charles Kocher, and Saurish Arora at Memorial Sloan Kettering Cancer Center.

@SupaNautilus SupaNautilus changed the title Add archetype projection feat(archetype): add archetype projection Oct 10, 2026
@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.72727% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.31%. Comparing base (45a5607) to head (a84071f).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/scanpy/tools/_archetype.py 71.42% 18 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4412      +/-   ##
==========================================
- Coverage   84.37%   84.31%   -0.06%     
==========================================
  Files         134      135       +1     
  Lines       12750    12816      +66     
==========================================
+ Hits        10758    10806      +48     
- Misses       1992     2010      +18     
Flag Coverage Δ
hatch-test.low-vers 81.10% <72.72%> (-0.05%) ⬇️
hatch-test.pre 84.12% <72.72%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scanpy/__init__.py 95.00% <100.00%> (+0.26%) ⬆️
src/scanpy/tools/__init__.py 91.66% <100.00%> (+0.36%) ⬆️
src/scanpy/tools/_archetype.py 71.42% <71.42%> (ø)

@SupaNautilus

Copy link
Copy Markdown
Author

All core test suites and the benchmark pipeline are passing green! The code is synced with main.

Note: The PR validation check (title/labels) and the Read the Docs build are currently failing. I’d appreciate a maintainer’s guidance or assistance with those when reviewing. Ready for review whenever you have a chance!

@SupaNautilus

Copy link
Copy Markdown
Author

All core test suites and the benchmark pipeline are passing green! The code is synced with main.

Note: The PR validation check (title/labels) and the Read the Docs build are currently failing. I’d appreciate a maintainer’s guidance or assistance with those when reviewing. Ready for review whenever you have a chance!

@ivirshup Friendly ping on this! All test suites and benchmark jobs are passing green. Whenever you have a moment to take a look or help assign the release milestone, I'd really appreciate your review. Thanks!

@read-the-docs-business

Copy link
Copy Markdown

Documentation build overview

📚 scanpy | 🛠️ Build #4648716 | 📁 Comparing a84071f against latest (0f9179e)

  🔍 Preview build  

275 files changed · + 1 added · ± 273 modified · - 1 deleted

+ Added

± Modified

- Deleted

This branch has not been deployed

No deployments
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