-
Notifications
You must be signed in to change notification settings - Fork 29
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
error from minimalistic reading of xenium data #132
Comments
Hola! Well spotted 🥸 Fixed with https://github.com/scverse/spatialdata-io/releases/tag/v0.1.2, which also adds the parameter |
Thanks Luca! Sorry for opening again, there's another error still, which I can guess where's it from (i.e., not reading cell boundaries) but leave it here:
|
Got back to this today. I have tried to replicate with the same argument but that line doesn't give me an error. I think the bug is now solved. If you encounter it please feel free to reopen; in such a case please detail a link to a public dataset that can be used to replicate the bug, and to the code used to call the |
Hi, I keep getting this error : ---------------------------------------------------------------------------TypeError Traceback (most recent call last) File /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages/spatialdata_io/_utils.py:46, in deprecation_alias..deprecation_decorator..wrapper(*args, **kwargs) 44 class_name = f.qualname 45 rename_kwargs(f.name, kwargs, aliases, class_name)---> 46 return f(*args, **kwargs) File /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages/spatialdata_io/readers/xenium.py:334, in xenium(path, cells_boundaries, nucleus_boundaries, cells_as_circles, cells_labels, nucleus_labels, transcripts, morphology_mip, morphology_focus, aligned_images, cells_table, n_jobs, imread_kwargs, image_models_kwargs, labels_models_kwargs) 330 assert ( 331 "c_coords" not in image_models_kwargs 332 ), "The channel names for the morphology focus images are handled internally" 333 image_models_kwargs["c_coords"] = list(channel_names.values())--> 334 images["morphology_focus"] = _get_images( 335 morphology_focus_dir, 336 XeniumKeys.MORPHOLOGY_FOCUS_CHANNEL_IMAGE.format(0), 337 imread_kwargs, 338 image_models_kwargs, 339 ) 340 del image_models_kwargs["c_coords"] 341 logger.removeFilter(IgnoreSpecificMessage()) File /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages/spatialdata_io/readers/xenium.py:564, in _get_images(path, file, imread_kwargs, image_models_kwargs) 558 if "c_coords" in image_models_kwargs and "dummy" in image_models_kwargs["c_coords"]: 559 # Napari currently interprets 4 channel images as RGB; a series of PRs to fix this is almost ready but they will 560 # not be merged soon. 561 # Here, since the new data from the xenium analyzer version 2.0.0 gives 4-channel images that are not RGBA, 562 # let's add a dummy channel as a temporary workaround. 563 image = da.concatenate([image, da.zeros_like(image[0:1])], axis=0)--> 564 return Image2DModel.parse( 565 image, transformations={"global": Identity()}, dims=("c", "y", "x"), rgb=None, **image_models_kwargs 566 ) File /opt/homebrew/Caskroom/miniconda/base/lib/python3.11/site-packages/spatialdata/models/models.py:189, in RasterSchema.parse(cls, data, dims, transformations, scale_factors, method, chunks, **kwargs) 183 raise ValueError( 184 f"Cannot transpose arrays to match TypeError: to_spatial_image() got an unexpected keyword argument 'rgb' when I try to run this command : Parse Xenium dataprint("parsing the data... ", end="") Link to public dataset to reproduce this : I use the full bundle from that link: |
Hola! just updated both
spatialdata
andspatialdata-io
trying to read a generic xenium dataset with the following line, I get the error bellow:The text was updated successfully, but these errors were encountered: