Requested color-by field 'num_date' does not exist

Hello! I am loving Nextstrain and currently attempting to create pathogen repositories for two poultry-related viruses. For one of the viruses, I was able to successfully run the default pathogen-repo-guide ingest workflow and I’m now trying to create a phylogenetic workflow (created from the pathogen-repo-guide repository template and modified using the measles repo to allow for analysis of just one gene). The workflow successfully runs, but during augur export v2 I get the warning message WARNING: Requested color-by field 'num_date' does not exist and will not be used as a coloring or exported. When I look at the created JSON file on https://auspice.us/, ‘Sampling date’ is not an option to “Color By” or “Filter Data”. I’m sure this is something very basic, but I’m completely stumped. The ingest workflow creates an output metadata file with the column ‘date’, but neither ‘date’ or ‘num_date"‘ seem to work in the auspice_config.json file:

  {
    "key": "num_date",
    "title": "Date",
    "type": "continuous"
  },

Any help would be greatly appreciated. Thanks so much!

Hi @eam,

In your phylogenetic workflow, are you running augur refine to produce a time tree?

Usually, augur refine produces an output branch_lengths.json that includes the numdate attribute for each node. Then, the branch_lengths.json is passed as an input to augur export v2 where numdate is renamed to num_date to be used for the time tree display in Auspice.

If you are not producing a time tree, then I’d just remove the num_date coloring from your auspice_config.json.

-Jover

Wow, I feel silly. I was running augur refine, but somehow deleted the --timetree flag. I do get dates now. I did notice that when no sampling date was provided (i.e. XX-XX-XXXX), the date in auspice is 1. The reference date is also listed as -77. Is this to be expected?

Thank you so much for your continued help!

augur refine infers the most likely date for nodes with ambiguous dates using TreeTime, which outputs negative values to indicate BCE years. If you know these inferred dates are too early, you can specify boundaries for the year with the --year-bounds option. For example, if you analysis only includes data from 2020 and after, you can add --year-bounds 2020. If your data is from 2020 to 2024, you can add --year-bounds 2020 2024.