nextstrain/auspice

Support grouping measurements within each panel row by a measurement data field

huddlej opened this issue · 0 comments

Description

Also referred to as "2 x group-bys", this feature would allow users to group measurements within each row (grouping) by a field in the measurements data instead of grouping by a coloring of the tree. A specific use case is the need to view measurements for a given reference strain by collaborating center (CC) to see how the measurements compare across centers. Another similar use case is the need to group measurements for a single reference strain by the ferret used, to see how much variation exists across ferrets for the same test viruses.

Our current hack to view measurements by reference and CC is to annotate the measurements data frame with a custom "reference_strain_source" field that concatenates reference_strain and source values and then export this new field as a grouping in the measurements config JSON.

As @rneher originally noted in Slack:

there will often be multiple measurements between a given test and reference strains. on different days, with different sera, by different center. In the past, people have been quite interested in know which one is which and we have had the check boxes to select and deselect individual sera/lots/ferrets

In the same thread, @trvrb noted:

This said, in the current UI design I don't think we had an affordance for displaying rows as who_cc x serum_clade (for example). Good to keep in mind that we might want to allow multiple groupings.

[The current within-row grouping implementation] benefits from coloring based on clade. Going to be harder to distinguish "sub-rows" without different colors. But the basic idea of having rows of different serum strains and then "sub-rows" split by CC should work (with labeling on the left-hand side). I'd like to reserve colors to match with the global Auspice coloring as we do for the tree, map and frequencies.