CAMI-challenge / OPAL

OPAL: Open-community Profiling Assessment tooL
https://cami-challenge.github.io/OPAL/
Apache License 2.0
25 stars 6 forks source link

AttributeError: unexpected attribute 'callback' to Slider, similar attributes are js_event_callbacks #47

Closed zhang570221322 closed 2 years ago

zhang570221322 commented 2 years ago

When I run the Example:

To run the example, please download the files given in the data directory.

python3 opal.py -g data/goldstandard_low_1.bin \ data/cranky_wozniak_13 \ data/grave_wright_13 \ data/furious_elion_13 \ data/focused_archimedes_13 \ data/evil_darwin_13 \ data/agitated_blackwell_7 \ data/jolly_pasteur_3 \ -l "TIPP, Quikr, MP2.0, MetaPhyler, mOTU, CLARK, FOCUS" \ -o output_dir

It occurs the error. The stack of errors is as follows:

Traceback (most recent call last):
  File "opal.py", line 454, in <module>
    main()
  File "opal.py", line 447, in main
    html.create_html(pd_rankings, ranks_scored, pd_metrics, labels, sample_ids_list, plots_list, output_dir, args.desc)
  File "/data/home/wlzhang/classfication/software/statistics/OPAL/src/html_opal.py", line 513, in create_html
    col_rankings = create_rankings_html(pd_rankings, ranks_scored, labels)
  File "/data/home/wlzhang/classfication/software/statistics/OPAL/src/html_opal.py", line 162, in create_rankings_html
    weight_recall = Slider(start=0, end=10, value=1, step=.1, title=c.RECALL + " weight", callback=callback)
  File "/data/home/wlzhang/anaconda3/envs/mzduan/lib/python3.6/site-packages/bokeh/models/widgets/sliders.py", line 76, in __init__
    super().__init__(**kwargs)
  File "/data/home/wlzhang/anaconda3/envs/mzduan/lib/python3.6/site-packages/bokeh/model.py", line 236, in __init__
    super().__init__(**kwargs)
  File "/data/home/wlzhang/anaconda3/envs/mzduan/lib/python3.6/site-packages/bokeh/core/has_props.py", line 269, in __init__
    setattr(self, name, value)
  File "/data/home/wlzhang/anaconda3/envs/mzduan/lib/python3.6/site-packages/bokeh/core/has_props.py", line 306, in __setattr__
    (name, self.__class__.__name__, text, nice_join(matches)))
AttributeError: unexpected attribute 'callback' to Slider, similar attributes are js_event_callbacks
zhang570221322 commented 2 years ago

is it my bokeh version problem? my bokeh version is 2.3.3

zhang570221322 commented 2 years ago

I reinstall the dependencies. But I find the many version error:

numpy==1.21.4 h5py==3.4.0 pandas==1.3.4 scikit-bio==0.5.6 so I install them by default version Then it occurs :

Traceback (most recent call last):
  File "opal.py", line 454, in <module>
    main()
  File "opal.py", line 447, in main
    html.create_html(pd_rankings, ranks_scored, pd_metrics, labels, sample_ids_list, plots_list, output_dir, args.desc)
  File "/data/home/wlzhang/classfication/software/statistics/OPAL/src/html_opal.py", line 517, in create_html
    select_sample, select_rank, heatmap_legend_div, mytable1 = create_metrics_table(pd_metrics, labels, sample_ids_list)
  File "/data/home/wlzhang/classfication/software/statistics/OPAL/src/html_opal.py", line 386, in create_metrics_table
    html += mydf_metrics.style.apply(get_heatmap_colors, df_metrics=mydf_metrics, axis=1).format(precision=3).set_table_styles(this_style).render()
TypeError: format() got an unexpected keyword argument 'precision'
fernandomeyer commented 2 years ago

bokeh==0.13.0 is required to generate the html output. Unfortunately newer versions are not fully compatible and require partial rewriting of the code, which I plan to do in the future. The recommended library versions are in requirements/default.txt.

Some libraries have been upgraded and tested in dev, but the bokeh version is still the same.

zhang570221322 commented 2 years ago

Thanks