В настоящее время я работаю с анализом пространственных данных, используя Scanpy и пытаюсь визуализировать мои данные, используя SC.PL.Patial Function. Тем не менее, я столкнулся с KeeError при попытке указать параметр Library_id как «изображения». Вот фрагмент кода, который я использую: < /p>
import matplotlib.pyplot as plt
import scanpy as sc
plt.rcParams["figure.figsize"] = (8, 8)
sc.pl.spatial(adata, img_key="hires", color=["total_counts", "n_genes_by_counts"], library_id='images')
< /code>
KeyError: 'images'
< /code>
I understand that this error occurs because the 'images' key is not found in the spatial data. However, I'm unsure why this key is missing or how to resolve this issue.
Here's what I've tried so far:
Checked the contents of adata.uns to confirm that 'images' is indeed present.
Verified that the data I'm working with contains spatial information and images.
Double-checked the documentation for sc.pl.spatial and adata.uns to ensure I'm using the correct parameters.
Could someone please help me understand why this KeyError is occurring and how I can resolve it? Any insights or suggestions would be greatly appreciated. Thank you!
Подробнее здесь: https://stackoverflow.com/questions/779 ... atial-data
KeyError при использовании sc.pl.patial в Scanpy: «Изображения» не найдены в пространственных данных ⇐ Python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Кластеризируйте людей на основе пространственных координат с ограничениями.
Anonymous » » в форуме Python - 0 Ответы
- 28 Просмотры
-
Последнее сообщение Anonymous
-