Skip to content

Commit d20cc1f

Browse files
authored
Merge pull request #133 from pinellolab/stream_v1.1
Update stream to v1.1
2 parents b52f6e8 + f7fb194 commit d20cc1f

File tree

4 files changed

+30
-19
lines changed

4 files changed

+30
-19
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,18 @@
22

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

5-
[![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)
5+
[![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)
66

7-
# STREAM (Latest version v1.0)
7+
# STREAM (Latest version v1.1)
88

99
Latest News
1010
-----------
11+
> Dec 17, 2021
12+
13+
Version 1.1 is now available.
14+
1) fixed incompatible issues related to the latest version of `pandas`
15+
2) fixed plotting issues related to the latest version of `matplotlib` and `seaborn`
16+
1117
> Jun 1, 2020
1218
1319
Version 1.0 is now available. The v1.0 has added a lot of new functionality:

setup.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,26 @@
99
raise RuntimeError('STREAM requires Python 3')
1010

1111

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

1617
setup(name='stream',
1718
version=st.__version__,
18-
description='Single-cell Trajectories Reconstruction, Exploration And Mapping of single-cell data',
19+
description=('Single-cell Trajectories Reconstruction,'
20+
' Exploration And Mapping of single-cell data'),
1921
long_description=Path('README.md').read_text('utf-8'),
2022
url='https://github.com/pinellolab/stream',
2123
author='Huidong Chen',
2224
author_email='huidong.chen AT mgh DOT harvard DOT edu',
2325
license='AGPL-3',
2426
packages=['stream'],
25-
package_dir={'stream':'stream'},
27+
package_dir={'stream': 'stream'},
2628
package_data={'stream': ['tests/*']},
27-
include_package_data = True,
29+
include_package_data=True,
2830
install_requires=[''],
29-
entry_points = {'console_scripts': ['stream_run_test=stream.tests.stream_run_test:main']}
31+
entry_points={
32+
'console_scripts': [
33+
'stream_run_test=stream.tests.stream_run_test:main']}
3034
)
31-

stream/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .core import *
22

3-
__version__ = "1.0"
3+
__version__ = "1.1"

stream/core.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,8 @@ def plot_qc(adata,
539539
df_obs['log10_'+ann] = np.log10(df_obs[ann]+1)
540540
ann = 'log10_'+ann
541541
if(i in hist_plot):
542-
sc_i1 = sns.distplot(df_obs[ann],vertical=True)
542+
sc_i1 = sns.histplot(ax=ax_i, data=df_obs, y=ann)
543+
# sc_i1 = sns.distplot(df_obs[ann],vertical=True)
543544
ax_i.set_xticks([])
544545
else:
545546
sc_i1 = sns.violinplot(ax=ax_i,y=ann,data=df_obs,inner=None)
@@ -551,7 +552,8 @@ def plot_qc(adata,
551552
df_var['log10_'+ann] = np.log10(df_var[ann]+1)
552553
ann = 'log10_'+ann
553554
if(i in hist_plot):
554-
sc_i1 = sns.distplot(df_var[ann],vertical=True)
555+
sc_i1 = sns.histplot(ax=ax_i, data=df_var, y=ann)
556+
# sc_i1 = sns.distplot(df_var[ann],vertical=True)
555557
ax_i.set_xticks([])
556558
else:
557559
sc_i1 = sns.violinplot(ax=ax_i,y=ann,data=df_var,inner=None)
@@ -1452,7 +1454,7 @@ def plot_dimension_reduction(adata,n_components = None,comp1=0,comp2=1,comp3=2,c
14521454
ax_i.scatter(df_plot_shuf['Dim'+str(comp1+1)], df_plot_shuf['Dim'+str(comp2+1)],df_plot_shuf['Dim'+str(comp3+1)],
14531455
c=colors_sns,alpha=alpha,linewidth=0,
14541456
zorder=-1)
1455-
ax_i.legend(legend_sns[1:],labels_sns[1:],bbox_to_anchor=(1.03, 0.5), loc='center left', ncol=fig_legend_ncol,
1457+
ax_i.legend(legend_sns,labels_sns,bbox_to_anchor=(1.08, 0.5), loc='center left', ncol=fig_legend_ncol,
14561458
frameon=False,)
14571459

14581460
else:
@@ -1464,7 +1466,7 @@ def plot_dimension_reduction(adata,n_components = None,comp1=0,comp2=1,comp3=2,c
14641466
df_plot_shuf['Dim'+str(comp3+1)],
14651467
c=df_plot_shuf[ann],vmin=vmin_i,vmax=vmax_i,alpha=alpha,linewidth=0,
14661468
zorder=-1)
1467-
cbar = plt.colorbar(sc_i,ax=ax_i, pad=0.04, fraction=0.05, aspect=30)
1469+
cbar = plt.colorbar(sc_i,ax=ax_i, pad=0.1, fraction=0.05, aspect=30)
14681470
cbar.solids.set_edgecolor("face")
14691471
cbar.ax.locator_params(nbins=5)
14701472
if(show_graph):
@@ -1505,7 +1507,7 @@ def plot_dimension_reduction(adata,n_components = None,comp1=0,comp2=1,comp3=2,c
15051507
else None
15061508
)
15071509
legend_handles, legend_labels = ax_i.get_legend_handles_labels()
1508-
ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:],
1510+
ax_i.legend(handles=legend_handles, labels=legend_labels,
15091511
bbox_to_anchor=(1, 0.5), loc='center left', ncol=fig_legend_ncol,
15101512
frameon=False,
15111513
)
@@ -2623,7 +2625,7 @@ def plot_flat_tree(adata,color=None,dist_scale=1,
26232625
if (ann+'_color' in adata.uns_keys()) and (set(adata.uns[ann+'_color'].keys()) >= set(np.unique(df_plot_shuf[ann]))) \
26242626
else None)
26252627
legend_handles, legend_labels = ax_i.get_legend_handles_labels()
2626-
ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:],
2628+
ax_i.legend(handles=legend_handles, labels=legend_labels,
26272629
bbox_to_anchor=(1, 0.5), loc='center left', ncol=fig_legend_ncol,
26282630
frameon=False,
26292631
)
@@ -2818,7 +2820,7 @@ def plot_visualization_2D(adata,method='umap',n_neighbors=50, nb_pct=None,perple
28182820
else None
28192821
)
28202822
legend_handles, legend_labels = ax_i.get_legend_handles_labels()
2821-
ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:],
2823+
ax_i.legend(handles=legend_handles, labels=legend_labels,
28222824
bbox_to_anchor=(1, 0.5), loc='center left', ncol=fig_legend_ncol,
28232825
frameon=False,
28242826
)
@@ -3008,7 +3010,7 @@ def plot_stream_sc(adata,root='S0',color=None,dist_scale=1,dist_pctl=95,preferen
30083010
else None
30093011
)
30103012
legend_handles, legend_labels = ax_i.get_legend_handles_labels()
3011-
ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:],
3013+
ax_i.legend(handles=legend_handles, labels=legend_labels,
30123014
bbox_to_anchor=(1, 0.5), loc='center left', ncol=fig_legend_ncol,
30133015
frameon=False,
30143016
)

0 commit comments

Comments
 (0)