Ancom analysis- Error

Hi,
I am running following command and i am meeting error,
qiime feature-table filter-samples --i-table table.qza --m-metadata-file Meta.tsv --p-where “BodySite=‘gut’” --o-filtered-table gut-table.qza

If i run the command without --p-where i can get the results, I just wanted to ask here that my samples are taken from distal and proximal colon does it matter if i put --p-where parameter? Basically i am putting this parameter just to limit my analysis to single body-site.

Error:
Traceback (most recent call last):
File “/home/Krunal/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/metadata/metadata.py”, line 605, in get_ids
c.execute(query)
sqlite3.OperationalError: no such column: BodySite

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/home/Krunal/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2cli/commands.py”, line 327, in call
results = action(**arguments)
File “</home/Krunal/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/decorator.py:decorator-gen-323>”, line 2, in filter_samples
File “/home/Krunal/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 240, in bound_callable
output_types, provenance)
File “/home/Krunal/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 383, in callable_executor
output_views = self._callable(**view_args)
File “/home/Krunal/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_feature_table/_filter.py”, line 73, in filter_samples
where=where, axis=‘sample’, exclude_ids=exclude_ids)
File “/home/Krunal/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/q2_feature_table/_filter.py”, line 46, in _filter_table
ids_to_keep = metadata.get_ids(where=where)
File “/home/Krunal/miniconda3/envs/qiime2-2019.7/lib/python3.6/site-packages/qiime2/metadata/metadata.py”, line 614, in get_ids
"where statement." % query) from e
ValueError: Selection of IDs failed with query:
SELECT “sampleid” FROM metadata WHERE BodySite=‘gut’ GROUP BY “sampleid” ORDER BY “sampleid”;

If one of the metadata column names specified in the where statement is on this list of reserved keywords (http://www.sqlite.org/lang_keywords.html), please ensure it is quoted appropriately in the where statement.

Plugin error from feature-table:

Selection of IDs failed with query:
SELECT “sampleid” FROM metadata WHERE BodySite=‘gut’ GROUP BY “sampleid” ORDER BY “sampleid”;

If one of the metadata column names specified in the where statement is on this list of reserved keywords (http://www.sqlite.org/lang_keywords.html), please ensure it is quoted appropriately in the where statement.

Also further i am going to run qiime taxa collapse and qiime composition add-pseudocount, what will be the effects if i dont add the --p-where.

Best
Krunal

1 Like

Hi @Kpatel,

Just to get the full context, are you following the moving pictures tutorial, but working with your own data?

If that’s the case and you don’t have a column called BodySite containing data labeled gut, the --p-where flag isn’t going to work for you on your own data. (If you get to needing to filter your own data, the data filtering tutorial linked with the command is excellent.)

In the moving pictures tutorial, the moviation for filtering si that we know that bodysite has a huge effect on the microbiome and the difference between skin, oral, and fecal is huge. By filtering in that example you (a) get an example of filtering data and (b) get to focus on a single bodysite.

That leads then to your second question: should you filter. And, my recommendation here is to look in PCoA space and/or use hypothesis testing to see if there’s a big difference based on the sampling site. It won’t be as big as the body site effect you saw in moving pictures, but it’s good to check. (Or check the literature and see what others have found!)

Best,
Justine

1 Like

Hi @jwdebelius,

You are right i was following tutorial with my data and my body site in metadata was distal and proximal colon which is basically gut not written in that form, so i changed metadata and i was able to proceed for differential abundance analysis.

That was a silly mistake indeed. Thank you so much for your help

2 Likes

A post was split to a new topic: Resources for Learning Move about Diversity

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.