Skip to content

Commit d77297e

Browse files
committed
Restore clades to top entry in colorings
The intention of the coloring logic is that if an auspice-config provides the clade_membership key then it is exported at that position in the colorings list. If clade_membership is not explicitly set in the config (but is present in a node-data file) then we have (for a very long time) added it as the very first entry in the colorings list. PR #728 (augur v22.0.0) erroneously modified the behavior of the second case described above, which has now been restored by this commit.
1 parent 5daf6e8 commit d77297e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

augur/export_v2.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,9 @@ def node_data_prop_is_normal_trait(name):
798798
"authors", # authors are set as a node property, not a trait property
799799
"author", # see above
800800
"vaccine", # vaccine info is stored as a "special" node prop
801+
'clade_membership', # explicitly set as a coloring if present
801802
'branch_length',
802-
'num_date',
803+
'num_date', # explicitly set as a coloring if present
803804
'raw_date',
804805
'numdate',
805806
'clock_length',

tests/functional/export_v2/dataset-with-branch-labels.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
},
2626
"colorings": [
2727
{
28-
"key": "gt",
29-
"title": "Genotype",
28+
"key": "clade_membership",
29+
"title": "Clade",
3030
"type": "categorical"
3131
},
3232
{
33-
"key": "clade_membership",
34-
"title": "Clade",
33+
"key": "gt",
34+
"title": "Genotype",
3535
"type": "categorical"
3636
}
3737
],

0 commit comments

Comments
 (0)