Skip to content

fix: allow numeric keys in Auspice coloring scale#1764

Merged
ivan-aksamentov merged 1 commit into
masterfrom
victorlin/fix-auspice-coloring-scale
Apr 15, 2026
Merged

fix: allow numeric keys in Auspice coloring scale#1764
ivan-aksamentov merged 1 commit into
masterfrom
victorlin/fix-auspice-coloring-scale

Conversation

@victorlin
Copy link
Copy Markdown
Member

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

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
@victorlin victorlin force-pushed the victorlin/fix-auspice-coloring-scale branch from 3491347 to 1c14ba0 Compare April 14, 2026 22:54
@github-actions
Copy link
Copy Markdown

@ivan-aksamentov
Copy link
Copy Markdown
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.fasta

Web 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.fasta

CLI:

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"

@ivan-aksamentov ivan-aksamentov merged commit 1c14ba0 into master Apr 15, 2026
20 checks passed
@ivan-aksamentov ivan-aksamentov deleted the victorlin/fix-auspice-coloring-scale branch April 15, 2026 05:34
@ivan-aksamentov
Copy link
Copy Markdown
Member

Released in 3.21.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error with external Nextclade dataset

2 participants