Skip to content

Conversation

@w-k-jones
Copy link
Member

@w-k-jones w-k-jones commented Jul 12, 2025

Adds features requested in #508, along with postprocessing utilities to perform the conversion in both directions. Note that in the presence of stub cells, this operation cannot be performed perfectly.

Some additional features not currently included are conversion to track masks (although the reverse is not possible) and a function for simultaneously filtering features from both a feature dataframe and the corresponding feature mask.

  • Have you followed our guidelines in CONTRIBUTING.md?
  • Have you self-reviewed your code and corrected any misspellings?
  • Have you written documentation that is easy to understand?
  • Have you written descriptive commit messages?
  • Have you added NumPy docstrings for newly added functions?
  • Have you formatted your code using black?
  • If you have introduced a new functionality, have you added adequate unit tests?
  • Have all tests passed in your local clone?
  • If you have introduced a new functionality, have you added an example notebook?
  • Have you kept your pull request small and limited so that it is easy to review?
  • Have the newest changes from this branch been merged?

@w-k-jones w-k-jones self-assigned this Jul 12, 2025
@w-k-jones w-k-jones added the enhancement Addition of new features, or improved functionality of existing features label Jul 12, 2025
@codecov
Copy link

codecov bot commented Jul 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.00%. Comparing base (1433722) to head (d71ed11).

Additional details and impacted files
@@              Coverage Diff              @@
##           RC_v1.6.x     #512      +/-   ##
=============================================
+ Coverage      63.53%   64.00%   +0.46%     
=============================================
  Files             27       27              
  Lines           3842     3892      +50     
=============================================
+ Hits            2441     2491      +50     
  Misses          1401     1401              
Flag Coverage Δ
unittests 64.00% <100.00%> (+0.46%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@github-actions
Copy link

github-actions bot commented Jul 12, 2025

Linting results by Pylint:

Your code has been rated at 8.31/10 (previous run: 8.31/10, +0.00)
The linting score is an indicator that reflects how well your code version follows Pylint’s coding standards and quality metrics with respect to the RC_v1.6.x branch.
A decrease usually indicates your new code does not fully meet style guidelines or has potential errors.

Copy link
Member

@JuliaKukulies JuliaKukulies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very useful addition, @w-k-jones! I have tested this with our example notebooks and it works without problems. The design looks also good to me!

I am just wondering if there was a reason why we are not adding the capability to have either cell or track numbers in the mask (and limit the conversion from features to track to a one-direction conversion only). Same is true for filtered features. With the function that you have for converting features to cell numbers, it seems like an easy add to instead of the cell numbers use tracks or filtered features.

Also, what do you think about modifying one of our example notebooks in a way that we apply this new function. I think as of now, most notebooks so the tracking first and then the segmentation, but it would be fairly easy to change one example to the tracking first and then show how the returned mask in the segmentation contains the cell numbers. I am happy to help with such an example!

@JuliaKukulies JuliaKukulies added this to the v1.6.2 milestone Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Addition of new features, or improved functionality of existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow users to have segmentation mask the cell number rather than the feature number

2 participants