Skip to content

Conversation

@kimandrews
Copy link
Contributor

Description of proposed changes

Since we're not inferring a timetree, this PR allows visualization of the sampling date by:

  • Enabling coloring by sampling year
  • Allowing sampling date to appear when clicking on tips and as a filtering option

Example output: https://nextstrain.org/staging/tb/colorbyyear

These changes are similar to those made to the rabies repo:
https://github.com/nextstrain/rabies/pull/12/commits

Related issue(s)

This addresses part of #34, but does not address recency coloring

Checklist

  • Checks pass
  • Update changelog

Since we're not inferring a timetree, this allows us to communicate the sampling date by enabling coloring by sampling year.

This follows the changes made in nextstrain/rabies#12
Allows sampling date to appear when clicking on tips and as a filtering option
Copy link
Member

@jameshadfield jameshadfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good (but didn't test)

If you change the (auspice-config) coloring to be categorical you can display the legend in different ways, but it's a little more work as you would want to define the ordering of the years so that they're chronological. This is what I did for ebola

Image

@joverlee521
Copy link
Contributor

+1 for James' suggestion of using categorical display of year to avoid the weird 2007.99 display in the legend.

I think it should be straight-forward to copy the get-year.py script from ebola and use it here. (This would also adhere to our Snakemake style guide to avoid run blocks)

@jameshadfield
Copy link
Member

I think it should be straight-forward to copy the get-year.py script from ebola and use it here.

One improvement (which I have been meaning to make there): rather than suggest a colouring block for the JSON, write them out in a colors.tsv which (I think!) will still result in the desired legend ordering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants