Metadata Error: IDs not found


I transformed an OTU table from tsv to biom format and imported that into QIIME as type RelativeFrequency. Then I calculated alpha diversity metrics with the alpha diversity-lib AddIn. Now I would like to perform statistical analysis on groups with

qiime diversity alpha-group-significance
qiime diversity alpha-correlation

But in both cases I receive a metadata error (see below). In the metadata overview of QIIME docs it says using "-" is alright. Can you please help me out? I also attached the respective otu-table, alpha metrics and metadata.

merged_cases_species.qza (24.0 KB) q2-metadata.tsv (1.4 KB) shannon_entropy_species.qza (11.0 KB)

Traceback (most recent call last):
File "/home/plicht/anaconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2cli/", line 329, in call
results = action(**arguments)
File "", line 2, in alpha_group_significance
File "/home/plicht/anaconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/", line 245, in bound_callable
output_types, provenance)
File "/home/plicht/anaconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/sdk/", line 452, in callable_executor
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/home/plicht/anaconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/q2_diversity/_alpha/", line 35, in alpha_group_significance
metadata = metadata.filter_ids(alpha_diversity.index)
File "/home/plicht/anaconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/metadata/", line 728, in filter_ids
File "/home/plicht/anaconda3/envs/qiime2-2020.11/lib/python3.6/site-packages/qiime2/metadata/", line 198, in _filter_ids_helper
% (', '.join(repr(e) for e in sorted(missing_ids))))
ValueError: The following IDs are not present in the metadata: '"les2-Macula1"', '"les2-Plaque1"', '"les3-Plaque1"', '"les3-Plaque2"', '"les4-Macula2"', '"les5-Plaque1"', '"les5-Plaque2"', '"les6-Macula1"', '"les6-Macula2"', '"les7-Macula1"', '"non2-oppoM1"', '"non3-oppoP1"', '"non3-oppoP2"', '"non4-oppoM1"', '"non4-oppoM2"', '"non5-oppoP1"', '"non5-oppoP2"', '"non6-oppoM1"', '"non6-oppoM2"', '"non7-oppoM1"', '"non7-oppoNON"'

Plugin error from diversity:

The following IDs are not present in the metadata: '"les2-Macula1"', '"les2-Plaque1"', '"les3-Plaque1"', '"les3-Plaque2"', '"les4-Macula2"', '"les5-Plaque1"', '"les5-Plaque2"', '"les6-Macula1"', '"les6-Macula2"', '"les7-Macula1"', '"non2-oppoM1"', '"non3-oppoP1"', '"non3-oppoP2"', '"non4-oppoM1"', '"non4-oppoM2"', '"non5-oppoP1"', '"non5-oppoP2"', '"non6-oppoM1"', '"non6-oppoM2"', '"non7-oppoM1"', '"non7-oppoNON"'

See above for debug info.

Hello @pippo_pippo,
I think your issue is that there are quotes around your sample IDs. I think if you remove them you will be good to go!
Actually I think that you have quotes around all non numerical text in your metadata. I would remove all the quotes because it could cause issues down the line.
Let me know if that works. If not we can try to debug more!
Chloe :turtle:

1 Like

Hi @cherman2,
thanks for getting back. The IDs are not in quotes in both the metadata file as well as the otu-table artifact. At least the IDs were not quoted in the original tsv file that I transformed into biom and imported into qiime. But I don’t think in that process the IDs were set into quotes?

Hello @pippo_pippo,
According to the metadata.tsv you sent(which I am assuming is your original tsv) and the error that is printed, there are quotes around your non-numeric data points. When looking at the .tsv in a text editor your can see that there are quotes around the non-numeric data , However, when I looked at it in a google spreadsheet I couldn’t see them. So make sure you are using a text editor or something to view it because excel and google sheets seem to hid them.
Hope this helps!
Chloe :turtle:


perfect, that solved my issues @cherman2! Don’t know how the quotes got in there.
Thank your for your assistance,

1 Like

excel and other spreadsheet software will often insert quotes. Something to be on the lookout for!

1 Like