-
Notifications
You must be signed in to change notification settings - Fork 163
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
Check mutation type against tree #709
Conversation
Previously we assumed that aa mutations were present and defaulted to this (currently unable to be changed by the URL query). This commit checks the default mutType ("aa") against the nodes, falling back to "nuc" if available, or "null" if neither are present. Additionally, we now collect available node attrs across all nodes, not just the root node, which results in an increased and more accurate set of attrs. Performance penalty on my laptop: 1-3ms.
rendering function names changed to improve clarity
If no annotations are provided, the default geneLength object is `{}` which shouldn't be validated against. This commit changes decodeColorByGenotype to only validates against objects with keys.
d34c075
to
c2bfcb9
Compare
@jameshadfield Thanks for these fixes! I'm not sure I see where the default It seems like at the very least there should be a |
https://github.com/nextstrain/auspice/blob/master/src/reducers/controls.js#L38
Not if annotations aren't defined in the metadata json. |
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 ! I only have two datasets like this, but this fix seems to work for them both - mutations displaying on hover as expected, and able to colour by nuc position.
Thank again!
Ah, I see. I was thinking auspice could/did compute the nucleotide length itself. |
I'm going to go ahead and merge this. Going on Emma's specific feature testing and I can't find any regressions. |
This PR sets
mutType
intelligently according to what mutations are available on the tree. Furthermore, it allows nuc-genotype colorBy values for datasets lacking gene annotations in the metadata JSON.Tested against a number of datasets with no regressions seen, but @emmahodcroft please try on a few more!
Please note that any d3-transition errors encountered are unrelated to this -- see #708.Update: Rebased onto v1.36.1 so that there should be no install / d3-related errors.@tsibley may care to examine d34c075.