angelolab / ark-analysis

Integrated pipeline for multiplexed image analysis
https://ark-analysis.readthedocs.io/en/latest/
MIT License
71 stars 25 forks source link

Fix error from zero fibers in an image #1011

Closed camisowers closed 1 year ago

camisowers commented 1 year ago

If you haven't already, please read through our contributing guidelines before opening your PR

What is the purpose of this PR? When an image has no fibers in it, calculate_fiber_alignment() errors out within segment_fibers() while processing the image. This is an issue withpd.concat() attempting to be called on an empty list.

How did you implement your changes

Easy to fix by moving the calculate_fiber_alignment() call into the wrapper function run_fiber_segmentation() for all processing rather than individual image call. This was where the function was intended to be anyways

Remaining issues

N/A