diff --git a/inst/python/SCP_analysis.py b/inst/python/SCP_analysis.py index 56201f92..fa5d1ee5 100644 --- a/inst/python/SCP_analysis.py +++ b/inst/python/SCP_analysis.py @@ -278,16 +278,15 @@ def SCVELO(adata=None, h5ad=None, group_by=None, palette=None, adata.uns["rank_"+vkey+"_genescores"]=df2 del adata.uns["rank_dynamical_genes"] - for cluster in df.columns: - #df[0:1].values.ravel()[:12] ### by row - scv.pl.scatter(adata, color=group_by,palette=palette, basis=df[cluster].values[:top_n],vkey=vkey, size=10, linewidth=2, alpha=1, ylabel="cluster: "+cluster+"\nunspliced", - add_linfit=True, add_rug=True, add_outline=True, ncols=3, frameon=True, save=False, show=False) + for cluster in df1.columns: + #df1[0:1].values.ravel()[:12] ### by row + scv.pl.scatter(adata, color=group_by,palette=palette, basis=df1[cluster].values[:top_n],vkey=vkey, size=10, linewidth=2, alpha=1, ylabel="cluster: "+cluster+"\nunspliced", if show_plot is True: plt.show() if save: plt.savefig('.'.join(filter(None, [fileprefix, cluster, vkey+"_genes1.png"])), dpi=dpi) - scv.pl.velocity(adata, color=group_by, var_names=df[cluster].values[:top_n],vkey=vkey, size=10, linewidth=2, alpha=1, ylabel="cluster: "+cluster+"\nunspliced", + scv.pl.velocity(adata, color=group_by, var_names=df1[cluster].values[:top_n],vkey=vkey, size=10, linewidth=2, alpha=1, ylabel="cluster: "+cluster+"\nunspliced", add_outline=True,basis=basis, color_map=["Blues", "YlOrRd"], ncols=2, save=False, show=False) if show_plot is True: plt.show()