Python API: visualizations

Hey there @tomasz ,

regarding

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"
feature_table.visualizers.tabulate_seqs(deblur_sequences\
                .representative_sequences).export_data(out_dir)

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>'\
    .format(out_dir))

Hope it'll work for you.

3 Likes