# Advice on organizing wildcards phylogenetic workflow

**URL:** <https://nextstrain.discourse.group/t/advice-on-organizing-wildcards-phylogenetic-workflow/2270>\
**Category:** Help and Getting Started\
**Created:** [September 23, 2026, 8:47pm UTC](https://nextstrain.discourse.group/t/advice-on-organizing-wildcards-phylogenetic-workflow/2270 "2026-09-23T20:47:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eam](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eam](https://nextstrain.discourse.group/u/eam)\
**Post date:** [September 23, 2026, 8:47pm UTC](https://nextstrain.discourse.group/t/advice-on-organizing-wildcards-phylogenetic-workflow/2270/1 "2026-09-23T20:47:37Z")

</div>

I am hoping to _eventually_ create and maintain a Nextclade dataset of a currently unsupported pathogen and I’m looking for a little advice on how to organize the phylogenetic workflow. My pathogen has multiple subtypes and and several genes people traditionally use to generate phylogenetic trees. I would like to be able to be able to select the “change dataset” option in Auspice to view data for each combination of subtype and gene, but **I’m unsure about the best way to define the `subtype` and `gene` wildcards within the phylogenetic workflow**. I was looking at the [Nextstrain repository for measles](https://github.com/nextstrain/measles) where they define each combination of gene-geography as a seprate build via the [defaults/config.yaml file](https://github.com/nextstrain/measles/blob/main/phylogenetic/defaults/config.yaml) and the [Snakefile](https://github.com/nextstrain/measles/blob/main/phylogenetic/Snakefile). Would this be the ideal way to set things up? I’m relatively inexperienced with Nextstrain, Nextclade, and Snakemake so I want to make sure I start “correctly” from the very beginning! Thanks so much in advance.

---

<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:** [September 23, 2026, 9:12pm UTC](https://nextstrain.discourse.group/t/advice-on-organizing-wildcards-phylogenetic-workflow/2270/2 "2026-09-23T21:12:06Z")

</div>

Hi @eam,

Yes, I would recommend following the pattern in the measles repo. It’s relatively new so we don’t have any documentation for it, but basically the full dataset name is captured by a `build` wildcard which can be broken down into different parts separated by `/`. Each part gets its own dropdown in Auspice.

As you mentioned, the measles datasets are named with two parts: `{gene}/{geography}`. `gene` is used as a wildcard in the workflow because there are gene-specific Snakemake rules. On the other hand, there are no geography-specific Snakemake rules so it doesn’t need to be defined as a wildcard in the workflow.

---

<div class="post-metadata">

**Author:** ![eam](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@eam](https://nextstrain.discourse.group/u/eam)\
**Post date:** [September 23, 2026, 9:38pm UTC](https://nextstrain.discourse.group/t/advice-on-organizing-wildcards-phylogenetic-workflow/2270/3 "2026-09-23T21:38:22Z")

</div>

Thank you _so_ much! I assume it makes the most sense to start with [the basic pathogen repository](https://github.com/nextstrain/pathogen-repo-guide) and go from there?

---

<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:** [September 23, 2026, 10:46pm UTC](https://nextstrain.discourse.group/t/advice-on-organizing-wildcards-phylogenetic-workflow/2270/4 "2026-09-23T22:46:17Z")

</div>

Yes, you can use the pathogen-repo-guide for initial file structure. From there, you can refer to the [Creating a phylogenetic workflow](https://docs.nextstrain.org/en/latest/tutorials/creating-a-phylogenetic-workflow.html) tutorial to understand the individual steps of the workflow, and the measles repo to understand how to implement in Snakemake.
