# Error while using metadata-based filtering

**URL:** https://forum.qiime2.org/t/error-while-using-metadata-based-filtering/3476
**Category:** User Support
**Created:** [March 19, 2018, 2:35pm UTC](https://forum.qiime2.org/t/error-while-using-metadata-based-filtering/3476 "2018-03-19T14:35:42Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [March 22, 2018, 8:47pm UTC](https://forum.qiime2.org/t/error-while-using-metadata-based-filtering/3476/8 "2018-03-22T20:47:47Z")

</div>

Hey @kspeer,

If you were to run `qiime metadata tabulate` on `taxonomy_unfiltered.qza ` do you still see the offending entry? I suspect it will look like this instead: `k __Bacteria;p__ Bacteroidetes`

If I'm remembering correctly, `taxa barplot` pads out the taxonomy strings to make rendering simpler. In other words `k __Bacteria;p__ Bacteroidetes; __;__ ; __;__ ` is just a side-effect of trying to make the depth match everything else, it's still really `k __Bacteria;p__ Bacteroidetes`.

However if you saw `k __Bacteria;p__ Bacteroidetes;c __;o__ ;f __;g__ ` (with the prefixes) then that would mean there's a un-named Greengenes OTU with that taxonomic resolution.

Also, unrelated to what I think is happening, there's another issue with your command.  
If we compare your search string to the list we see that they are not _exactly_ the same:

```plaintext
k __Bacteria;p__ Bacteroidetes; __;__ ; __;__ # Your list
k __Bacteria; p__ Bacteroidetes; __;__ ; __;__ # Your --p-exclude

```

In particular it looks like your query has spaces in it which the computer considers as different.

If I'm remembering correctly about the behavior of `taxa barplot` your `--p-exclude` should look more like:  
`--p-exclude 'k __Bacteria;p__ Bacteroidetes'`.

Hope that helps!

---

_[View the full topic](https://forum.qiime2.org/t/error-while-using-metadata-based-filtering/3476)._
