Closed sycdegh closed 6 months ago
It failed to change the new color array. We will try to fix it.
You can delete the color array before the st.tl.clustering.louvain
(every time you run this) by:
del data.uns['louvain_colors']
or you you can use scanpy to plot
sc.pl.spatial(data, color='louvain')
Thanks for your reply, and it works.
At 2023-12-28 19:40:52, "Duy Pham" @.***> wrote:
It failed to change the new color array. We will try to fix it. You can delete the color array before the st.tl.clustering.louvain (every time you run this) by:
del data.uns['louvain_colors']
or you you can use scanpy to plot
sc.pl.spatial(data, color='louvain')
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Dear developer, Thanks for your wonderful jobs! I got an error wtih the trying of "st.pl.cluster_plot" and "spatila trajectory" fuction. Before this, I apply stSME spatial-PCA option using the following code: st.spatial.morphology.adjust(data,use_data="X_pca",radius=50,method="mean") st.pp.neighbors(data,n_neighbors=25,use_rep='X_pca_morphology',random_state=0) st.tl.clustering.louvain(data,random_state=0). It works and get 9 clusters to plot. But I want more clusters for detail trajectory. So I modified the resolution: st.spatial.morphology.adjust(data,use_data="X_pca",radius=50,method="mean") st.pp.neighbors(data,n_neighbors=25,use_rep='X_pca_morphology',random_state=0) st.tl.clustering.louvain(data, resolution=1.2,random_state=0). At the resolution 1.2, I got more clusters but failed to plot. It reminds: the color of clusters list index out of range.
Thanks for your attention.