fractal-analytics-platform / fractal-tasks-core

Main tasks for the Fractal analytics platform
https://fractal-analytics-platform.github.io/fractal-tasks-core/
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

Masking ROI tables should use the labels as index of the table as well #672

Open jluethi opened 3 months ago

jluethi commented 3 months ago

Masking ROI tables have an table.obs that contains a label column. That table does also have an index though and the index is 0-based. That makes for confusion e.g. in the ROI loader, when the name of a ROI (classically the index of .obs is used as the ROI names for other ROI tables) does not match the ROI label.

Easiest solution: Also make the index of that table the label value.

Current state:

>>> table.obs
   label
0      1
1      2
2      3
3      4
4      5
5      6
6      7
7      8
8      9
9     10
10    11

Target: Index & label column match