Plots error while running QIIME through ssh

44 views
Skip to first unread message

donato giovannelli

unread,
Mar 6, 2017, 5:40:44 PM3/6/17
to Qiime 1 Forum
Hi All,

I just installed qiime 1.9 on our new remote cluster. Everything is working except all the command that involve some kind of plotting.
I'm working through ssh and when i run command like 

summarize_taxa_through_plots.py -o taxa_summary -i otu_cc_uclust.biom -m map.txt


I get the following error

giovannelli@polyphemus:~/diversity_test$ summarize_taxa_through_plots.py -o taxa_summary -i otu_cc_uclust.biom -m map.txt
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 taxa_summary/otu_cc_uclust_L2.txt,taxa_summary/otu_cc_uclust_L3.txt,taxa_summary/otu_cc_uclust_L4.txt,taxa_summary/otu_cc_uclust_L5.txt,taxa_summary/otu_cc_uclust_L6.txt -o taxa_summary/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 527, 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

Same errors apply to the subroutines in beta diversity and alpha diversity that are suppose to make a plot. I've tried to use ssh -X to overcome the display option but with no results.

Any suggestion?

Thank you,

Don

jonsan

unread,
Mar 6, 2017, 10:52:41 PM3/6/17
to Qiime 1 Forum
Donato! Great to see you around these parts. :) I've been enjoying your twitter feed recently! 

This is an annoying error that pops up on cluster nodes without dedicated graphics hardware, and it happens because Matplotlib is trying to use a rendering backend that explicitly relies on a display. 

The solution is to change the backend that matplotlib is using in a .matplotlibrc file, as described here. I'd suggest using 'Agg' for this purpose. (See this StackOverflow thread for more details.)

Cheers,
-jon sanders

donato giovannelli

unread,
Mar 7, 2017, 7:30:54 PM3/7/17
to Qiime 1 Forum
Hi Jon,
thank you very much, I'm glad you're enjoying my twitter blabber!

I'll send the post to my cluster admin and see if he can fix the problem and will keep you posted.
Thank you very much for pointing me in the right direction!

Don

jonsan

unread,
Mar 7, 2017, 8:16:59 PM3/7/17
to Qiime 1 Forum
Yeah you bet! 

FYI you can put that .matplotlibrc file in your home directory on the cluster and it ought to work, even without admin intervention. 

-j
Reply all
Reply to author
Forward
0 new messages