Error when using summarize_taxa_through_plots.py

116 views
Skip to first unread message

Luz

unread,
Apr 21, 2017, 4:54:17 PM4/21/17
to Qiime 1 Forum
Hi, 

I am getting the error shown below when running summarize_taxa_through_plots.py. I have attached my biom table. 

summarize_taxa_through_plots.py -i Qiime_test4/OTUs/otu_table_mc2_w_tax.biom -o Qiime_test4/summaries


Traceback (most recent call last):
  File "/usr/local/bin/summarize_taxa_through_plots.py", line 143, in <module>
    main()
  File "/usr/local/bin/summarize_taxa_through_plots.py", line 140, in main
    status_update_callback=status_update_callback)
  File "/usr/local/lib/python2.7/dist-packages/qiime/workflow/downstream.py", line 711, in run_summarize_taxa_through_plots
    close_logger_on_success=close_logger_on_success)
  File "/usr/local/lib/python2.7/dist-packages/qiime/workflow/util.py", line 122, in call_commands_serially
    raise WorkflowError(msg)
qiime.workflow.util.WorkflowError:

*** ERROR RAISED DURING STEP: Plot Taxonomy Summary
Command run was:
 plot_taxa_summary.py -i Qiime_test4/summaries/otu_table_mc2_w_tax_L2.txt,Qiime_test4/summaries/otu_table_mc2_w_tax_L3.txt,Qiime_test4/summaries/otu_table_mc2_w_tax_L4.txt,Qiime_test4/summaries/otu_table_mc2_w_tax_L5.txt,Qiime_test4/summaries/otu_table_mc2_w_tax_L6.txt -o Qiime_test4/summaries/taxa_summary_plots/
Command returned exit status: 1
Stdout:

Stderr
Traceback (most recent call last):
  File "/usr/local/bin/plot_taxa_summary.py", line 278, in <module>
    main()
  File "/usr/local/bin/plot_taxa_summary.py", line 274, in main
    resize_nth_label, label_type, include_html_legend)
  File "/usr/local/lib/python2.7/dist-packages/qiime/plot_taxa_summary.py", line 1138, in make_all_charts
    resize_nth_label, label_type, include_html_legend))
  File "/usr/local/lib/python2.7/dist-packages/qiime/plot_taxa_summary.py", line 1073, in get_counts
    label_type, include_html_legend))
  File "/usr/local/lib/python2.7/dist-packages/qiime/plot_taxa_summary.py", line 861, in make_HTML_table
    props={'title': title})
  File "/usr/local/lib/python2.7/dist-packages/qiime/plot_taxa_summary.py", line 466, in make_area_bar_chart
    fig = figure(figsize=(plot_width, plot_height))
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 535, in figure
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 84, in new_figure_manager
    return new_figure_manager_given_figure(num, figure)
  File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_tkagg.py", line 92, in new_figure_manager_given_figure
    window = Tk.Tk()
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1818, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable


Thank you for your help! 
otu_table_mc2_w_tax.biom

Jai Ram Rideout

unread,
Apr 21, 2017, 6:02:39 PM4/21/17
to Qiime 1 Forum
Hi Luz,

Can you try running this command to set a different matplotlib backend? The backend you have set (likely the default) requires a DISPLAY variable but you appear to be in a headless environment.

export MPLBACKEND="Agg"


Once you run that command, try rerunning summarize_taxa_through_plots.py. If the script succeeds, you may want to put the MPLBACKEND command in your .bashrc file so that it is activated whenever you open a new terminal. If you don't put it in your .bashrc file, you'll need to rerun the command each time you open a new terminal.

Best,
Jai

Luz

unread,
Apr 21, 2017, 9:22:20 PM4/21/17
to Qiime 1 Forum
Jai, 

Thank you so much. I will follow up with your recommendations. I was able to make it work using the X2go client instead of Putty. I just finally thought of this after realizing that everyone else in my lab had succeeded with this step, but they were all using X2go. 

Thank you so much, 

Luz

Jai Ram Rideout

unread,
Apr 26, 2017, 4:38:25 PM4/26/17
to Qiime 1 Forum
Thanks for following up with your solution Luz!

Jai
Reply all
Reply to author
Forward
0 new messages