WARNING: You asked for a color-by for trait , but it has no values on the tree

The augur export doesn’t seem to recognize my metadata and associate it with my tree… I think?

log excerpt:

        augur export v2             --tree results/new-york/tree.nwk             --metadata results/new-york/metadata_adjusted.tsv.xz             --node-data results/new-york/branch_lengths.json results/new-york/nt_muts.json results/new-york/aa_muts.json results/new-york/emerging_lineages.json results/new-york/clades.json results/new-york/recency.json results/new-york/traits.json results/new-york/logistic_growth.json results/new-york/mutational_fitness.json results/new-york/distances.json results/new-york/epiweeks.json             --auspice-config my_profiles/nyc-local/ny_auspice_config.json             --include-root-sequence             --colors results/new-york/colors.tsv             --lat-longs my_profiles/nyc-local/lat_longs.tsv             --title 'Genomic epidemiology of novel coronavirus - New York-focused subsampling'             --description results/new-york/description.md             --output results/new-york/ncov_with_accessions.json 2>&1 | tee logs/export_new-york.txt

WARNING: You asked for a color-by for trait 'legacy_clade_membership', but it has no values on the tree. It has been ignored.

WARNING: You asked for a color-by for trait 'pangolin_lineage', but it has no values on the tree. It has been ignored.

WARNING: You asked for a color-by for trait 'zip_code', but it has no values on the tree. It has been ignored.

WARNING: You asked for a color-by for trait 'borough', but it has no values on the tree. It has been ignored.

WARNING: You asked for a color-by for trait 'ethnicity', but it has no values on the tree. It has been ignored.

WARNING: You asked for a color-by for trait 'date_of_death', but it has no values on the tree. It has been ignored.

WARNING: You asked for a color-by for trait 'specimen_type', but it has no values on the tree. It has been ignored.

Config excerpt:

  "title": "Genomic epidemiology of novel coronavirus",
  "build_url": "https://github.com/nextstrain/ncov",
  "maintainers": [
    {"name": "NYC DOHMH", "url": "https://nyc.gov/health"}
  ],
  "colorings": [
    {
      "key": "legacy_clade_membership",
      "title": "Old Nextstrain clade",
      "type": "categorical"
    },

Any help appreciated,
Michelle

Adding metadata excerpt (mildly edited to remove any PII):

strain  virus   gisaid_epi_isl  genbank_accession       date    region  country division        location        region_exposure    country_exposure        division_exposure       segment length  host    age     sex     Nextstrain_clade   pangolin_lineage        GISAID_clade    originating_lab submitting_lab  authors url     title   paper_url date_submitted   purpose_of_sequencing   accession_number        wgs_id  race    ethnicity       specimen_type   deceased   date_of_death   borough zip_code        investigation   VB      RI      S_E484K S_N501Y S_L5F   S_T95I  S_D253G    S_S477N S_L452R S_K417NT        ct_value
seq1   ncov    NULL    NULL    2022-01-01                      NULL    NULL    NULL    NULL       North America   USA     New York        genome  29838   human   00      Female  NULL    BA.2    NULL    chelsea    New York City Public Health Laboratory  ?       ?       ?       ?       2022-01-01      ?       0000000000000 seq1     Unknown NULL    Nasopharynx     ?       NULL    NULL    NULL    Quickie Labs    ?       ? FALSE    TRUE    FALSE   FALSE   FALSE   FALSE   FALSE   TRUE    19.5
seq2   ncov    NULL    NULL    2022-01-01                      NULL    NULL    NULL    NULL       North America   USA     New York        genome  29867   human   00       Male    NULL    BA.1.1  NULL    chelsea    New York City Public Health Laboratory  ?       ?       ?       ?       2022-01-01      ?       000000000000 seq2     Unknown NULL    Nasopharynx     ?       NULL    NULL    NULL    Quickie Labs    ?       ? UNK      UNK     FALSE   TRUE    FALSE   UNK     UNK     FALSE   25.1

I wonder whether your metadata file is read appropriately by augur filter. Can you try reading in an uncompressed version, without .xz ending?

Where do you specify that you want all these traits colored? They don’t appear in your config? Or only in the colors.tsv?

You may need to add a parameter to augur filter of --color-by-metadata followed by all the metadata columns you want included. See augur export — Augur 14.0.0 documentation

Thanks for the suggestions!

Reading it in uncompressed does not change the error.

I specify it in the config file which I only posted an excerpt of previously.

I did get one of the traits to show up with the config as below. Previously it had the key specified as pangolin_lineage (which is how it is in the metadata that is fed into nextstrain ncov pipeline) but which is later renamed by default/parameters.yaml to pango_lineage in the subsequent metadata_adjusted.tsv. However, columns such as zip_code do not get renamed.

{
      "key": "pango_lineage",
      "title": "Pangolin lineage",
      "type": "categorical"
    },

Even specifying --color-by-metadata does not fix the issue. The metadata file is quite large so could have some peculiarities to the field values but is standardized to a degree by being exported out of a SQL database.

Hi @msu4,

augur export matches the metadata with the nodes in the tree via the strain name provided in the strain column. Can you confirm that the strain names in the metadata match the strain names in results/new-york/tree.nwk?

Also quick note, I don’t see the legacy_clade_membership column in your metadata excerpt.