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

visium_hd() Error #217

Open
Demond-dev opened this issue Oct 3, 2024 · 1 comment
Open

visium_hd() Error #217

Demond-dev opened this issue Oct 3, 2024 · 1 comment

Comments

@Demond-dev
Copy link

The visium_hd function from spatialdata-io is currently returning an error importing the images from spaceranger output.

This is the error I am running into

File /data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:189, in RasterSchema.parse(cls, data, dims, transformations, scale_factors, method, chunks, **kwargs)
    [183](https://vscode-remote+ssh-002dremote-002bcn4247.vscode-resource.vscode-cdn.net/data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:183)         raise ValueError(
    [184](https://vscode-remote+ssh-002dremote-002bcn4247.vscode-resource.vscode-cdn.net/data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:184)             f"Cannot transpose arrays to match `dims`: {dims}.",
    [185](https://vscode-remote+ssh-002dremote-002bcn4247.vscode-resource.vscode-cdn.net/data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:185)             "Try to reshape `data` or `dims`.",
    [186](https://vscode-remote+ssh-002dremote-002bcn4247.vscode-resource.vscode-cdn.net/data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:186)         ) from e
    [188](https://vscode-remote+ssh-002dremote-002bcn4247.vscode-resource.vscode-cdn.net/data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:188) # finally convert to spatial image
--> [189](https://vscode-remote+ssh-002dremote-002bcn4247.vscode-resource.vscode-cdn.net/data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:189) data = to_spatial_image(array_like=data, dims=cls.dims.dims, **kwargs)
    [190](https://vscode-remote+ssh-002dremote-002bcn4247.vscode-resource.vscode-cdn.net/data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:190) # parse transformations
    [191](https://vscode-remote+ssh-002dremote-002bcn4247.vscode-resource.vscode-cdn.net/data/williamsd7/conda/envs/spatialstuff/lib/python3.12/site-packages/spatialdata/models/models.py:191) _parse_transformations(data, transformations)

TypeError: to_spatial_image() got an unexpected keyword argument 'rgb'
 
@LucaMarconato
Copy link
Member

The argument rgb in spatial_image.to_spatial_image() has been added in spatial-image==1.1.0. I will bump up the spatialdata requirement of spatialdata-io so at the next version the install will be automatic.

In your case please install the spatial-image==1.1.0 (available both in conda and pip).

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

No branches or pull requests

2 participants