Skip to content

Commit

Permalink
Merge pull request #133 from pinellolab/stream_v1.1
Browse files Browse the repository at this point in the history
Update stream to v1.1
  • Loading branch information
huidongchen authored Dec 17, 2021
2 parents b52f6e8 + f7fb194 commit d20cc1f
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@

<!-- [![Build Status](https://travis-ci.org/pinellolab/STREAM.svg)](https://travis-ci.org/pinellolab/STREAM) -->

[![CI](https://github.com/pinellolab/stream/actions/workflows/python-package-conda.yml/badge.svg)](https://github.com/pinellolab/simba/actions/workflows/python-package-conda.yml)
[![CI](https://github.com/pinellolab/STREAM/actions/workflows/python-package-conda.yml/badge.svg)](https://github.com/pinellolab/STREAM/actions/workflows/python-package-conda.yml)

# STREAM (Latest version v1.0)
# STREAM (Latest version v1.1)

Latest News
-----------
> Dec 17, 2021
Version 1.1 is now available.
1) fixed incompatible issues related to the latest version of `pandas`
2) fixed plotting issues related to the latest version of `matplotlib` and `seaborn`

> Jun 1, 2020
Version 1.0 is now available. The v1.0 has added a lot of new functionality:
Expand Down
19 changes: 11 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,26 @@
raise RuntimeError('STREAM requires Python 3')


#No dependency packages are specified in setup.py file
#STREAM is built based on bioconda recipe. All the required packages can be found in the recipe file
#https://github.com/bioconda/bioconda-recipes/tree/master/recipes/stream
# No dependency packages are specified in setup.py file
# STREAM is built based on bioconda recipe.
# All the required packages can be found in the recipe file
# https://github.com/bioconda/bioconda-recipes/tree/master/recipes/stream

setup(name='stream',
version=st.__version__,
description='Single-cell Trajectories Reconstruction, Exploration And Mapping of single-cell data',
description=('Single-cell Trajectories Reconstruction,'
' Exploration And Mapping of single-cell data'),
long_description=Path('README.md').read_text('utf-8'),
url='https://github.com/pinellolab/stream',
author='Huidong Chen',
author_email='huidong.chen AT mgh DOT harvard DOT edu',
license='AGPL-3',
packages=['stream'],
package_dir={'stream':'stream'},
package_dir={'stream': 'stream'},
package_data={'stream': ['tests/*']},
include_package_data = True,
include_package_data=True,
install_requires=[''],
entry_points = {'console_scripts': ['stream_run_test=stream.tests.stream_run_test:main']}
entry_points={
'console_scripts': [
'stream_run_test=stream.tests.stream_run_test:main']}
)

2 changes: 1 addition & 1 deletion stream/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .core import *

__version__ = "1.0"
__version__ = "1.1"
18 changes: 10 additions & 8 deletions stream/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,8 @@ def plot_qc(adata,
df_obs['log10_'+ann] = np.log10(df_obs[ann]+1)
ann = 'log10_'+ann
if(i in hist_plot):
sc_i1 = sns.distplot(df_obs[ann],vertical=True)
sc_i1 = sns.histplot(ax=ax_i, data=df_obs, y=ann)
# sc_i1 = sns.distplot(df_obs[ann],vertical=True)
ax_i.set_xticks([])
else:
sc_i1 = sns.violinplot(ax=ax_i,y=ann,data=df_obs,inner=None)
Expand All @@ -551,7 +552,8 @@ def plot_qc(adata,
df_var['log10_'+ann] = np.log10(df_var[ann]+1)
ann = 'log10_'+ann
if(i in hist_plot):
sc_i1 = sns.distplot(df_var[ann],vertical=True)
sc_i1 = sns.histplot(ax=ax_i, data=df_var, y=ann)
# sc_i1 = sns.distplot(df_var[ann],vertical=True)
ax_i.set_xticks([])
else:
sc_i1 = sns.violinplot(ax=ax_i,y=ann,data=df_var,inner=None)
Expand Down Expand Up @@ -1452,7 +1454,7 @@ def plot_dimension_reduction(adata,n_components = None,comp1=0,comp2=1,comp3=2,c
ax_i.scatter(df_plot_shuf['Dim'+str(comp1+1)], df_plot_shuf['Dim'+str(comp2+1)],df_plot_shuf['Dim'+str(comp3+1)],
c=colors_sns,alpha=alpha,linewidth=0,
zorder=-1)
ax_i.legend(legend_sns[1:],labels_sns[1:],bbox_to_anchor=(1.03, 0.5), loc='center left', ncol=fig_legend_ncol,
ax_i.legend(legend_sns,labels_sns,bbox_to_anchor=(1.08, 0.5), loc='center left', ncol=fig_legend_ncol,
frameon=False,)

else:
Expand All @@ -1464,7 +1466,7 @@ def plot_dimension_reduction(adata,n_components = None,comp1=0,comp2=1,comp3=2,c
df_plot_shuf['Dim'+str(comp3+1)],
c=df_plot_shuf[ann],vmin=vmin_i,vmax=vmax_i,alpha=alpha,linewidth=0,
zorder=-1)
cbar = plt.colorbar(sc_i,ax=ax_i, pad=0.04, fraction=0.05, aspect=30)
cbar = plt.colorbar(sc_i,ax=ax_i, pad=0.1, fraction=0.05, aspect=30)
cbar.solids.set_edgecolor("face")
cbar.ax.locator_params(nbins=5)
if(show_graph):
Expand Down Expand Up @@ -1505,7 +1507,7 @@ def plot_dimension_reduction(adata,n_components = None,comp1=0,comp2=1,comp3=2,c
else None
)
legend_handles, legend_labels = ax_i.get_legend_handles_labels()
ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:],
ax_i.legend(handles=legend_handles, labels=legend_labels,
bbox_to_anchor=(1, 0.5), loc='center left', ncol=fig_legend_ncol,
frameon=False,
)
Expand Down Expand Up @@ -2623,7 +2625,7 @@ def plot_flat_tree(adata,color=None,dist_scale=1,
if (ann+'_color' in adata.uns_keys()) and (set(adata.uns[ann+'_color'].keys()) >= set(np.unique(df_plot_shuf[ann]))) \
else None)
legend_handles, legend_labels = ax_i.get_legend_handles_labels()
ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:],
ax_i.legend(handles=legend_handles, labels=legend_labels,
bbox_to_anchor=(1, 0.5), loc='center left', ncol=fig_legend_ncol,
frameon=False,
)
Expand Down Expand Up @@ -2818,7 +2820,7 @@ def plot_visualization_2D(adata,method='umap',n_neighbors=50, nb_pct=None,perple
else None
)
legend_handles, legend_labels = ax_i.get_legend_handles_labels()
ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:],
ax_i.legend(handles=legend_handles, labels=legend_labels,
bbox_to_anchor=(1, 0.5), loc='center left', ncol=fig_legend_ncol,
frameon=False,
)
Expand Down Expand Up @@ -3008,7 +3010,7 @@ def plot_stream_sc(adata,root='S0',color=None,dist_scale=1,dist_pctl=95,preferen
else None
)
legend_handles, legend_labels = ax_i.get_legend_handles_labels()
ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:],
ax_i.legend(handles=legend_handles, labels=legend_labels,
bbox_to_anchor=(1, 0.5), loc='center left', ncol=fig_legend_ncol,
frameon=False,
)
Expand Down

0 comments on commit d20cc1f

Please sign in to comment.