You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to annotate some points in a meshwork (specifically, places where edits have occurred) using add_annotation. I am getting an error that is taking me a bit to work though - at the end of the day I suspect that there is some schema for what the annotation data frames should look like that I'm not aware of? Is there any documentation on this that I'm missing?
For instance, can the points be arbitrary, or do they need to map onto a particular node in the mesh/skeleton? Do x,y,z positions need to follow a particular format?
Traceback (most recent call last):
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/experiments/anno_mwe.py", line 39, in <module>
meshwork.add_annotations("splits", splits)
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/.venv/lib/python3.11/site-packages/meshparty/meshwork/meshwork.py", line 754, in add_annotationsself._anno.add_annotations(
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/.venv/lib/python3.11/site-packages/meshparty/meshwork/meshwork.py", line 168, in add_annotationsself._data_tables[name] = AnchoredAnnotation(
^^^^^^^^^^^^^^^^^^^
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/.venv/lib/python3.11/site-packages/meshparty/meshwork/meshwork.py", line 295, in __init__self._anchor_points(mesh)
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/.venv/lib/python3.11/site-packages/meshparty/meshwork/meshwork.py", line 404, in _anchor_pointsself._data[self._index_column_filt] = minds_filt
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/.venv/lib/python3.11/site-packages/pandas/core/frame.py", line 4094, in __setitem__self._set_item(key, value)
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/.venv/lib/python3.11/site-packages/pandas/core/frame.py", line 4303, in _set_item
value, refs =self._sanitize_column(value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/.venv/lib/python3.11/site-packages/pandas/core/frame.py", line 5042, in _sanitize_column
com.require_length_match(value, self.index)
File "/Users/bpedigo/aibs-code/cave-explorer/cave-explorer/.venv/lib/python3.11/site-packages/pandas/core/common.py", line 561, in require_length_matchraiseValueError(
ValueError: Length of values (0) does not match length of index (19)
The text was updated successfully, but these errors were encountered:
Problem
I'm trying to annotate some points in a meshwork (specifically, places where edits have occurred) using
add_annotation
. I am getting an error that is taking me a bit to work though - at the end of the day I suspect that there is some schema for what the annotation data frames should look like that I'm not aware of? Is there any documentation on this that I'm missing?For instance, can the points be arbitrary, or do they need to map onto a particular node in the mesh/skeleton? Do x,y,z positions need to follow a particular format?
Minimal working example
(requires pcg_skel)
The text was updated successfully, but these errors were encountered: