# Can't filter out technical replicates from dataset using qiime feature-table filter-samples

**URL:** <https://forum.qiime2.org/t/cant-filter-out-technical-replicates-from-dataset-using-qiime-feature-table-filter-samples/30294>\
**Category:** Technical Support\
**Created:** [May 22, 2024, 3:34pm UTC](https://forum.qiime2.org/t/cant-filter-out-technical-replicates-from-dataset-using-qiime-feature-table-filter-samples/30294 "2024-05-22T15:34:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sasha.lucmac](https://forum.qiime2.org/user_avatar/forum.qiime2.org/sasha.lucmac/32/16517_2.png) [@sasha.lucmac](https://forum.qiime2.org/u/sasha.lucmac)\
**Post date:** [May 22, 2024, 3:34pm UTC](https://forum.qiime2.org/t/cant-filter-out-technical-replicates-from-dataset-using-qiime-feature-table-filter-samples/30294/1 "2024-05-22T15:34:44Z")

</div>

Hello!

In my dataset I have 47 samples, two of which are technical replicates that were performed to understand if the these would in fact group outside of its expected group or not and/or if the original samples were mislabeled along the way.

By looking at the technical replicate data, it was concluded that the labels for those two originals samples were switched, hence these were grouping with the wrong category.

Now, I wanted to remove these technical replicates using the filter-samples, and I even read a topic on this about how to use the --p-where SQLite clause, but I always get retrieved an error like

```auto
Plugin error from feature-table:

  Selection of IDs failed with query:
   SELECT "#SampleID" FROM metadata WHERE 23SF1B GROUP BY "#SampleID" ORDER BY "#SampleID";

  If one of the metadata column names specified in the `where` statement is on this list of reserved keywords (http://www.sqlite.org/lang_keywords.html), please ensure it is quoted appropriately in the `where` statement.

Debug info has been saved to /tmp/qiime2-q2cli-err-qxbelw7o.log

```

This error was obtained without using the WHERE parameter though. Nevertheless, I've tried a few different commands to specifically filter out the data from these two replicates... can anyone shed a light to which would be the best way? I've read something about creating an extra collumn in the metadata but I didn't fully understand what they meant by that.

Any help will be appreciated 🙂

---

<div class="post-metadata">

**Author:** ![jphagen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jphagen/32/17133_2.png) [@jphagen](https://forum.qiime2.org/u/jphagen)\
**Post date:** [May 22, 2024, 4:27pm UTC](https://forum.qiime2.org/t/cant-filter-out-technical-replicates-from-dataset-using-qiime-feature-table-filter-samples/30294/2 "2024-05-22T16:27:26Z")

</div>

Hi @sasha.lucmac,  
Can you rerun the command you have tried using the `--verbose` flag and post the command and full corresponding error here. If possible can you also share the files you are using to filter with? I am hopeful that we can figure out what is happening here.  
--Hannah

---

<div class="post-metadata">

**Author:** ![timanix](https://forum.qiime2.org/user_avatar/forum.qiime2.org/timanix/32/17879_2.png) [@timanix](https://forum.qiime2.org/u/timanix)\
**Post date:** [May 23, 2024, 2:01pm UTC](https://forum.qiime2.org/t/cant-filter-out-technical-replicates-from-dataset-using-qiime-feature-table-filter-samples/30294/3 "2024-05-23T14:01:54Z")

</div>

Hello!

I encountered the same error a while ago several times and as far as I remember the issue was in:

> [@sasha.lucmac](#):
>
> `names specified in the `where` statement is on this list of reserved keywords`

Once renaming values in the metadata file solved the issue. Another time the issue was that I declared filtering formula in jupyter and provided it as $filtering to the plugin but in fact it should be "$filtering".

Best,

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [June 23, 2024, 8:02pm UTC](https://forum.qiime2.org/t/cant-filter-out-technical-replicates-from-dataset-using-qiime-feature-table-filter-samples/30294/4 "2024-06-23T20:02:16Z")

</div>

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