angelolab / ark-analysis

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

"Unassigned" label not included in "population_cell_mask.csv" for Mantis #1141

Open cliu72 opened 1 month ago

cliu72 commented 1 month ago

Describe the bug When "population_cell_mask.csv" is created in the Mantis directory, the unassigned cell ID is not included, which results in a cell population confusingly labelled as "Imported Selection #" after opening up the cell masks in Mantis (see screenshot below). I confirmed that these cells labelled as "Imported Selection #" are actually unassigned cells.

An "unassigned" cell population (cells that had no pixel clusters assigned in them) is correctly assigned to the cell masks and correctly assigned in the cell table, but it is missing in "population_cell_mask.csv", which is generated in plot_utils.create_mantis_dir.

Expected behavior Add a row to "population_cell_mask.csv" where the unassigned cell ID has the label "unassigned."

To Reproduce Can delete a few rows from cluster_counts_size_norm before training the SOM and open up the images in Mantis.

image