The bioBakery help forum

Lefse-plot_res.py --> Traceback (most recent call last)

Hi to all

It’s been a busy day posting here for troubleshooting while running LEfSe!

I ran the following commands but didn’t manage to obtain a plot… I am trying hard to fix issues mentioned in the output of the 3rd command and I would be thankful if help me do so!

The file I used as input is attached below:
collapse.table_FGF.txt (21.3 KB)

$ lefse-format_input.py collapse.table_FGF.txt tax-otu-table-form.txt -c 1 -u 2 -o 1000000

$ run_lefse.py tax-otu-table-form.txt tax-otu-table-result.txt
Terminal output: Number of significantly discriminative features: 16 ( 16 ) before internal wilcoxon
Number of discriminative features with abs LDA score > 2.0 : 16

$ lefse-plot_res.py tax-otu-table-result.txt tax-otu-table-diffabund.pdf
Terminal output:
Traceback (most recent call last):
File “/home/bigen2/miniconda3/envs/lefse/bin/lefse-plot_res.py”, line 177, in
else: plot_histo_hor(params[‘output_file’],params,data,len(data[‘cls’]) == 2,params[‘report_features’])
File “/home/bigen2/miniconda3/envs/lefse/bin/lefse-plot_res.py”, line 70, in plot_histo_hor
ax = fig.add_subplot(111,frame_on=False,axis_bgcolor=params[‘back_color’])
File “/home/bigen2/miniconda3/envs/lefse/lib/python2.7/site-packages/matplotlib/figure.py”, line 1257, in add_subplot
a = subplot_class_factory(projection_class)(self, *args, **kwargs)
File “/home/bigen2/miniconda3/envs/lefse/lib/python2.7/site-packages/matplotlib/axes/_subplots.py”, line 77, in init
self._axes_class.init(self, fig, self.figbox, **kwargs)
File “/home/bigen2/miniconda3/envs/lefse/lib/python2.7/site-packages/matplotlib/axes/_base.py”, line 541, in init
self.update(kwargs)
File “/home/bigen2/miniconda3/envs/lefse/lib/python2.7/site-packages/matplotlib/artist.py”, line 888, in update
for k, v in props.items()]
File “/home/bigen2/miniconda3/envs/lefse/lib/python2.7/site-packages/matplotlib/artist.py”, line 881, in _update_property
raise AttributeError(‘Unknown property %s’ % k)
AttributeError: Unknown property axis_bgcolor

Thank u in advance,
Mania

Hi Mania,
My response to your last question should partly help with this as well, and I’ll add here that to get a pdf output from plot_res.py, you should add the option --format pdf .
Best,
Meg

Thank you once again!
Mania