How to filter almost everything with qiime taxa filter table

Hello, I am trying to filter a rep-seqs table in order to work only with the Vibrio genus features, but I am struggling with the --p-exclude and --p-mode parameters. As there are many 'not Vibrio' genera, the idea of including all of them as a query term within the --p-exclude parameter is not practical. I have played with the --p-mode parameter, but it seems that I am not using it efficiently. If I use --p-mode 'contains' and state --p-include g__Vibrio, the table contains the Vibrios but also the rest of genera. If I go harder and use --p-mode 'exact', I obtain an 'All features were filtered, resulting in an empty table' error because my --p-include term does not exactly match with the different Vibrios taxonomy assignations, so qiime2 discards everything. I wonder if I can insert a boolean term into the --p-exclude parameter. Maybe something like --p-exclude !=g__Vibrio, would do the trick? Should I use a different 'cherries picker plugin'? Thanks in advance for your reply. Kind regards, Rafael. :slight_smile:

Hi @Rafael,

Can you more explicitly clarify what you are trying to achieve here? On the surface you have two conflicting statements. First you want to retain the Vibrio genera as per:

Yet, you go on to say that you do not want all the Vibrio genera:

Perhaps I am misunderstanding but, do you only want some specific Vibrio taxa? Can you provide a specific example of some of the Vibrio taxonomy strings you'd like to retain, and those Vibrio taxonomy strings you'd like to discard? Also, provide the full commands that you've been running. :slight_smile:

1 Like

Hello!
I am also curious to see your full command that you are using. I remember that I struggled with similar issue and turned out that I used multiple substrings.
So I would run a command that only uses - -p-include "g__Vibrio" and nothing else, with quotes to avoid some surprises.

1 Like

Yes, I made quite a fuzzy first post. I am currently busy with other things, so right now I cannot place the commands, but I can clarify a little bit. My objective is to include the Vibrio sp. and exclude everything else. I will try with the quotes commented by @timanix, which seem to be quite a nice solution, and update the post with the commands and how it goes (maybe along the weekend). Thank you very much @SoilRotifer and @timanix for the rapid feedback. Rafael. :slight_smile:

1 Like

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