fmi-basel / gliberal-scMultipleX

Feature extraction and linking of multiplexing data.
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

3D Feature Extraction debugging #122

Open nrepina opened 2 months ago

nrepina commented 2 months ago

This PR addresses a few bug fixes in the Feature Extraction task:

@jluethi Please have a look and we can decide on the best approach for these fixes before merging into main.

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 0.26%. Comparing base (6ac2465) to head (4c8ebe3). Report is 11 commits behind head on main.

Files Patch % Lines
...tiplex/fractal/scmultiplex_feature_measurements.py 0.00% 15 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #122 +/- ## ======================================== - Coverage 0.27% 0.26% -0.01% ======================================== Files 54 55 +1 Lines 4805 4942 +137 ======================================== Hits 13 13 - Misses 4792 4929 +137 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jluethi commented 2 months ago

Hey @nrepina

This looks good, great to hear that it's working now. I looked through the tests and we really only test the one masking case where we measure on the same objects that are also our mask. So far, all measurement tests just use the original, very tiny dataset. And that test dataset only has one set of labels (only nuclei, no organoids).

We now also have the linking dataset available in the test suite that you've added @nrepina (see https://zenodo.org/records/10683087). I'll work towards getting a test on that one running, because it actually contains nuclei & organoids => we can actually test for this case with the new test dataset :)

The upsampling already seems nicely integrated, though testing this further should wait for ngio flexibility.

Thus, I think the TODO list is:

jluethi commented 2 months ago

Turns out, using the https://zenodo.org/records/10683087 dataset for this tests won't be trivial atm (until there is a better fix for https://github.com/fractal-analytics-platform/fractal-tasks-core/issues/771). The test data contains organoids that have a lower resolution label image than the nuc.

I'll give it a quick shot to generate a "psuedo-org" label image on-the-fly to be able to run those tests

nrepina commented 2 months ago

Hey @jluethi, great, sounds like a plan. It has been on my to-do list to update the Zenodo test dataset with an object segmentation that matches the child segmentation level. I will get to that in the coming days and this should resolve the testing case until Fractal has a better solution for upscaling :) Will ping you once it is updated.

nrepina commented 6 days ago

@jluethi update of Zenodo dataset is finished! Now we should be able to cover the use case of masked single-cell feature extraction with a test dataset. I updated the scmpx integration tests, it's now ready for you to update the feature extraction tests and merge to main :)