Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read Vizgen Cell Metadata not compatible with updated formats #647

Closed
cornhundred opened this issue Feb 22, 2023 · 0 comments · Fixed by #648
Closed

Read Vizgen Cell Metadata not compatible with updated formats #647

cornhundred opened this issue Feb 22, 2023 · 0 comments · Fixed by #648
Assignees

Comments

@cornhundred
Copy link
Contributor

cornhundred commented Feb 22, 2023

Description

The read.vizgen method is not compatible with an update to the cell metadata format from Vizgen (see https://vizgen.github.io/vizgen-postprocessing/output_data_formats/entity_metadata_format.html)

...

Minimal reproducible example

>>> adata = sq.read.vizgen('Mouse_Brain_Showcase/', counts_file = 'cell_by_gene.csv', meta_file = 'cell_metadata.csv')

Traceback

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File ".../Documents/squidpy/squidpy/read/_read.py", line 162, in vizgen
    coords.columns = ["fov", "volume", "center_x", "center_y", "min_x", "max_x", "min_y", "max_y"]
  File ".../anaconda3/envs/squidpy_contribute/lib/python3.9/site-packages/pandas/core/generic.py", line 5915, in __setattr__
    return object.__setattr__(self, name, value)
  File "pandas/_libs/properties.pyx", line 69, in pandas._libs.properties.AxisProperty.__set__
  File ".../anaconda3/envs/squidpy_contribute/lib/python3.9/site-packages/pandas/core/generic.py", line 823, in _set_axis
    self._mgr.set_axis(axis, labels)
  File ".../anaconda3/envs/squidpy_contribute/lib/python3.9/site-packages/pandas/core/internals/managers.py", line 230, in set_axis
    self._validate_set_axis(axis, new_labels)
  File ".../anaconda3/envs/squidpy_contribute/lib/python3.9/site-packages/pandas/core/internals/base.py", line 70, in _validate_set_axis
    raise ValueError(
ValueError: Length mismatch: Expected axis has 12 elements, new values have 8 elements

...

Version

>>> sq.__version__
'1.2.3'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants