Qiime feature-table filter-samples error using --p-where

hi there!
I am getting the following error when trying to filter samples using the feature-table filter-samples command:

Error: Got unexpected extra arguments (AND CoralNo='1' AND DevelopStage='Adults')

here’s what i’m doing:

qiime feature-table filter-samples --i-table Alb_16sSeq_RepSeqsTable.qza --m-metadata-file Alb_16sSeq_Metadata_New.txt --p-where "Village='LasCruses' AND CoralNo='1' AND DevelopStage='Adults'" --o-filtered-table RepSeqsTable_LasCruses1_Adults.qza

I am not sure what i am doing wrong, please help! Command works okay without the AND option.

Below are my system versions:
System versions
Python version: 3.5.5
QIIME 2 release: 2018.2
QIIME 2 version: 2018.2.0
q2cli version: 2018.2.0

Installed plugins
alignment 2018.2.0
composition 2018.2.0
cutadapt 2018.2.0
dada2 2018.2.0
deblur 2018.2.0
demux 2018.2.0
diversity 2018.2.0
emperor 2018.2.0
feature-classifier 2018.2.0
feature-table 2018.2.0
gneiss 2018.2.0
longitudinal 2018.2.0
metadata 2018.2.0
phylogeny 2018.2.0
quality-control 2018.2.0
quality-filter 2018.2.0
sample-classifier 2018.2.0
taxa 2018.2.0
types 2018.2.0
vsearch 2018.2.0

Hi @nerdynella! Are you sharing with us the exact same command you tried to run? I ask, because the error you are reporting doesn’t look like a QIIME 2 error, but rather an error from your shell, related to the shell not being able to parse out the command as entered. For example, the error message you provided has parentheses ( & ) around the AND statements, but the command you have copied-and-pasted here doesn’t include those parentheses. Can you double check that and let us know what is what? Otherwise, the command as pasted looks fine to me. As a quick double-check, the following command worked for me with the Moving Pictures tutorial’s Feature Table:

qiime feature-table filter-samples \
  --i-table table.qza \
  --m-metadata-file sample-metadata.tsv \
  --p-where "BodySite='gut' AND Year='2008' AND Subject='subject-1'" \
  --o-filtered-table gut-2008-subject-1.qza

This will filter the table down to precisely one sample.

Keep us posted! :t_rex:

1 Like

Thanks for responding promptly @thermokarst!
Yes, that’s the exact same command. Let me change shells and/or check with our scientific computing team. I’ll let you know how it goes.

No, it wasn't a qiime2 error indeed. Our scientific computing team said it had something to do with the way that our qiime2 module was set up - it was treating each of the AND as separate parameters instead of as part of the --p-where parameter.
This has been rectified and it's working as it should :blush:

2 Likes

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