arzwa / wgd

Python package and CLI for whole-genome duplication related analyses. This package is deprecated in favor of https://github.com/heche-psb/wgd.
http://wgd.readthedocs.io/en/latest/
GNU General Public License v3.0
81 stars 41 forks source link

wgd viz error #32

Closed ShenChen-bioUtopia closed 4 years ago

ShenChen-bioUtopia commented 4 years ago

Hi, Sorry for disturbing you. The wgd is a good tool for wgd analysis. However, I was puzzled with an error of wgd viz.

$ wgd viz -i -ks cds.cpa.fasta.ks.tsv,cds.mtr.fasta.ks.tsv 
BokehDeprecationWarning: 'WidgetBox' is deprecated and will be removed in Bokeh 3.0, use 'bokeh.models.Column' instead
[0]
/public-supool/home/shenchen/.local/lib/python3.6/site-packages/bokeh/models/plots.py:764: UserWarning: 
You are attempting to set `plot.legend.items` on a plot that has zero legends added, this will have no effect.

Before legend properties can be set, you must add a Legend explicitly, or call a glyph method with a legend parameter set.

  warnings.warn(_LEGEND_EMPTY_WARNING % attr)
BokehDeprecationWarning: 'legend' keyword is deprecated, use explicit 'legend_label', 'legend_field', or 'legend_group' keywords instead
BokehDeprecationWarning: 'legend' keyword is deprecated, use explicit 'legend_label', 'legend_field', or 'legend_group' keywords instead
Traceback (most recent call last):
  File "/public-supool/home/shenchen/.local/bin/wgd", line 11, in <module>
    load_entry_point('wgd==1.1', 'console_scripts', 'wgd')()
  File "/public-supool/home/shenchen/.local/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/public-supool/home/shenchen/.local/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/public-supool/home/shenchen/.local/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/public-supool/home/shenchen/.local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/public-supool/home/shenchen/.local/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/public-supool/home/shenchen/.local/lib/python3.6/site-packages/wgd_cli.py", line 1265, in viz
    output_file, filters, ks_range, bins, interactive, weighted
  File "/public-supool/home/shenchen/.local/lib/python3.6/site-packages/wgd_cli.py", line 1329, in viz_
    histogram_bokeh(dists_files, labels)
  File "/public-supool/home/shenchen/.local/lib/python3.6/site-packages/wgd/viz.py", line 623, in histogram_bokeh
    session.loop_until_closed()  # run forever
AttributeError: 'ClientSession' object has no attribute 'loop_until_closed'

My computer skill is poor, so I hope you can tell me what should I do ? Thank you very much!

arzwa commented 4 years ago

Hi, I believe this is due to a new version of the bokeh python package. For me the bokeh application still works with bokeh v1.4.0 but I get the deprecation warning:

BokehDeprecationWarning: ClientSession.loop_until_closed is deprecated, and will be removed in an eventual 2.0 release. Run Bokeh applications directly on a Bokeh server instead. See:

so I guess you are using a bokeh version > 2.0. I should update the wgd viz app to the new bokeh version but in the meantime you can reinstall wgd using the latest commit from the master branch where I fixed the bokeh dependency to 1.4.0.