Grouping sequences by metadata?

Hello,

I am attempting to filter my sequences using my metadata file but I am getting an error message that says all the features have been filtered out of the data. I have three different study groups composed of about 22 samples each. I want to determine the relative abundance of phyla in each group as opposed to the relative abundance in each individual sample. I might be going about this the wrong way so any feedback is much appreciated.

To filter sequences I used:

qiime feature-table filter-seqs \

–i-data rep-seqs.qza
–m-metadata-file ‘validatedALLM1 - Sheet3.tsv’
–p-where “‘sample id’=‘C’”
–o-filtered-data rep-seqs-C.qza
–verbose

This is the output I get:

(qiime2-2019.1) [email protected]:~/M1alloutput$ qiime feature-table filter-seqs --i-data rep-seqs.qza --m-metadata-file ‘validatedALLM1 - Sheet3.tsv’ --p-where “‘sample id’=‘C’” --o-filtered-data rep-seqsC.qza --verbose
Traceback (most recent call last):
File “/home/ubuntu/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py”, line 274, in call
results = action(**arguments)
File “</home/ubuntu/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-318>”, line 2, in filter_seqs
File “/home/ubuntu/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 231, in bound_callable
output_types, provenance)
File “/home/ubuntu/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 365, in callable_executor
output_views = self._callable(**view_args)
File “/home/ubuntu/miniconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_feature_table/_filter.py”, line 112, in filter_seqs
raise ValueError(‘All features were filtered out of the data.’)
ValueError: All features were filtered out of the data.

Plugin error from feature-table:

All features were filtered out of the data.

See above for debug info.

Should I be using a different feature to filter my sequences? Or is there a way I can use the relative abundance data I have already generated for each of my samples to look at the relative abundance of phyla in each of the groups?

Thank you in advance for your help!

Hi @Jill_Adkins,
Hmm, that error message is odd to me. The approach you are describing shouldn’t even work at all because you are providing a rep-seq artifact that holds no information regarding your samples, and a metadata parameter that couldn’t possibly provide a list of features to filter from that rep-seqs. So I don’t know why anything is filtered at all. Anyways, that’s not your issue here :stuck_out_tongue:

I think what you want instead is the feature-table group function for a way to combine your samples based on a metadata category. Then you can plot these as groups. However, I do believe you’ll have to use your frequency table before you converted it to relative abundances. Though, it would be nice if group could also accept FeatureTable(RelativeFrequency).

Thank you for the quick response @Mehrbod_Estaki!

I knew I was doing something silly! Feature-table group worked! Thank you so much for your help!