Skip to content

Conversation

chiarasch
Copy link

@chiarasch chiarasch commented Aug 12, 2025

Description

  • Adds normalization parameter for conditional and total normalization of neighbor counts to nhood_enrichment() as described in Schiller et al bioRxiv.
  • Adds conditional cell ratio (CCR) output when normalization= conditional. CCR is the proportion of cells of an index type that neighbors cells of the neighbor type.
  • Adds nhood_enrichment_dotplot()to plot zscore and CCR at once.
  • Adds min_cell_count parameter to nhood_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

  • Add dotplot test images for test

@chiarasch
Copy link
Author

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?

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2025

Codecov Report

❌ Patch coverage is 7.63359% with 121 lines in your changes missing coverage. Please review.
✅ Project coverage is 23.95%. Comparing base (d8b8f91) to head (c2c40e7).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/squidpy/gr/_nhood.py 3.37% 86 Missing ⚠️
src/squidpy/pl/_graph.py 10.25% 35 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (d8b8f91) and HEAD (c2c40e7). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (d8b8f91) HEAD (c2c40e7)
4 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1023       +/-   ##
===========================================
- Coverage   66.63%   23.95%   -42.68%     
===========================================
  Files          40       41        +1     
  Lines        6060     6186      +126     
  Branches     1015     1036       +21     
===========================================
- Hits         4038     1482     -2556     
- Misses       1662     4687     +3025     
+ Partials      360       17      -343     
Files with missing lines Coverage Δ
src/squidpy/_docs.py 94.36% <100.00%> (+0.16%) ⬆️
src/squidpy/im/_io.py 15.00% <100.00%> (-51.91%) ⬇️
src/squidpy/pl/_graph.py 20.00% <10.25%> (-59.37%) ⬇️
src/squidpy/gr/_nhood.py 16.93% <3.37%> (-60.57%) ⬇️

... and 29 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@selmanozleyen
Copy link
Member

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 selmanozleyen self-assigned this Sep 18, 2025
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.

3 participants