--o-filtered-table: command not found

Hello everyone, when I created a feature table that contains only the CC samples, it always had some errors.
Command:

qiime feature-table filter-samples \
--i-table table-dada2.qza \
--m-metadata-file sample-metadata.tsv \
--p-where "[tissue]='CC'" \
--o-filtered-table CC-table.qza

Errors:
(1/2) Missing option "--o-filtered-table". ("--output-dir" may also be used)
(2/2) Got unexpected extra argument ( )
/var/spool/slurmd/job20601501/slurm_script: line 14: --o-filtered-table: command not found

I am really appreciated with your help.

1 Like

Hi @terren!

Errors that look like this usually happen when you have some kind of formatting issue - in this case, it looks a bit like you might be missing a \ at the end of the second-to-last line of your command, which is then causing your shell to run this command as two separate commands (which doesn't work).

Try this:

qiime feature-table filter-samples \
  --i-table table-dada2.qza \
  --m-metadata-file sample-metadata.tsv \
  --p-where "[tissue]='CC'" \
  --o-filtered-table CC-table.qza

:qiime2:

Thanks. I used \ in the command but it did not show here. The commands in my script is the same as that you posted. But the above errors still had.

You should double-check that it is exactly the same --- besides the \ characters, you might also have an issue with the single or double quotes on the second-to-last line - an issue there could produce the exact same shell error.

Thanks. I have double checked and posted the screenshots. But the errors still had.

Consult with your slurm sysadmin - they might be using a shell that requires you to quote your command in a different way. The second error message you shared above indicates that there is a problem somewhere with the parsing of the command (by your shell, not QIIME 2). One thing that does jump out at me is the syntax highlighting in the third line - there is something different about the last escape slash at the end.

1 Like

Yes. I felt something wrong in the slash on the second-to-last line. When I typed it, it was always different with others. And I did not know how to solve it.

Hello @thermokarst, it had the same errors when I used the command "feature-table filter-features". And I have no way to solve the style of the slash on the second-to-last line. Thanks very much.

Sure you do! Option 1: Chat with your sysadmin, ask them about the shell you're using. These errors aren't being caused by QIIME 2 - they are issues with the shell, or program you are using to send commands to QIIME 2. Option 2:

qiime feature-table filter-features --i-table table-dada2.qza --p-min-frequency 500 --o-filtered-table ancom/sample-frequency-filtered-table.qza

No need to write your command on multiple lines - that is just a stylistic choice.

:qiime2:

Thanks very very much. The command in one line works.

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