I have written a python script to generate Krona charts from taxa barplots, and I would like to share it.
Krona charts are interactive pie charts, and I think they are useful because it visualizes samples one by one very good.
But the problem is we need to change our OTU/ASV tables to a tsv file which Krona likes.
Krona tsv format is like this: krona-format.tsv (64 Bytes)
An example Krona tsv: O5.tsv (15.4 KB)
An example Krona chart (upload as zip since it is not allowed to upload html): Krona.zip (50.8 KB)
To get started we need to install Krona. Here is the github page : https://github.com/marbl/Krona/wiki
After the install I do not recomment to run update scripts in KronaTools because we won't use them and it will start a huge download.
We need to be able to call Krona from bash so make sure that ktImportText command works.
After that, we just need a taxa-bar-plots.qzv file to work with this Python script: generate-krona.py (2.1 KB)
Simply, the script extracts level-7.csv from taxa-bar-plots.qzv, creates tsv files for krona, generates krona file as html, removes anthing unnecessary in the process.
You can read the comments to make changes in the script. Script is written to work with python3.
(First time posting a tutorial, I need all the criticism and suggestions to improve it. )