Skip to content

feat(archetype): add archetype projection - #4412

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

SupaNautilus wants to merge 14 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.
⚠️ Please upload report for BASE (main@8ed52d9). Learn more about missing BASE report.
✅ 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.24%           
=======================================
  Files           ?      135           
  Lines           ?    12757           
  Branches        ?        0           
=======================================
  Hits            ?    10747           
  Misses          ?     2010           
  Partials        ?        0           
Flag Coverage Δ
hatch-test.low-vers 81.01% <72.72%> (?)
hatch-test.pre 84.04% <72.72%> (?)

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%> (ø)
src/scanpy/tools/__init__.py 91.66% <100.00%> (ø)
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!

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