Skip to content

sq.pp.filter_cells for SpatialData #1011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

selmanozleyen
Copy link
Member

@selmanozleyen selmanozleyen commented Jun 18, 2025

Fixes #1007.

Hi @timtreis ,

I changed some things compared to your PR: #967 . The things I changed:

  • No error checks for min_counts, min_genes, max_counts, max_genes since all of them can be handled by the call of sc.filter_cells
  • refactored the logic and removed duplicate code

The code from what I understand should be in the following logic.

  • Let the sc.filter_cells filter the tables and update others based on that. If there is no actual filtering I think it would be best because we would assure same behavior with sc.filter_cells

What needs to be done:

  • write tests

Tests fails because scverse/spatialdata#946 needs to be merged first

@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 75.26882% with 23 lines in your changes missing coverage. Please review.

Project coverage is 66.80%. Comparing base (d8b8f91) to head (c9e48f9).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/squidpy/pp/_simple.py 75.26% 11 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1011      +/-   ##
==========================================
+ Coverage   66.63%   66.80%   +0.16%     
==========================================
  Files          40       41       +1     
  Lines        6060     6160     +100     
  Branches     1015     1036      +21     
==========================================
+ Hits         4038     4115      +77     
- Misses       1662     1673      +11     
- Partials      360      372      +12     
Files with missing lines Coverage Δ
src/squidpy/pp/_simple.py 75.26% <75.26%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@selmanozleyen selmanozleyen requested a review from timtreis June 30, 2025 12:55
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.

Function to subset the entire spatialdata object
2 participants