Add signature reversal scoring to enrichment - #1082
Open
daveringelberg wants to merge 7 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1082 +/- ##
==========================================
+ Coverage 79.45% 79.78% +0.32%
==========================================
Files 53 53
Lines 7546 7667 +121
==========================================
+ Hits 5996 6117 +121
Misses 1550 1550
🚀 New features to boost your workflow:
|
Author
|
It looks like the ReadTheDocs failure is unrelated to this PR. The warnings seem to come from external intersphinx/scvi-lightning references. |
Author
|
After a further pass, the implementation now uses raw CMap WTCS. The remaining ReadTheDocs failure is caused by the same external issue noted above. |
Member
|
Thanks! I'll have a look at the RTD failure soon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
docsis updatedDescription of changes
This adds a first CMap-style signature reversal workflow to
pt.tl.Enrichment.Given perturbation-level
AnnDatawith perturbations as observations and genes as variables, users can provide either up/down query gene sets or a signed query signature. The method scores each perturbation by how strongly it opposes the query signature and stores the results back on the AnnData object.This addresses the signature reversal part of #1036. It does not address Bliss/Loewe synergy, dose-response, or genetic interaction workflows.
Technical details
Enrichment.signature_reversaladata.obsadata.uns.X, an optional layer, and optional gene-symbol matching throughadata.varTesting
ruff check src\pertpy\tools\_enrichment.py tests\tools\test_enrichment.pyruff format --check src\pertpy\tools\_enrichment.py tests\tools\test_enrichment.pypytest tests\tools\test_enrichment.py -q -p no:cacheproviderAddresses part of #1036.