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 tree does not display properly on the x-axis for nextflu site #61

Open
huddlej opened this issue Apr 20, 2021 · 4 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@huddlej
Copy link
Contributor

huddlej commented Apr 20, 2021

Current Behavior
The time tree view on nextflu works as expected:

image

When one deselects the "timetree" option to view the divergence tree, the tree collapses to one position on the x-axis:

image

Expected behavior

The divergence view should show the branch length in divergence along the x-axis.

How to reproduce
Steps to reproduce the current behavior:

  1. Navigate to nextflu site
  2. Deselect "timetree" checkbox under "Options" in the left-hand navigation

Additional context

It is not clear if this issue is with the seasonal-flu build's tree JSONs or the nextflu code itself. In the latter case, we should transfer this issue to the nextflu repository.

@huddlej huddlej added the bug Something isn't working label Apr 20, 2021
@joverlee521
Copy link
Contributor

The seasonal-flu build's tree JSONs are missing the xvalue attribute leading to a NaN value in the nextflu code.
The xvalue attribute should be included in the augur v1 export, but it's not guaranteed since it's technically a deprecated attribute.

@huddlej
Copy link
Contributor Author

huddlej commented Apr 20, 2021

Great catch! Would it be reasonable to update the calculation of branch lengths in nextflu to use the branch_length attribute we export in the auspice JSONs instead of the missing xvalue parameter?

We probably don't want to start exporting a deprecated field just for nextflu and updating the nextflu code would allow all existing datasets to work as they are without regenerating them...

@joverlee521
Copy link
Contributor

When the "timetree" is off, the d3 x value gets assigned to the xvalue. So all downstream d3 transformations error out with the NaN x value.

@joverlee521
Copy link
Contributor

joverlee521 commented Apr 21, 2021

If I assign the d3 x value to node.attr['div'], this results in a divergence view with no gridlines. From what I can see, the drawGrid() function only applies to the timetree view. Is this the expected behavior?

Screen Shot 2021-04-21 at 10 21 55 AM

Edit: see blab/nextflu#154

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

2 participants