Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divergence (mutations) on the root node are ignored by augur export #734

Open
jameshadfield opened this issue Jun 8, 2021 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jameshadfield
Copy link
Member

jameshadfield commented Jun 8, 2021

Current Behaviour
Datasets produced from augur export v2 require a divergence value to be set on the root node via a node-data JSON (under keys "mutation_length" or "branch_length") however the supplied divergence value is not used. All trees start with a divergence value of zero.

Expected behaviour
The provided divergence value at the root should be used.

(My understanding is that Newick trees can define divergence values ("length") for the root node, but if this is not the case then we should throw an error if the provided value is not zero.)

Possible solution
The best time to implement this may be in conjunction with #273 which will give augur export v2 the ability to read divergence from Newick trees.

The bug occurs because we initially call the recursive function convert_tree_to_json_structure using the default 3rd argument so that div=0 rather than using a provided root-node value (if provided).

Your environment: if running Nextstrain locally

  • augur 12.0.0

Additional context
A related bug is that the root node must have "mutation_length" or "branch_length" as a key, else we don't set any divergence values in the resulting dataset.

@jameshadfield jameshadfield added the bug Something isn't working label Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant