-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
There was a minor change in how ngio writes masking ROI tables & maybe other ROI tables: The label column now is the index column of obs, not a column in the obs dataframe itself. Different tools like the masking functionality used in the Cellpose task rely on a column "label" being present in the obs dataframe.
For one of @nrepina 's tasks, we could work around this by changing the masked wrapper code here (
| if column_name not in ROI_table.obs.columns: |
# Check that ROI_table.obs has the right column and extract label_value
if column_name not in ROI_table.obs.columns:
if ROI_table.obs.index.name == column_name:
# Workaround for new ngio table
ROI_table.obs[column_name] = ROI_table.obs.index
else:
raise ValueError(
f"In _preprocess_input, {column_name=} "
f" missing in {ROI_table.obs.columns=}"
)
label_value = int(float(ROI_table.obs[column_name].iloc[ROI_positional_index]))
We should review whether it's simple to add this workaround to different places where this could occur to ensure our tasks keep working with the new ngio ROI tables without requiring an overall update to ngio yey.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done