# How to create transmission lines for divisions

**URL:** <https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169>\
**Category:** Help and Getting Started\
**Created:** [October 25, 2020, 12:53am UTC](https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169 "2020-10-25T00:53:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ldelaye](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/ldelaye/32/174_2.png) [@ldelaye](https://nextstrain.discourse.group/u/ldelaye)\
**Post date:** [October 25, 2020, 12:53am UTC](https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169/1 "2020-10-25T00:53:29Z")

</div>

Hi everybody, I just installed Nextstrain for ncov (following the tutorial) and everything is going fine. However, when viewing the results in [https://auspice.us](https://auspice.us), the only transmission lines showing are those for country. I would like to configure to see transmission lines for division. How can I do this? Thanks in advance! Luis Delaye.

---

<div class="post-metadata">

**Author:** ![nextstrainuser](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@nextstrainuser](https://nextstrain.discourse.group/u/nextstrainuser)\
**Post date:** [December 30, 2020, 5:09pm UTC](https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169/2 "2020-12-30T17:09:37Z")

</div>

Hi Luis, were you able to figure this out? I’m running into the same issue.

---

<div class="post-metadata">

**Author:** ![ldelaye](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/ldelaye/32/174_2.png) [@ldelaye](https://nextstrain.discourse.group/u/ldelaye)\
**Post date:** [December 30, 2020, 6:58pm UTC](https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169/3 "2020-12-30T18:58:34Z")

</div>

Hi, no, I haven’t been able to figure this out. I’m still looking to know how to include transmission lines at that level.  
Best,  
Luis

---

<div class="post-metadata">

**Author:** ![trvrb](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trvrb/32/2_2.png) [@trvrb](https://nextstrain.discourse.group/u/trvrb)\
**Post date:** [March 6, 2021, 11:57pm UTC](https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169/5 "2021-03-06T23:57:05Z")

</div>

Hi @ldelaye and @nextstrainuser. To get transmission lines, you’ll need to have run `augur traits` to reconstruct ancestral node states for the trait of interest. For the `ncov` workflow you’ll need to modify the config code in a couple of places to make this happen:

Set `traits` and then your build name to swap from `country_exposure` to `division_exposure`: [Customizing analysis — Nextstrain documentation](https://docs.nextstrain.org/en/latest/tutorials/SARS-CoV-2/steps/customizing-analysis.html#ancestral-trait-reconstruction)

I _think_ this alone should be sufficient to allow toggling of transmission lines on for “division” resolution.

---

<div class="post-metadata">

**Author:** ![james](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/james/32/11_2.png) [@james](https://nextstrain.discourse.group/u/james)\
**Post date:** [March 8, 2021, 1:25am UTC](https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169/6 "2021-03-08T01:25:30Z")

</div>

In addition to @trvrb’s comment re: `augur traits`, you’ll also have to add “division” to the auspice-config JSON so that we know to export this as a geographic trait – e.g. see the [example\_advanced\_customization](https://github.com/nextstrain/ncov/blob/master/my_profiles/example_advanced_customization/auspice_config_swiss.json#L87-L92) from the ncov repo which does this. Depending on what values there are for “division” you may also need to specify custom lat/longs for these via the config YAML for your build (`config["files"]["lat_longs"]`); if so then you should also include [the pipeline’s default lat/longs](https://github.com/nextstrain/ncov/blob/master/defaults/lat_longs.tsv) in that file.

---

<div class="post-metadata">

**Author:** ![ldelaye](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/ldelaye/32/174_2.png) [@ldelaye](https://nextstrain.discourse.group/u/ldelaye)\
**Post date:** [March 12, 2021, 5:52pm UTC](https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169/7 "2021-03-12T17:52:22Z")

</div>

Thanks a lot @trvrb and @james, it did work! I just found that there seems to be a limit to the number of “states” TimeTree can handle. If I use the “region\_global” subsampling scheme and try to draw transmission lines between divisions, I get this error message:  
ERROR: 300 or more distinct discrete states found. TreeTime is currently not set up to handle that many states.  
The problem is solved when I change to the “country” subsampling scheme. I suppose that the number of divisions is greatly reduced in this scheme.  
Best,  
L

---

<div class="post-metadata">

**Author:** ![trvrb](https://yyz1.discourse-cdn.com/flex031/user_avatar/nextstrain.discourse.group/trvrb/32/2_2.png) [@trvrb](https://nextstrain.discourse.group/u/trvrb)\
**Post date:** [March 12, 2021, 7:24pm UTC](https://nextstrain.discourse.group/t/how-to-create-transmission-lines-for-divisions/169/8 "2021-03-12T19:24:15Z")

</div>

Glad that the bioinformatic issue was solved. I’ve somewhat frequently run into this 300 discrete state limit in TreeTime. If I’m really curious, I’ll modify TreeTime source code to allow up to 500 states. But generally, it would be better to collapse some “divisions” that are of less interest. Thus you could have something like [auspice](https://nextstrain.org/ncov/north-america?c=division&transmissions=show) where we have the ~130 divisions from North America, but where division outside North America is collapsed to Africa, Asia, Europe, etc…
