q2-krona: Plugin for creating Krona plots

Hi @jack2017 ,

It's nice to see people using it :slight_smile:

Could you check if krona itself is installed and ktImportText is callable in the environment?

1 Like

I've added error handling for FileNotFoundError. Now, the plugin checks if ktImportText is available.

Dear @the_dummy

I installed krona 1.0.2, ran the command again and got the message:

Plugin error from krona:
'ktImportText' is not found, but can be installed with:
conda install -c bioconda krona
Debug info has been saved to /tmp/qiime2-q2cli-err-8fro5eex.log

So I installed bioconda krona and now it works indeed! Thanks!

2 Likes

It is in the instructions, so I must have been too hasty installing krona on that 2nd machine...

1 Like

Hi @the_dummy!

Amazing work! I was looking at Krona's web for days hoy to import qiime files and it was just here in the forum!! Thank you so much!

Just one thing... do u know if it is possible to delete the first letter in the taxonomy file (like k_ from kingdom etc) for the plot??

Thank you in advance!!
Ana.

1 Like

Hi @Anuka,

Firstly, you are welcome. I'm glad that the plugin is helping people.

And I think RESCRIPt's edit taxonomy is the right answer here. It is better to edit taxonomy file first, and then use the plotting tool. Some regex knowledge is required to accomplish what you asked, and I'm not good at it. :man_facepalming:

But I think the pattern is something like below:

^(k_)*(p_)* etc. etc. (s_)*$

Maybe @SoilRotifer could help us better.

Best wishes,

Kaan

2 Likes

Hello all!!

I was wondering if is it possible to do krona charts based on metadata... I mean, I have 72 samples, from 3 dates and 2 different conditions... is it possible to get 2 krona charts, one from each condition? Thank you all!!!

Best wishes,

Anuka.

Hi @Anuka,

I would use filter-samples to get two different feature tables based on the conditions.

Then, you can use the feature tables regularly with q2-krona.

Sincerely,

Kaan

1 Like

Got it!! Thank you a lot!!

But now I'm having problems using this table in q2-krona...

Plugin error from krona:

[Errno 2] No such file or directory: '/tmp/tmpmyqgups5/index.html'

Debug info has been saved to /tmp/qiime2-q2cli-err-81c693y8.log

If I use othe table as input I've no problem, but I got this error when using this one... Where can be the problem?? Thank you in advance!!

Could you paste the command that you tried running, and the debug info file /tmp/qiime2-q2cli-err-81c693y8.log?

Here is the command:
qiime krona collapse-and-plot --i-table filtered_tables/filtered_table.qza --i-taxonomy taxonomy/taxonomy.qza --o-krona-plot krona/krona_collapsed.qzv

All the error is what I pasted:

Plugin error from krona:

[Errno 2] No such file or directory: '/tmp/tmpmyqgups5/index.html'

Debug info has been saved to /tmp/qiime2-q2cli-err-81c693y8.log

I found the error, the file filtered was empty. However, I found that after filtration, I got 24 samples (all December samples, for example), so I got 24 krona plots... and I just want one, as the mean of all december samples...

Is it possible? Here are the scripts I used:

qiime feature-table filter-samples --i-table dada2/table_14k.qza --m-metadata-file metadata.tsv --p-where "[Date] IN ('December')" --o-filtered-table dada2/December_table.qza

qiime krona collapse-and-plot --i-table dada2/December_table.qza --i-taxonomy taxonomy/taxonomy.qza --o-krona-plot krona/krona_december.qzv

Thank you in advance

Hi @Anuka,

Sorry for the late response, I was out of town, and could not find a good time to check my stuff.

You can use feature-table group for this occasion. It allows to group samples by desired modes.

Just a side note: Do not forget to prepare a new metadata file after grouping, because the new feature table will contain new sample IDs.

Hope this helps,

Kaan

It worked!!

Thank you very much!!

1 Like

Hello, just wanted to say thank you for the plugin.
I've used it only recently, but it has quickly become my favorite for taxonomy visualization.
Thanks a lot!

Valentyn

4 Likes

Hello, Thank you so much for the plugin !

1 Like

4 off-topic replies have been split into a new topic: access community plugins through artifact API?

Please keep replies on-topic in the future.

Hi, in Qiime2 2023.2 I get the message
"Plugin error from krona: 'ktImportText' is not found, but can be installed with:
conda install -c bioconda krona
Debug info has been saved to /tmp/qiime2-q2cli-err-uvk1rq1z.log"

However, if I install as said do
$ conda install -c bioconda krona
"Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort."
etc. with a lot of package conflicts.

Has anything changed in the newer Qiime that makes this happen? In 2021.11 version it worked, but I upgraded to 2023.2 a few weeks ago.

1 Like

Hello Jack,

I had no problems installing krona via conda and q2-krona via pip, but conda sometimes have problems solving environments.

I'm no expert on this but I can suggest two things.

First, you can try to update conda, and try to install krona again.

Second, you might want to try mamba. Mamba helped me solve such problems before, and as a plus, mamba is definitely faster than conda.

Keep us updated on this please,

Good luck,

Kaan

Edit: I did not mention q2 version. Yes, I installed them in 2023.2 version.

3 Likes

@the_dummy your plugin in publication! https://www.researchgate.net/publication/368474706_A_first_insight_into_the_Polish_Bochnia_Salt_Mine_metagenome

1 Like