plot_taxa_summary.py

373 views
Skip to first unread message

Paula Aguiar

unread,
Nov 5, 2015, 10:12:11 AM11/5/15
to qiime...@googlegroups.com
Hi,
I am getting this error message when using plot_taxa_summary.py.
I am getting one pie chart but I have 3 samples. I am missing something to get the three pie charts?
Thanks a lot!
Paula

(virtual)aaguiar@asteria:~/projects/metagenomics/taxa_per_dam_2$ plot_taxa_summary.py -i otu_table_mc2_w_tax_L2.txt,otu_table_mc2_w_tax_L3.txt,otu_table_mc2_w_tax_L6.txt -l Phylum,Class,Genus -n 16 -c pie,bar -s -o ~/projects/metagenomics/phylum_charts_2/

Traceback (most recent call last):

  File "/home/aaguiar/virtualenv/virtual/bin/plot_taxa_summary.py", line 278, in <module>

    main()

  File "/home/aaguiar/virtualenv/virtual/bin/plot_taxa_summary.py", line 274, in main

    resize_nth_label, label_type, include_html_legend)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 1138, in make_all_charts

    resize_nth_label, label_type, include_html_legend))

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 910, in get_counts

    label_type, include_html_legend))

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 793, in make_HTML_table

    props={'title': title})

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 315, in make_pie_chart

    background_color, img_abs, 'png', 80)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 187, in make_legend

    shadow=False, fancybox=False)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/matplotlib/figure.py", line 1251, in legend

    l = Legend(self, handles, labels, *args, **kwargs)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/matplotlib/legend.py", line 385, in __init__

    self._init_legend_box(handles, labels, markerfirst)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/matplotlib/legend.py", line 654, in _init_legend_box

    fontsize, handlebox))

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/matplotlib/legend_handler.py", line 119, in legend_artist

    fontsize, handlebox.get_transform())

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/matplotlib/legend_handler.py", line 252, in create_artists

    self.update_prop(p, orig_handle, legend)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/matplotlib/legend_handler.py", line 78, in update_prop

    legend._set_artist_props(legend_handle)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/matplotlib/legend.py", line 401, in _set_artist_props

    a.set_figure(self.figure)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/matplotlib/artist.py", line 640, in set_figure

    raise RuntimeError("Can not put single artist in "

RuntimeError: Can not put single artist in more than one figure

Colin Brislawn

unread,
Nov 5, 2015, 8:01:41 PM11/5/15
to Qiime 1 Forum
Hello Paula,

I'm sorry you got this strange error. I think this is a problem with matplotlib, not a problem with qiime.

Let's see what version of qiime and matplotlib you have installed... Run this command the post the result.

print_qiime_config.py -t


Thanks!
Colin

Paula Aguiar

unread,
Nov 6, 2015, 6:03:47 AM11/6/15
to Qiime 1 Forum
Hi Colin!
I have 1.5.0. version of matplotlib
also I didn't see that everything os installed but h5py...

Kyle Bittinger

unread,
Nov 6, 2015, 11:32:39 AM11/6/15
to Qiime 1 Forum
Paula, could you post the output of this command so we can check that the QIIME software is actually using this version of matplotlib?  Sometimes libraries can get messed up if you have multiple versions installed.

print_qiime_config.py -t

Paula Aguiar

unread,
Nov 6, 2015, 1:59:03 PM11/6/15
to Qiime 1 Forum
Hi Kyle,
here it is:

System information

==================

         Platform:      linux2

   Python version:      2.7.3 (default, Dec 18 2014, 19:10:20)  [GCC 4.6.3]

Python executable:      /home/aaguiar/virtualenv/virtual/bin/python


QIIME default reference information

===================================

For details on what files are used as QIIME's default references, see here:

 https://github.com/biocore/qiime-default-reference/releases/tag/0.1.3


Dependency versions

===================

          QIIME library version:        1.9.1

           QIIME script version:        1.9.1

qiime-default-reference version:        0.1.3

                  NumPy version:        1.10.1

                  SciPy version:        0.16.1

                 pandas version:        0.17.0

             matplotlib version:        1.5.0

            biom-format version:        2.1.5

                   h5py version:        Not installed.

                   qcli version:        0.1.1

                   pyqi version:        0.3.2

             scikit-bio version:        0.2.3

                 PyNAST version:        1.2.2

                Emperor version:        0.9.51

                burrito version:        0.9.1

       burrito-fillings version:        0.1.1

              sortmerna version:        SortMeRNA version 2.0, 29/11/2014

              sumaclust version:        SUMACLUST Version 1.0.00

                  swarm version:        Swarm 1.2.19 [Nov  4 2015 09:54:44]

                          gdata:        Installed.


QIIME config values

===================

For definitions of these settings and to learn how to configure QIIME, see here:

 http://qiime.org/install/qiime_config.html

 http://qiime.org/tutorials/parallel_qiime.html


                     blastmat_dir:      None

      pick_otus_reference_seqs_fp:      /home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta

                         sc_queue:      all.q

      topiaryexplorer_project_dir:      None

     pynast_template_alignment_fp:      /home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set_aligned/85_otus.pynast.fasta

                  cluster_jobs_fp:      start_parallel_jobs.py

pynast_template_alignment_blastdb:      None

assign_taxonomy_reference_seqs_fp:      /home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta

                     torque_queue:      friendlyq

                    jobs_to_start:      1

                       slurm_time:      None

            denoiser_min_per_core:      50

assign_taxonomy_id_to_taxonomy_fp:      /home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt

                         temp_dir:      /tmp/

                     slurm_memory:      None

                      slurm_queue:      None

                      blastall_fp:      blastall

                 seconds_to_sleep:      1


QIIME base install test results

===============================

.........

----------------------------------------------------------------------

Ran 9 tests in 0.026s


OK

Kyle Bittinger

unread,
Nov 6, 2015, 2:45:11 PM11/6/15
to Qiime 1 Forum
OK, Paula, it looks like the libraries are OK.  We'll see if we can narrow down the error and then I may have you send me a file so I can reproduce it on my end.

Does the same error occur if you run the script on only one input file and select only pie charts?

If so, would you mind sending me one of the input files so I can test it myself?

Thanks for your patience,
Kyle

Paula Aguiar

unread,
Nov 6, 2015, 3:01:57 PM11/6/15
to Qiime 1 Forum
Ok Kyle,
I'll try it for one sample and get back to you
Anyway I can produce bar graphs and area graphs for the 3 samples... Just the pie don't work. But I actually get the same error message everytime.
I also don't get any html files for the legends...
Thanks for the help!
Paula

Paula Aguiar

unread,
Nov 7, 2015, 2:51:14 PM11/7/15
to Qiime 1 Forum
Hello Kyle,
I am still geting the error with one sample at a time.
It produces the pie chart still but with no legend ou html files...
Can you help me with this?
Thanks a lot!
Paula

here is the error message:

Traceback (most recent call last):

  File "/home/aaguiar/virtualenv/virtual/bin/plot_taxa_summary.py", line 278, in <module>

    main()

  File "/home/aaguiar/virtualenv/virtual/bin/plot_taxa_summary.py", line 274, in main

    resize_nth_label, label_type, include_html_legend)

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 1138, in make_all_charts

    resize_nth_label, label_type, include_html_legend))

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 910, in get_counts

    label_type, include_html_legend))

  File "/home/aaguiar/virtualenv/virtual/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py", line 834, in make_HTML_table 

Paula Aguiar

unread,
Nov 9, 2015, 10:01:52 AM11/9/15
to Qiime 1 Forum
Hello Kyle,
I tried to work on macqiime instead of my virtual machine on the server and it worked. I guess there was a problem with memory space...
I am still strugling with the names of all the files I got, its a bit confusing... Is there any logic behind the pdf and png files names and legend names?
thanks a lot!
Paula

Kyle Bittinger

unread,
Nov 9, 2015, 1:44:17 PM11/9/15
to Qiime 1 Forum
Paula, glad you got it working.

I'm afraid there is no logic to the image names -- they are generated randomly, as you can see in this function, named "make_img_name":

Paula Aguiar

unread,
Nov 10, 2015, 8:42:03 AM11/10/15
to Qiime 1 Forum
Thanks Kyle!
Reply all
Reply to author
Forward
0 new messages