# Way to turn off filters?

**URL:** <https://nextstrain.discourse.group/t/way-to-turn-off-filters/1175>\
**Category:** Help and Getting Started\
**Created:** [July 10, 2022, 6:09pm UTC](https://nextstrain.discourse.group/t/way-to-turn-off-filters/1175 "2022-07-10T18:09:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stacia](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/stacia/32/26_2.png) [@stacia](https://nextstrain.discourse.group/u/stacia)\
**Post date:** [July 10, 2022, 6:09pm UTC](https://nextstrain.discourse.group/t/way-to-turn-off-filters/1175/1 "2022-07-10T18:09:25Z")

</div>

Hello, I’ve constructed some (non-clock-like) consensus genomes using various different parameters and want to construct trees with only my genomes plus Wuhan reference. The parameter settings for variant calling and consensus construction might cause the genomes to be filtered out by auger, but I’d like to force it to construct a tree without filtering them out so I can compare trees with different parameter settings.

I was doing this brute force by putting all taxa in the include.txt file, but I’d also like to be able to subsample since I have about 12K genomes and the include file would overrule subsampling (can one subsample on non-geographic metadata such as sex? sorry to embed unrelated q here). I’ve been testing things out with a toy example of 100 genomes and trying to subsample grouping by sex with 25 `seq_per_group`.

So is there a way to turn off the filtering globally?  
Thanks!  
Stacia

---

<div class="post-metadata">

**Author:** ![stacia](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/stacia/32/26_2.png) [@stacia](https://nextstrain.discourse.group/u/stacia)\
**Post date:** [July 14, 2022, 5:03am UTC](https://nextstrain.discourse.group/t/way-to-turn-off-filters/1175/2 "2022-07-14T05:03:05Z")

</div>

Any help on this? Wondering if I can turn off filtering completely or certain kinds of filtering.

---

<div class="post-metadata">

**Author:** ![dlu](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@dlu](https://nextstrain.discourse.group/u/dlu)\
**Post date:** [July 19, 2022, 6:20pm UTC](https://nextstrain.discourse.group/t/way-to-turn-off-filters/1175/3 "2022-07-19T18:20:09Z")

</div>

Would this be appropriate? [Workflow config file reference — SARS-CoV-2 Workflow documentation](https://docs.nextstrain.org/projects/ncov/en/latest/reference/workflow-config-file.html#skip-diagnostics)

Just add this to `builds.yaml`:

```auto
filter:
  input_name:
    skip_diagnostics: True

```

so the diagnositics won’t run on data with `input_name`. You can see our config [here](https://github.com/chanzuckerberg/czgenepi/blob/9609d5534d1068a29b4303ef7bd93c4cebae6541/src/backend/aspen/workflows/nextstrain_run/builds_templates/mega_template.yaml#L28-L30). We added this b/c the reference strain (root of the tree) was getting removed in extreme conditions XD

---

<div class="post-metadata">

**Author:** ![dlu](https://avatars.discourse-cdn.com/v4/letter/d/e36b37/32.png) [@dlu](https://nextstrain.discourse.group/u/dlu)\
**Post date:** [July 19, 2022, 6:30pm UTC](https://nextstrain.discourse.group/t/way-to-turn-off-filters/1175/4 "2022-07-19T18:30:18Z")

</div>

For subsampling, I thought `query` [ref](https://docs.nextstrain.org/projects/augur/en/stable/usage/cli/filter.html#metadata%20filters) and `group_by` [ref](https://docs.nextstrain.org/projects/augur/en/stable/usage/cli/filter.html#subsampling) allows custom column headers, since they just become options to `augur filter` [ref](https://github.com/nextstrain/augur/blob/master/augur/filter.py)

---

<div class="post-metadata">

**Author:** ![victorlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/victorlin/32/306_2.png) [@victorlin](https://nextstrain.discourse.group/u/victorlin)\
**Post date:** [July 19, 2022, 11:00pm UTC](https://nextstrain.discourse.group/t/way-to-turn-off-filters/1175/5 "2022-07-19T23:00:54Z")

</div>

> [@stacia](#):
>
> I was doing this brute force by putting all taxa in the include.txt file, but I’d also like to be able to subsample since I have about 12K genomes and the include file would overrule subsampling

Hi @stacia, are you using a SARS-CoV-2 workflow config file (e.g. [ncov-tutorial/genomic-surveillance.yaml](https://github.com/nextstrain/ncov-tutorial/blob/main/genomic-surveillance.yaml))? If so, could you provide a link so we can understand the context better?

* * *

If not and you’re using `augur filter` directly:

It sounds like you want to just subsample and not filter. Both are controlled by `augur filter`. In the docs, the difference is in the parameters under [metadata filters](https://docs.nextstrain.org/projects/augur/en/stable/usage/cli/filter.html#metadata%20filters) vs. [subsampling](https://docs.nextstrain.org/projects/augur/en/stable/usage/cli/filter.html#subsampling), though you’re right that using `--include` will override any subsampling.

You should be able to subsample without filtering by simply not providing any of the parameters under [metadata filters](https://docs.nextstrain.org/projects/augur/en/stable/usage/cli/filter.html#metadata%20filters). As @dlu noted, you can use `--group-by sex` or any other combination (e.g. `--group-by year month sex` for temporal sampling) to get what you’re looking for.
