-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sampling year coloring #12
Conversation
For builds where we've chosen not to infer a timetree it's still very useful to communicate the sampling date. Here we export the year which forms a nice continuous coloring. (An ordinal coloring would be better but the date range in this dataset means Auspice repeats colors which isn't ideal. Temporal coloring will be better once it accepts YYYY-MM-DD strings, but as of Auspice 2.55 it interprets integers as January 1st.)
Not yet exported as a coloring (year is preferable, see previous commit) but this allows the sampling date to appear when clicking on tips and as a filtering option.
@@ -30,7 +31,7 @@ rule export: | |||
--tree {input.tree} \ | |||
--metadata {input.metadata} \ | |||
--metadata-id-columns {params.strain_id} \ | |||
--node-data {input.branch_lengths} {input.nt_muts} {input.aa_muts} \ | |||
--node-data {input.branch_lengths} {input.nt_muts} {input.aa_muts} {input.year} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not asking for a change, just curious
Instead of making another node-data JSON, why not just add a year
column to the metadata.tsv that can be used directly as a coloring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found the approach here cleaner to implement, although if other rules used the data I'd have probably gone for modifying the TSV. It should also be trivial to copy & paste into other workflows which would benefit from this. Of course, once Auspice has a proper temporal scale this'll all be removed anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps analogous to avian-flu where we currently add in a column (H5 LABEL) to the TSV but want to switch away from this to a node-data JSON
For builds where we've chosen not to infer a timetree it's still very useful to communicate the sampling date. Here we export the year which forms a nice continuous coloring. (An ordinal coloring would be better but the date range in this dataset means Auspice repeats colors which isn't ideal. Temporal coloring will be better once it accepts YYYY-MM-DD strings, but as of Auspice 2.55 it interprets integers as January 1st.)
We also export the date string, which is shown when clicking on tips is available as a filtering option.