nextstrain / augur

Pipeline components for real-time phylodynamic analysis
https://docs.nextstrain.org/projects/augur/
GNU Affero General Public License v3.0
268 stars 128 forks source link

ENH: Allow specification of node_data key that augur clades outputs #1027

Open LauraU123 opened 1 year ago

LauraU123 commented 1 year ago

Context

Sometimes one wants to use multiple independent clade systems, like clade, outbreak, lineage in monkeypox or whole genome clade and G gene clade in RSV

Right now, augur clades always outputs a node data json with a magic fixed key clade_membership.

It would be nice if one could optionally adjust this key name through a CLI argument to augur clades.

That would save a lot of sed commands that are necessary otherwise in multiple scripts.

tsibley commented 1 year ago

Making this adjustable makes sense to me. There's a few places in Augur and Auspice which special-case the clade_membership field. We'd potentially want to make the special-cased behaviour also apply to augur clades output that used other field names.

jameshadfield commented 1 year ago

This should be solved shortly with the merge of #728. This will allow you to specify the key for nodes which belong to the clade via --membership-name as well as setting a custom branch label name for the clade via --label-name.