export v2: metadata ID column not used if strain
column already exists in the metadata
#1262
Labels
bug
Something isn't working
Reviewing #1261 and the related nextstrain/mpox#161 made me realize that
augur export v2
does not use the provided metadata ID column if "strain" already exists as a column in the metadata.Looking at the outputs of the monkeypox CI run for the PR, when the "strain" and "accession" columns have different values, the final Auspice JSON will be missing attributes from the metadata. For example, the sequence
MPXV_USA_2022_FL001
is missing "region", "country" and "host" attributes even though they are available in the example metadata.tsvThe issue comes from how
export v2
adds metadata to the treenode_attrs
.The metadata gets added using the hard-coded
strain
fieldaugur/augur/export_v2.py
Lines 1018 to 1024 in 9ef4711
However, the metadata ID column only gets assigned to the
strain
field ifstrain
does not already exist in the metadataaugur/augur/export_v2.py
Lines 1081 to 1083 in 9ef4711
Potential fix: 9741279
The text was updated successfully, but these errors were encountered: