angelolab / ark-analysis

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

Generate_cell_table confuses foo1_nuclear and foo10_nuclear #1109

Closed g-torr closed 7 months ago

g-torr commented 8 months ago

Assume you have 2 segmented files called foo1_nuclear.tiff and foo10_nuclear.tiff

In the case fov_name=foo1, this line of code in marker_quantification.generate_cell_table mask_files = io_utils.list_files(segmentation_dir, substrs=fov_name) matches both files like foo1_nuclear and foo10_nuclear, creating subsequent confusion when the prefix is stripped in the line process_lists I suggest to use regex and do something like this: mask_files = io_utils.list_files(segmentation_dir, substrs=r''+fov_name+'_')#avoid matching both foo1 and foo10 files mask_types = process_lists(fov_names=[fov_name], mask_names=mask_files)

bryjcannon commented 7 months ago

Resolved by #1103