I have this error: Plugin error from feature-table:
ids_to_keep must contain at least one ID.
I believe the problem may be that my unique IDs for column 1 of the metadata are called “id” and the feature-table IDs are something else.
However, I am not sure how to visualize the feature-table in order to see the IDs to confirm this suspicion.
I am working with AGP data and my code that resulted in the error is:
(qiime2-2021.2) katiemiriam@Katharines-MBP querying_redbiom % qiime feature-table summarize --i-table filtered-table-AGP.qza --o-visualization filtered-table.qzv --m-sample-metadata-file ./metadataR.tsv --verbose
Traceback (most recent call last):
File "/Users/katiemiriam/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/q2cli/commands.py", line 329, in __call__
results = action(**arguments)
File "<decorator-gen-342>", line 2, in summarize
File "/Users/katiemiriam/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
File "/Users/katiemiriam/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/sdk/action.py", line 452, in _callable_executor_
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/Users/katiemiriam/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_feature_table/_summarize/_visualizer.py", line 156, in summarize
File "/Users/katiemiriam/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/q2_feature_table/_summarize/_vega_spec.py", line 16, in vega_spec
File "/Users/katiemiriam/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/metadata/metadata.py", line 728, in filter_ids
File "/Users/katiemiriam/miniconda3/envs/qiime2-2021.2/lib/python3.6/site-packages/qiime2/metadata/metadata.py", line 184, in _filter_ids_helper
raise ValueError("`ids_to_keep` must contain at least one ID.")
ValueError: `ids_to_keep` must contain at least one ID.
Plugin error from feature-table:
`ids_to_keep` must contain at least one ID.
See above for debug info.
When I run: qiime tools inspect-metadata ./metadataR.tsv
I get a column listing all variables except "id" and a second column listing the type of each variable. There are 3560 IDs and 57 columns.
When I run: qiime tools inspect-metadata filtered-table-AGP.qza
it says: An error has been encountered:
Metadata must contain at least one ID.
When I view the metadataR.tsv file, the first column is ID, though. I'll attach that file here...metadataR.tsv (2.8 MB)
Perfect, thanks @watson! Your metadata file appears to be fine ! Unfortunately, your feature table has zero samples in it (uh oh!). You can further debug by running the summarize command sans metadata:
Sounds like you have everything you need to start diagnosing this issue - it looks like you applied at least 3 separate filtering steps - time to work your way backwards and see which step is responsible for clearing out your table. You can use the feature-table summarize command, sans metadata to help with this.
An update…the sample-frequency-filtered-table-AGP.qza indeed does not contain identifiers. It looks like when the data were downloaded using redbiom, sample identifiers were not attached to the sequences. Once I can figure out how to get those identifiers back and attach them to the sequences , it should work.