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 · 6 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

@genehack
Copy link

genehack commented Dec 4, 2024

I no longer see this collapse when toggling between the "TIME" and "DIVERGENCE" views of the tree — which I think is the current equivalent to the "turn off timetree" option that @huddlej is referencing.

I'm going to close this issue; if I'm incorrect and the problem still exists, please re-open it (maybe with updated reproduction steps).

@genehack genehack closed this as completed Dec 4, 2024
@huddlej
Copy link
Contributor Author

huddlej commented Dec 5, 2024

@genehack Thanks for the bump on this issue. The problem is still there, at least for me in Firefox. If you go to the private site and click the "timetree" checkbox under "Options" on the left control panel, the divergence tree still gets collapsed to one position on the x-axis. The default page doesn't load fully in Chrome for me, so I can't confirm whether the issue is browser-specific.

Edit: I forgot to say that @joverlee521's work on this new measurements panel feature should allow us to sunset the private nextflu site completely, so I think our efforts are best spent in that direction instead of fixing this issue.

@huddlej huddlej reopened this Dec 5, 2024
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

3 participants