Does anyone know how to remove features that are assigned as bacteria but have no other taxanomic classifications? I've used the code below. It successfully removed all non-bacterial sequences from my feature table. However, I'm still seeing some unclassified bacteria (see snapshot). Not sure how I can modify my code to exclude those as well.
In your case, it looks like the best way to do this would be to add the following line:
--p-include D_1__
So that only features assigned to at least phylum level (or whatever taxonomic level you pass to the include parameter) will be retained.
The other option is to use --p-mode exact to specify that any include/exclude terms must be matched exactly. Then you can use --p-exclude D_0__Bacteria to explicitly drop any features with that exact label. But that requires a second step (since you could, but might not want to use exact terms for the other exclude patterns that you are currently using).