I had some problems when I've running qiime taxa collapse to obtain an ANCOM .qzv file, to visualize differential abundance taxa in mosquitoes microbiome composition.
It was sent to me a FeatureTable[Frequency], containing taxonomic information, that I've converted to a .qza file. Also, to run qiime taxa collapse, I built a taxonomy.qza file, converting an .txt file to .qza containing "Feature ID" and "Taxon" headers.
as in error, probably QIIME2 infers the datatype wrong, please replace numbers in Feature_ID for some string (like ID1, ID2, etc.) and rerun the command.
You will need to correct entries in your FeatureTable as well.
Hello!
In addition to @crusher083 excellent reply, I noticed that you attempted to collapse your table to the level 5, meanwhile in your taxonomy file you do not have different taxonomy levels. I am not sure if it will work, but if you want to collapse sequences with the same annotations as it is now in your taxonomy file, you can try to collapse it to level 0. Another option is to add full taxonomy information, including all available taxonomy ranks (domain, phylum, etc) and then collapse to desired level (5 or another).
Firstly, I followed @crusher083 recommendations and altered the Feature ID in my Taxonomy file and FeatureTable to strings (ID1,ID2,ID3...ID214). Secondly, I converted these files to .qza.
Thus, I runned qiime taxa collapse with --p-level 0, again the same error appeared:
sequence item 0: expected str instance, float found
I tried to replace the taxonomy information for taxonomy ranks, until family, editing my taxonomy and feature table files.
I runned again qiime taxa collapse, now with --p-level 5. And the same error repeated.
Hi again, could you please replace "|" symbols with ";" in taxonomy file.
Also, make sure that you do not have any "nan" values, or empty cells (in Taxon column) in the taxa file.
BTW, in the feature table, feature ids (not taxonomies) should be provided (as in "Feature ID" column in the taxonomy file).
Hi @timanix, I've replaced "|" symbols with ";" in my taxonomy file. I've checked for empty cells in these file, and it returns to me as a table with filled cells, so it's okay to me. Bacteria_taxonomy.txt (45.3 KB)
My feature table contains feature ids, also there is a "Taxon" collum but it works to use te FeatureTable with a taxonomy collum for other analysis in qiime2, so I think the point is specific with the taxonomy table. Bacteria-family.txt (51.4 KB)
I've runned the code again, and got the same error
I've checked these discussions here and here. And it seems that maybe it's a formatting error in my taxonomy table.
I've runned qiime metada tabulate to obtain a .qzv file for my taxonomy table, and here is the result:
qiime metadata tabulate \
--m-input-file Bacteria_taxonomy.qza \
--o-visualization Bacteria_taxonomy.qzv
There was an issue with viewing the artifact Bacteria_taxonomy.qza as QIIME 2 Metadata:
sequence item 0: expected str instance, float found
I don't know, but it looks like something is missing from the rows of my taxonomy table.