-
Notifications
You must be signed in to change notification settings - Fork 162
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
Type cast continuous values in tree #1655
Conversation
Thanks for working on this! It doesn't fix the issue in my test (maybe I'm testing wrong?) Repro
See results (still not showing negative): Maybe I'm testing wrong, see #1656 |
@corneliusroemer You'll need to |
The README does mention this briefly, but uses |
Thanks @tsibley! I'm still struggling unfortunately. Can you adapt this script to show me how to use what you suggest? This:
doesn't seem to work. Neither does
Edit: I'm getting errors building, see #1656 (comment) |
You'll need to say more about what's not working… |
Sorry, I didn't see the error at first: getting build error, see #1656 (comment) |
Ah, now it works with test build: https://nextstrain-s-nextstrain-joyhi6.herokuapp.com/ncov/gisaid/global/6m?c=immune_escape&l=scatter&scatterX=ace2_binding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jameshadfield! Reviewing this forced me to read more about isNaN
and Number
. Never realized they worked in such unexpected ways.
2504ac7
to
c7ac36f
Compare
Conceptually these values only make sense if they are numeric. Previously some implicit casting was happening, but this resulted in bugs such as negative values not being cast and thus not displayed in the scatterplot. Note one slight side-effect which may be considered a regression: previously string values which were not numbers (e.g. "abc" but not "1.0") would show up in the hover/click info-boxes. Now such values will be changed to `undefined` and therefore not shown in those info-boxes. Timing of the changes introduced here (AppleM1, Firefox 111): * nextclade/sars-cov-2/21L 7-9ms * ncov/gisaid/global/6m 4-10ms * zika 2ms Closes #1626
c7ac36f
to
eca540e
Compare
Conceptually these values only make sense if they are numeric. Previously some implicit casting was happening, but this resulted in bugs such as negative values not being displayed in the scatterplot.
Note one slight side-effect which may be considered a regression: previously string values which were not numbers (e.g. "abc" but not "1.0") would show up in the hover/click info-boxes. Now such values will be changed to
undefined
and therefore not shown in those info-boxes.Timing of the changes introduced here (AppleM1, Firefox 111):
Closes #1626