I ran all the analysis containing the negative DNA controls, PCR controls and the Mock community. Now I want to remove these variables from my feature table and I have used the following code, but I keep getting the following error, saying
ValueError: Selection of IDs failed with query:
*** SELECT "#SampleID" FROM metadata WHERE #SampleID ('BN1HolyNE01', 'B057HolyNE02', 'B074HolyNE03', 'BMC1Holy', 'BNP1Holy', 'B098HolyNE04T4') GROUP BY "#SampleID" ORDER BY "#SampleID";***
I think your issue is in the command construction around the where command. My (simplistic) solution would be to either include a column in your metadata where you specify that they're controls (this is usually my approach, so, like for my disease status I have case | control | not applicable or something similar. The other (easy!) option is to just make a text file with the list of sample IDs and then pass it as metadata.
Though I am not sure whether you can search by #SampleID. If that does not work, then definitely try @jwdebelius's advice, it will take a bit more time if you need to add a metadata column but what you lose in time you will gain in tranquility!