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 3 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

@codecov-commenter
Copy link

codecov-commenter commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 17.20430% with 77 lines in your changes missing coverage. Please review.

Project coverage is 65.92%. Comparing base (d8b8f91) to head (0965a61).
Report is 3 commits behind head on main.

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

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