Skip to content

Commit

Permalink
Merge pull request #184 from zhanghao-njmu/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
zhanghao-njmu authored Oct 23, 2023
2 parents 40fe0cd + f1abf54 commit 5c5e3e6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions inst/python/SCP_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 5c5e3e6

Please sign in to comment.