We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 560cca0 commit db0bed8Copy full SHA for db0bed8
fractal_tasks_core/masked_loading.py
@@ -105,10 +105,14 @@ def _preprocess_input(
105
106
# Check that ROI_table.obs has the right column and extract label_value
107
if column_name not in ROI_table.obs.columns:
108
- raise ValueError(
109
- 'In _preprocess_input, "{column_name}" '
110
- f" missing in {ROI_table.obs.columns=}"
111
- )
+ if ROI_table.obs.index.name == column_name:
+ # Workaround for new ngio table
+ ROI_table.obs[column_name] = ROI_table.obs.index
+ else:
112
+ raise ValueError(
113
+ f"In _preprocess_input, {column_name=} "
114
+ f" missing in {ROI_table.obs.columns=}"
115
+ )
116
label_value = int(
117
float(ROI_table.obs[column_name].iloc[ROI_positional_index])
118
)
0 commit comments