Description
Sorry for the continuous questions, and I'm really at the beginning stage of spatial transcriptomics.
I aligned my confocal image (Z-stack OME TIFF file) with the Xenium dataset in Xenium Explorer. I downloaded the matrix.csv from Xenium Explorer.
Please let me know if I need provide more information
I use this tutorial for alignment. https://github.com/quentinblampey/spatialdata_xenium_explorer/blob/master/docs/10x_tutorials/xenium/xenium_tuto.ipynb
However, I got the issue at this step.
alignment_matrix_path = "../C1-blank-section1-ant2-SOAR40x_alignment_files/matrix.csv"
confocal_path = "../C1-blank-section1-ant2-SORA40x.ome.tif"
image = xenium_aligned_image(confocal_path, alignment_matrix_path)
AssertionError Traceback (most recent call last)
Cell In[14], line 6
3 alignment_matrix_path = "../C1-blank-section1-ant2-SOAR40x_alignment_files/matrix.csv"
4 confocal_path = "../C1-blank-section1-ant2-SORA40x.ome.tif"
----> 6 image = xenium_aligned_image(confocal_path, alignment_matrix_path)
7 sdata.add_image(image_name, image)
8 sdata
File d:\Yifan_Wang\Software\envs\SP\lib\site-packages\spatialdata_io\readers\xenium.py:595, in xenium_aligned_image(image_path, alignment_file, imread_kwargs, image_models_kwargs)
593 else:
594 assert len(image.shape) == 3
--> 595 assert image.shape[0] in [3, 4]
596 if image.shape[0] == 4:
597 # as explained before in _get_images(), we need to add a dummy channel until we support 4-channel images as
598 # non-RGBA images in napari
599 image = da.concatenate([image, da.zeros_like(image[0:1])], axis=0)
AssertionError:---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Cell In[14], line 6
3 alignment_matrix_path = "../C1-blank-section1-ant2-SOAR40x_alignment_files/matrix.csv"
4 confocal_path = "../C1-blank-section1-ant2-SORA40x.ome.tif"
----> 6 image = xenium_aligned_image(confocal_path, alignment_matrix_path)
7 sdata.add_image(image_name, image)
8 sdata
File d:\Yifan_Wang\Software\envs\SP\lib\site-packages\spatialdata_io\readers\xenium.py:595, in xenium_aligned_image(image_path, alignment_file, imread_kwargs, image_models_kwargs)
593 else:
594 assert len(image.shape) == 3
--> 595 assert image.shape[0] in [3, 4]
596 if image.shape[0] == 4:
597 # as explained before in _get_images(), we need to add a dummy channel until we support 4-channel images as
598 # non-RGBA images in napari
599 image = da.concatenate([image, da.zeros_like(image[0:1])], axis=0)
AssertionError: