You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I used this next chunk of code to overlap the PAGA onto the UMAP. Hope this helps :)
# Define PAGA positions based on the UMAP layout -
# for each cluster we use the mean of the UMAP positions from the cells in that cluster
pos=pd.DataFrame(control_sce.obsm['X_umap'],index=control_sce.obs_names)
pos['group']=control_sce.obs[control_sce.uns['paga']['groups']]
pos=pos.groupby('group').mean()
# Plot UMAP in the background
ax=sc.pl.umap(control_sce,show=False, size=30, legend_loc='bottom',
legend_fontsize=15, legend_fontoutline=5, frameon=False, title='UMAP')
# Plot PAGA ontop of the UMAP
sc.pl.paga(control_sce, frameon=False, title='PAGA (Threshold = 0)', threshold=0,
node_size_scale=6, edge_width_scale=3, fontsize=12, fontoutline=5,
pos=pos.values, random_state=0, ax=ax, save='_umap-overlay_thr0.png')
I know there is a function 'sc.pl.paga_compare' but i wonder if i can overlay paga-trajectory result on umap.
Thank you!
The text was updated successfully, but these errors were encountered: