fix: allow numeric keys in Auspice coloring scale#1764
Merged
Conversation
The Auspice v2 JSON schema specifies that scale entries are two-element arrays where the first item can be either string (categorical) or numeric (continuous).¹ The previous type did not allow numeric keys and would fail to deserialize Auspice JSONs with continuous colorings. ¹ https://nextstrain.org/schemas/auspice/config/v2#/properties/colorings/items/properties/scale
3491347 to
1c14ba0
Compare
Member
|
Thanks! Seems to be working! Web Prod: https://clades.nextstrain.org?dataset-json-url=https://nextstrain.org/rsv/a/genome/6y&input-fasta=https://data.clades.nextstrain.org/v3/nextstrain/rsv/a/EPI_ISL_412866/2024-01-16--20-31-02Z/sequences.fastaWeb PR: https://nextstrain--nextclade--pr-1764.previews.neherlab.click?dataset-json-url=https://nextstrain.org/rsv/a/genome/6y&input-fasta=https://data.clades.nextstrain.org/v3/nextstrain/rsv/a/EPI_ISL_412866/2024-01-16--20-31-02Z/sequences.fastaCLI: curl -fSSLo "rsv_a_auspice.json" -H "Accept: application/json" "https://nextstrain.org/rsv/a/genome/6y"
curl -fSSLo "rsv_a_sequences.fasta" "https://data.clades.nextstrain.org/v3/nextstrain/rsv/a/EPI_ISL_412866/2024-01-16--20-31-02Z/sequences.fasta"
./docker/dev r nextclade -- run --input-dataset "rsv_a_auspice.json" "rsv_a_sequences.fasta" --output-tsv "rsv_a_results.tsv" |
Member
|
Released in 3.21.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Auspice v2 JSON schema specifies that scale entries are two-element arrays where the first item can be either string (categorical) or numeric (continuous).¹ The previous type did not allow numeric keys and would fail to deserialize Auspice JSONs with continuous colorings.
¹ https://nextstrain.org/schemas/auspice/config/v2#/properties/colorings/items/properties/scale
Feel free to make any edits!
Closes nextstrain/rsv#129