Add COZI to nhood_enrichment()#1023
Conversation
Merge main into cozi_nhood_enrichment to sync with upstream
for more information, see https://pre-commit.ci
|
I get a resolution-too-deep error for dependencies for ubuntu related to tox and the error for macos also seems to be connected to tox. I only added an import warnings in the code, so I did not change any dependencies. Can someone help? |
Merge CLI changes from upstream
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1023 +/- ##
==========================================
- Coverage 76.54% 76.48% -0.06%
==========================================
Files 63 63
Lines 9072 9174 +102
Branches 1523 1541 +18
==========================================
+ Hits 6944 7017 +73
- Misses 1542 1567 +25
- Partials 586 590 +4
🚀 New features to boost your workflow:
|
|
Hi, sorry I just saw this. I'd like to understand what happens here before I give it an OK. Could we maybe set a meeting in the scverse zulip? |
|
@selmanozleyen I adopted the result class changes, ready for review |
selmanozleyen
left a comment
There was a problem hiding this comment.
The unit tests here aren't enough. Only isnan checks. Isn't there a way to ensure we have sensible results?
Also the doc formatting needs to be fixed so the CI's don't fail.
Meanwhile I also want to do performance improvement in this function and this PR. We can keep that separate though
| Annotated data matrix. | ||
| cluster_key : str | ||
| Key in `adata.obs` where the cluster (cell type) annotation is stored. | ||
| zscore_key : str, optional |
There was a problem hiding this comment.
zscore_key isn't being used here I think
| annotate: bool = False, | ||
| title: str | None = None, | ||
| cmap: str = "coolwarm", | ||
| palette: Palette_t = None, |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Description
normalizationparameter for conditional and total normalization of neighbor counts tonhood_enrichment()as described in Schiller et al bioRxiv.normalization=conditional. CCR is the proportion of cells of an index type that neighbors cells of the neighbor type.nhood_enrichment_dotplot()to plot zscore and CCR at once.min_cell_countparameter tonhood_enrichment()to filter out clusters of cells with counts below the set threshold. Filtered out interaction z-scores are replaced with NA.How has this been tested?
Added additional test functions for nhood_enrichment with conditional normalization and CCR. Test images for dotplot are missing, all other tests run successfully.
TODO