Python API: visualizations


how can I visualize visualization objects in Jupyter? For example, I run
and all I get is this:

Results (name = value)
visualization = <visualization: Visualization uuid:

How can I get the visualization I would normally get from using qiime tools view artifact.qzv? Do I have to save it first and then visualize from a saved qzv file?


Hi @tomaz, we don’t have a good workflow developed yet for viewing visualizations within Jupyter - check out this post for a little detail:

Maybe @uria can provide some more details about their workaround.

Otherwise, we are stuck working within Jupyter’s limitations, so some code like this can get you moving:

viz = feature_table.visualizers.tabulate_seqs(rep_seqs)'foo.qzv')
!qiime tools view foo.qzv

This will open the visualization in a new tab, although YMMV depending on how Jupyter NB is configured.


Hey there @tomasz ,


Though I really couldn’t find a good reason to use this workaround (qiime view works just fine for me…) what I suggested in mentioned thread is to:

  1. Extract the visualization object as a directory
out_dir = "/tmp/deblur_sqs_vis"

Now you should have (I hope) a directory called deblur_sqs_vis under /tmp. This directory also should contain sub-directory named data in which there’s an index.html file.
2. Use the HTML object in IPython.core.display in order to view this directory

from IPython.core.display import  HTML
HTML('<iframe height = 1000, width = 1000, src = "{}/data/index.html"> </iframe>'\

Hope it’ll work for you.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.