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

Ordinal values are not assigned colors from color ramp in the frequencies panel #843

Closed
huddlej opened this issue Jan 9, 2020 · 1 comment · Fixed by #1578
Closed

Ordinal values are not assigned colors from color ramp in the frequencies panel #843

huddlej opened this issue Jan 9, 2020 · 1 comment · Fixed by #1578
Assignees
Labels
bug Something isn't working

Comments

@huddlej
Copy link
Contributor

huddlej commented Jan 9, 2020

On the live flu builds, epitope mutations and other mutation metrics are defined as “ordinal” types in the auspice config JSON. These metrics get colors in the tree from a color ramp, but the frequencies panel shows gray for all values. This issue does not affect categorical or continuous values.

For example, epitope mutations appear like so in the frequencies panel:

image

While we would expect them to appear like the continuous distance to the future values:

image

@huddlej huddlej added the bug Something isn't working label Jan 9, 2020
@huddlej huddlej self-assigned this Jan 9, 2020
@jameshadfield
Copy link
Member

jameshadfield commented Jan 9, 2020

👍 I don't think this is an ordinal vs discrete issue, rather a problem of numeric values converted to strings when inserted into a dict (object). There was a similar (unrelated) issue a while ago which was fixed by storing the data in Map() objects which will preserve the type of the keys.

jameshadfield added a commit that referenced this issue Oct 20, 2022
The underlying bug was a type-inconsistency whereby color-by values
can be numeric however the matrix was stored as an Object (where keys
are always stringified) and so `matrix[numeric_colorBy_value]=undefined`.
Switching to a Map() allows typed keys and fixes this bug.

Closes #843
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

Successfully merging a pull request may close this issue.

2 participants