Hi,
probably also a spec issue, but I run into this inconsistency when using MoBIE-Python.
I have a segmentation source
I transform it -> sourceNamesAfterTransform new source name
I transform it another time differently -> sourceNamesAfterTransform yet another source name
I like to show these segmentations together
The table data of the two displayed segmentations should stay the same as for the original segmentation source. Now, I run into the problem, that the "new" segmentationDisplays do no longer point to the original table, so the view is not displayed and also validation fails (as expected) with :
ValueError: The table source MSB30_4_derivedsourceblabla is not present in the source metadata.
I thought of just pointing it to the original table but then I am back to:
File "..../mobie-utils-python/mobie/metadata/view_metadata.py", line 347, in get_view
assert display_setting["segmentationDisplay"]["name"] == name,\
AssertionError: MSB30_4_spotIDs, MSB30_4_spotIDs_tp_44-to-48
that the names no longer match.
Now, the only solution/workaround I see at the moment is duplicating the tables and creating a new directory for each segmentationDisplay. This can easily become a pain with dozens if not hundreds of duplicate directories.
Also, if something changes in the original table, ideally all derived tables or segmentationDisplays should update accordingly.
So I think we need a thorough re-think of how to deal with these "transient" or "virtual" sources created within a view with sourceNamesAfterTransform.
Or we need to allow linking to another default table for a segmentationDisplay ( and modify these checks in get_view).
Hi Martin,
I think I understand the issue and indeed that might be a corner case that is not supported in the python code (and maybe also not in the spec) yet. I will try to have a closer look at this later, but as this is quite complex it would help a lot to have a minimal reproducible example.
"twoseg_fromMoBIE": validates correctly in Python, but is not displayed correctly in the viewer (duplicate view name -> transformation not applied to only one source)
"twoseg_sourcenames" displays correctly in the viewer. Validation fails
File "/g/emcf/schorb/code/mobie-utils-python/mobie/validation/utils.py", line 72, in _assert_true
raise ValueError(msg)
ValueError: The table source transformedseg is not present in the source metadata.
Activity
constantinpape commented on May 17, 2023
Hi Martin,
I think I understand the issue and indeed that might be a corner case that is not supported in the python code (and maybe also not in the spec) yet. I will try to have a closer look at this later, but as this is quite complex it would help a lot to have a minimal reproducible example.
martinschorb commented on May 22, 2023
The following procedure generates a view that cannot be reproduced in mobie:
This view "twoseg_fromMoBIE" shows both segmentations at the same position, because the transform has no sourceNamesAfterTransform.
When I manually add the sourceNamesAfterTransform ("twoseg_sourcenames"), I run into the table issue.
The project can be found in
/g/emcf/schorb/data/sourcenames
martinschorb commented on May 22, 2023
File "/g/emcf/schorb/code/mobie-utils-python/mobie/validation/utils.py", line 72, in _assert_true raise ValueError(msg) ValueError: The table source transformedseg is not present in the source metadata.