How to create transmission lines for divisions

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, 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.

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

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

1 Like

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

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

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 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 in that file.

2 Likes

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

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 where we have the ~130 divisions from North America, but where division outside North America is collapsed to Africa, Asia, Europe, etc…