genepattern / single_cell_clustering_notebook

BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

Updating requirements + Binder compatibility #20

Closed alex-wenzel closed 5 years ago

alex-wenzel commented 5 years ago

Need to update notebook requirements for binder to use right version of scanpy, etc.

edjuaro commented 5 years ago

This looks acceptable, do you want me to test the binder link? Github won't let me merge draft pull requests.

alex-wenzel commented 5 years ago

The Binder notebook loads now but the analysis has errors so there is still an incompatible library somewhere. I'll mark the PR as ready for review when I get the notebook to run all the way through on Binder.

edjuaro commented 5 years ago

I get a ValueError on the first step with the widget code. Not sure if that is something we can address.

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/srv/conda/lib/python3.6/site-packages/ipywidgets/widgets/interaction.py in observer(change)
     72         with out:
     73             clear_output(wait=True)
---> 74             f(**kwargs)
     75             show_inline_matplotlib_plots()
     76     for k,w in controls.items():

~/singlecell.py in plot_fig1(a, b, c)
    599                     ax_1.tick_params(labelsize=14)
    600                     if max(values) >= 1000:
--> 601                         ax_1.tick_params(labelrotation=-45)
    602                     plt.setp(ax_1.get_xticklines(), visible=False)
    603                     plt.setp(ax_1.get_yticklines(), visible=False)

/srv/conda/lib/python3.6/site-packages/matplotlib/axes/_base.py in tick_params(self, axis, **kwargs)
   2725             xkw.pop('labelleft', None)
   2726             xkw.pop('labelright', None)
-> 2727             self.xaxis.set_tick_params(**xkw)
   2728         if axis in ['y', 'both']:
   2729             ykw = dict(kwargs)

/srv/conda/lib/python3.6/site-packages/matplotlib/axis.py in set_tick_params(self, which, reset, **kw)
    789         if which == 'minor' or which == 'both':
    790             dicts.append(self._minor_tick_kw)
--> 791         kwtrans = self._translate_tick_kw(kw, to_init_kw=True)
    792         for d in dicts:
    793             if reset:

/srv/conda/lib/python3.6/site-packages/matplotlib/axis.py in _translate_tick_kw(kw, to_init_kw)
    860                     raise ValueError(
    861                         "keyword %s is not recognized; valid keywords are %s"
--> 862                         % (key, kwkeys))
    863             kwtrans.update(kw)
    864         else:

ValueError: keyword labelrotation is not recognized; valid keywords are ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop']
edjuaro commented 5 years ago

It now works. Perhaps I was somehow launching it from the wrong branch.