Merging taxonomies made with different classifier types using rescript's merge-taxa

It seems like I'm not able to merge taxonomies that were made using different classification methods. Any suggestions as to how to do so?

I have 4 taxonomies: 2 created using BLAST and 2 created using naive-Bayes classifiers. I can successfully merge either the two naive-Bayes taxonomies, or the 2 BLAST taxonomies, but not 1 (or more) of each. I get this error message when I attempt it:

Plugin error from rescript: Taxonomy format requires the first column name to be Taxon, found 'Confidence'

More details if they are needed:
Code:

qiime rescript merge-taxa
--i-data SM_taxonomy_anmlUSCA_70.qza SM_BLAST_anmlUSCA_taxonomy_97.qza
--p-mode len
--o-merged-data NB-BLAST.qza
#error

qiime rescript merge-taxa
--i-data SM_taxonomy_anml_70.qza SM_BLAST_anml_taxonomy_97.qza
--p-mode len
--o-merged-data NB-BLAST2.qza
#error

qiime rescript merge-taxa
--i-data SM_taxonomy_anmlUSCA_70.qza SM_taxonomy_anml_70.qza
--p-mode len
--o-merged-data NBonly.qza
#successful

qiime rescript merge-taxa
--i-data SM_BLAST_anml_taxonomy_97.qza SM_BLAST_anmlUSCA_taxonomy_97.qza
--p-mode len
--o-merged-data BLASTonly.qza
#successful

More details on how the taxonomies were created:

1 Like

Thanks for reporting @smayne11 !

It is difficult to troubleshoot without some more information. Could you possibly share a "minimum working example" (e.g., trim your taxonomies to maybe the first 10 entries, and confirm that you still get this error). That way you can confirm that it is not a specific line in your files causing this error, and also do not need to share all of your data/a bunch of large files.

I will also need the complete command that you used.

And finally, what version of QIIME 2 and RESCRIPt are you using? You can run these commands in your terminal to find out if you are not sure:

conda list qiime2
conda list rescript

Thanks!

1 Like

A little more tinkering and I figured out that I actually don't need to merge BLAST & naive-Bayes taxonomies for my work, so not an urgent issue.

I will provide what info I can for figuring out the bug in case it's something you want to look into more. Unfortunately, I don't know how to trim the taxonomies themselves and don't have the capability to recreate them on a smaller dataset at present.

I'm currently running QIIME2 v2021.4.0 and RESCRIPt v2021.8.0.dev0+3.g1ce2142

The taxonomies I was attempting to merge, and the naive-Bayes classifiers used to create them, were created on QIIME2 v2021.2 and unknown RECSRIPt version installed April 2021. Some computer issues meant I had to reinstall QIIME2 recently.

The taxonomies I was merging aren't all that large, so I'm going to upload them here in case you want to play around with them, along with the script I ran to get the errors (exactly as above, but including loading the QIIME2 environment, etc).

Finally, I ran into another issue with merging taxonomies that I will post separately soon that seemed like it could be related. I will link it here when it is posted. Maybe both issues are just from using QIIME2 v2021.2 artifacts in newer versions of RECRIPt and QIIME2.

1 Like

thanks! I will have a look — I suspect it might be since you are using two different versions:

but I am not sure — if there is a bug I want to make sure we find it :grin:

but since you say that you solved your issue, I will unqueue this topic — please just post again to reopen this topic if it becomes an issue once more.

1 Like

Still not an issue I need resolved, but I installed qiime2 v2021.2.0 and rescript v2021.2.0 and am still having the same issue as before.

Looking back into the citations of the original taxonomy artifacts I'm seeing qiime2 v2021.2.0 and rescript v2020.6.1+3.g39f608e, though I'm not sure why I would have installed such an old version of rescript since I hadn't started using qiime until this year.

Thanks for your help, and hopefully this will help you find the problem if others run into the same issue and need help.

#setup
#activate qiime
conda activate qiime2-2021.2
#set working directory
cd /home/smayne11/miniconda3/envs/qiime2-2021.2/Final/MergeTaxonomies

qiime rescript merge-taxa
--i-data SM_taxonomy_anmlUSCA_70.qza SM_BLAST_anmlUSCA_taxonomy_97.qza
--p-mode len
--o-merged-data NB-BLAST.qza
#error

qiime rescript merge-taxa
--i-data SM_taxonomy_anml_70.qza SM_BLAST_anml_taxonomy_97.qza
--p-mode len
--o-merged-data NB-BLAST2.qza
#error

qiime rescript merge-taxa
--i-data SM_taxonomy_anmlUSCA_70.qza SM_taxonomy_anml_70.qza
--p-mode len
--o-merged-data SM_taxNB70_anml_anmlUSCA.qza
#successful

qiime rescript merge-taxa
--i-data SM_BLAST_anml_taxonomy_97.qza SM_BLAST_anmlUSCA_taxonomy_97.qza
--p-mode len
--o-merged-data SM_taxBLAST70_anml_anmlUSCA.qza
#successful

Thanks again @smayne11 ! It looks like the columns in your taxonomy files were getting re-ordered, so that taxonomy was being merged correctly but the Artifact failed to be created.

This has now been reported and fixed by @misialq ... this will be added to next month's release of RESCRIPt (for now use the developer version if you run into this problem again before then).

2 Likes