angelolab / ark-analysis

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

Duplicate FOV name issues with cell table generation #1125

Closed camisowers closed 3 months ago

camisowers commented 4 months ago

Please refer to our FAQ and look at our known issues before opening a bug report.

Describe the bug If the user has a naming convention of fov1 and fov1_duplicate, this causes an issue in generate_cell_table() due to some ezseg updates. Specifically, the function get_existing_mask_types() is run per FOV to detect any masks that may exist for that image, so when processing fov1 it returns the "mask types": ['whole_cell', 'nuclear', 'duplicate_whole_cell', 'duplicate_nuclear'].

After chatting with @bryjcannon, we think it would be best for the user to just specify which mask names to look for (defaulted to ['whole_cell'] for the cell segmentation notebook and an argument in the ezseg notebook) rather than automating something so simple.

Expected behavior Be able to generate a cell table no matter any odd FOV naming conventions.

To Reproduce Try to run the segmentation notebook with the specified FOV names.