Skip to content

marker_quantification.process_lists() returning inappropriate mask_types #1103

@bryjcannon

Description

@bryjcannon

Describe the bug
Screenshot 2024-01-08 at 4 58 41 PM

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)
Screenshot 2024-01-08 at 4 59 03 PM

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions