# Filter for create Dengue phylogenetic tree

**URL:** <https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995>\
**Category:** Help and Getting Started\
**Created:** [September 20, 2025, 4:08pm UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995 "2025-09-20T16:08:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soon\_tare](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Soon\_tare](https://nextstrain.discourse.group/u/Soon_tare)\
**Post date:** [September 20, 2025, 4:08pm UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995/1 "2025-09-20T16:08:38Z")

</div>

Hello, Nextstrain developer, I have a question to ask you about the filter for creating dengue phylogenetics. When I attempt to filter all sequences from my local sample to display on the dengue phylogenetic tree, I find that our sequence is deleted from the main phylogenetic tree after running nextstrain build. Do you have a suggestion for this question?

---

<div class="post-metadata">

**Author:** ![AngieHinrichs](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/angiehinrichs/32/78_2.png) [@AngieHinrichs](https://nextstrain.discourse.group/u/AngieHinrichs)\
**Post date:** [September 23, 2025, 4:59pm UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995/2 "2025-09-23T16:59:51Z")

</div>

Hi @Soon_tare, I’m not a Nextstrain developer, but I think it would be helpful to them if you can copy-paste to show the configuration code where you’re attempting to include all local samples. How many local samples do you have?

---

<div class="post-metadata">

**Author:** ![Soon\_tare](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Soon\_tare](https://nextstrain.discourse.group/u/Soon_tare)\
**Post date:** [September 24, 2025, 6:05am UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995/3 "2025-09-24T06:05:41Z")

</div>

![image](https://canada1.discourse-cdn.com/flex031/uploads/nextstrain/original/1X/cee5845cb5f695088c72c3af986bf24a946d61c7.png)  
@AngieHinrichs Thank you for your kindness. This is the config file I use. Actually, we modified a few configs like path of location, but most of the file is like the original, and we have around 200 samples.

---

<div class="post-metadata">

**Author:** ![joverlee](https://avatars.discourse-cdn.com/v4/letter/j/e495f1/32.png) [@joverlee](https://nextstrain.discourse.group/u/joverlee)\
**Post date:** [September 25, 2025, 12:02am UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995/4 "2025-09-25T00:02:11Z")

</div>

Hi @Soon_tare,

Just to confirm, did you modify the workflow to use the new config parameters `serotype`, `sequences_local` and `metadata_local`? These parameters are not supported in Nextstrain’s dengue workflow, so if you did not modify the workflow then you’re data are not included in the analysis.

-Jover

---

<div class="post-metadata">

**Author:** ![Soon\_tare](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Soon\_tare](https://nextstrain.discourse.group/u/Soon_tare)\
**Post date:** [September 29, 2025, 3:56pm UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995/5 "2025-09-29T15:56:06Z")

</div>

Hi @joverlee ,

Thanks a lot for your recommendation. We tried modifying some data and updated the config for running Nextstrain. But the main problem is that when we generate the phylogenetic tree, our local data doesn’t show up. Do you have any suggestions for us?

Best,  
Jane

---

<div class="post-metadata">

**Author:** ![quietjen](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/quietjen/32/713_2.png) [@quietjen](https://nextstrain.discourse.group/u/quietjen)\
**Post date:** [September 29, 2025, 5:49pm UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995/6 "2025-09-29T17:49:17Z")

</div>

Hi Jane,

I see you have in the config file:

```auto
sequences_local: "../try/example_data/sequences_denv3.fasta"
metadata_local: "../try/example_data/metadata_denv3.tsv"

```

In case you haven’t already, you may need to modify the filter rule (or connect the config) in [phylogenetic/rules/prepare\_sequences.smk#L58-L59](https://github.com/nextstrain/dengue/blob/ae03c5d592fb94f1d7cb49b21b1f44eb0d947fdf/phylogenetic/rules/prepare_sequences.smk#L58-L59) to something like:

```yaml
input:
        sequences = "../try/example_data/sequences_{serotype}.fasta",
        metadata = "../try/example_data/metadata_{serotype}.tsv",

```

Then I would manually add sequence IDs for your samples to [phylogenetic/defaults/denv3/include.txt](https://github.com/nextstrain/dengue/blob/main/phylogenetic/defaults/denv3/include.txt), which bypasses filters such as `--exclude-where country=? region=? date=? is_lab_host='true'` and `--min-length`.

And test with only the `denv3` build:

```bash
nextstrain build phylogenetic auspice/dengue_denv3_genome.json

```

I’m also going to look into adding a `--output-log reasons_dropped.tsv` to the filter rule [described here](https://docs.nextstrain.org/projects/augur/en/stable/usage/cli/filter.html), as some diagnostics.

Please let me know if the above doesn’t work, we also have Nextstrain office hours this Thursday at 10am Pacific time to help debug, let me know and I can add you

---

<div class="post-metadata">

**Author:** ![quietjen](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/quietjen/32/713_2.png) [@quietjen](https://nextstrain.discourse.group/u/quietjen)\
**Post date:** [October 2, 2025, 11:27pm UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995/7 "2025-10-02T23:27:30Z")

</div>

After some [internal discussion](https://github.com/nextstrain/dengue/issues/114), we ended up revamping how to spike in sequences into the dengue workflow. Based on your provided config, the key change is in the `phylogenetic/defaults/config_dengue.yaml` file when [defining inputs here](https://github.com/nextstrain/dengue/blob/61c6f2d1c57b85bd8b0a5bd5dc29e867d36c1f8f/phylogenetic/defaults/config_dengue.yaml#L5-L11) which you can modify to something like:

```yaml
inputs:
  - name: ncbi
    metadata: "https://data.nextstrain.org/files/workflows/dengue/metadata_{serotype}.tsv.zst"
    sequences: "https://data.nextstrain.org/files/workflows/dengue/sequences_{serotype}.fasta.zst"

# move local data within phylogenetic folder if possible
additional_inputs:
  - name: local
    metadata: "try/example_data/sequences_{serotype}.fasta"
    sequences: "try/example_data/metadata_{serotype}.tsv"

```

And test by running:

```bash
nextstrain build phylogenetic auspice/dengue_denv3_genome.json

```

Please see the “[Adding your own data](https://github.com/nextstrain/dengue/tree/main/phylogenetic#adding-your-own-data)” section in the repository for full details on how to configure this.

---

<div class="post-metadata">

**Author:** ![Soon\_tare](https://avatars.discourse-cdn.com/v4/letter/s/ac8455/32.png) [@Soon\_tare](https://nextstrain.discourse.group/u/Soon_tare)\
**Post date:** [November 3, 2025, 8:22am UTC](https://nextstrain.discourse.group/t/filter-for-create-dengue-phylogenetic-tree/1995/8 "2025-11-03T08:22:44Z")

</div>

Thank you for your suggestion, @quietjen. I will try and study in detail by recommended section.
