When trying to run segmentation, an error propped up where a mask file that didn't exist was being loaded for csv writing. After troubleshooting, the problem occurs in marker_quantification.process_lists code. In this example, while only file names with 'R6C1' were desired, files with R6C10' were also being extracted due to the way marker_quantification.process_lists matches substrings in file names. Similar to list_files issue in alpineer.
Expected behavior
marker_quantification.process_lists currently finds files using the code below based on a matching file prefix. Instead of returning "whole_cell" and "nuclear", the returned list is "_whole_cell", "0_whole_cell", etc.
To Reproduce
Ping me for access to my mask files.
Proposed solution:
Similar to the list_files and list_folders fix in alpineer, token matching will be used instead of string subsetting to find matching files (code pic below)
Describe the bug![Screenshot 2024-01-08 at 4 58 41 PM](https://github.com/angelolab/ark-analysis/assets/18650480/bd332376-5a46-4786-83d9-73378d57be18)
When trying to run segmentation, an error propped up where a mask file that didn't exist was being loaded for csv writing. After troubleshooting, the problem occurs in
marker_quantification.process_lists
code. In this example, while only file names with 'R6C1' were desired, files with R6C10' were also being extracted due to the waymarker_quantification.process_lists
matches substrings in file names. Similar to list_files issue in alpineer.Expected behavior
marker_quantification.process_lists
currently finds files using the code below based on a matching file prefix. Instead of returning "whole_cell" and "nuclear", the returned list is "_whole_cell", "0_whole_cell", etc.To Reproduce Ping me for access to my mask files.
Proposed solution: Similar to the list_files and list_folders fix in alpineer, token matching will be used instead of string subsetting to find matching files (code pic below)![Screenshot 2024-01-08 at 4 59 03 PM](https://github.com/angelolab/ark-analysis/assets/18650480/fd57fa9d-3059-4456-9d56-752147b49854)