Excluding samples from the taxa bar plots


Is there some sort of command that I can use to exclude certain samples from my taxa bar plot?


Hello @Lisa_Crummett,

Yes, see the index- and metadata-based filtering modes for feature-table filter-samples. This will need to be performed prior to generate the bar plot.

I hope that helps!

Thanks Nicholas. I tried the following command for including multiple samples while excluding others…

qiime feature-table filter-samples
–i-table table.qza
–m-metadata-file sample-metadata3.txt
–p-where “Replicate IN (‘1’,’2’,’3’,’4’,’5’,’6’)”
–o-filtered-table mesocosm-filtered-table.qza

I got 2 error messages and not sure what the problem is?:
-bash: syntax error near unexpected token `(’
-bash: --o-filtered-table: command not found

Hi @Lisa_Crummett,
Thank you for following up. The errors that you are providing seem to indicate that you have accidentally included a line-break somewhere in your command. Could you please:

  1. Make sure the command is all on one line (the examples given in the tutorials have backslash ("\") characters at the end of each line to indicate a line continuation when text is displayed on multiple lines (it is easy to accidentally leave these off when copying/pasting/modifying a command from the tutorials to use with our own data, I do it all the time! :wink: ))
  2. If that’s still not working, please provide the full error traceback to help diagnose precisely where the error is occurring.
  3. The line break/error is almost certainly happening right around here: “Replicate IN (‘1’,’2’,’3’,’4’,’5’,’6’)”. Please double-check that section and try typing out all characters again (instead of copying/pasting): it may just be how these characters are displaying on the forum page but it looks like there are single-quote characters being displayed as special characters. That may be causing this issue. Unless if you are trying to exclude decimal values, you could also try something like “Replicate<=6” to accomplish the same filtering task.
  4. If that’s still not working, would you mind sending me the input files that you are using (you can send via direct message if you don’t want to share widely) — this will help me debug locally.

I hope that helps! Good luck! :sunflower:


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