Skip to content
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

Export fails validation without useful error message when using key for metadata-id-column for coloring as well #1322

Open
corneliusroemer opened this issue Sep 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@corneliusroemer
Copy link
Member

corneliusroemer commented Sep 26, 2023

Current Behavior

When using --metadata-id-column accession and also having that as a coloring in auspice_config.json, e.g. {key:accession,....}, I get an auspice validation error that's hard to understand.

Expected behavior

A) User gets useful error message instead of validation error if it's not allowed to use id column as coloring
B) Document that it's not allowed to export id column as coloring

How to reproduce

Steps to reproduce the current behavior:

  1. Unpack: exportbug.tzst.txt
  2. Run:
 augur export v2             --tree results/MPXV/tree.nwk             --metadata results/MPXV/metadata.tsv             --node-data results/MPXV/branch_lengths.json results/MPXV/nt_muts.json results/MPXV/clades.json             --colors results/MPXV/colors.tsv             --auspice-config resources/MPXV/auspice_config.json             --include-root-sequence             --metadata-id-columns accession             --output auspice/nextclade_mpox_MPXV.json
  1. See error:
$ augur export v2             --tree results/b1/tree.nwk             --metadata results/b1/metadata.tsv             --node-data results/b1/branch_lengths.json results/b1/nt_muts.json results/b1/clades.json             --colors results/b1/colors.tsv             --auspice-config resources/b1/auspice_config.json             --include-root-sequence             --metadata-id-columns accession             --output auspice/nextclade_mpox_b1.json
        
        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Removing output files of failed job export since they might be corrupted:
auspice/nextclade_mpox_b1.json, auspice/nextclade_mpox_b1_root-sequence.json
  .tree {"name": "NODE_0000001", "node_attrs": {"div": 0…} failed oneOf validation for [{"$ref": "#/$defs/tree"}, {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/tree"}}]
    validation for arm 0: {"$ref": "#/$defs/tree"}
      .tree.children[…].node_attrs.accession {"value": "OP270022"} failed type validation for "string"
      .tree.children[…].node_attrs.accession {"value": "OP382485"} failed type validation for "string"
      .tree.children[…].node_attrs.accession {"value": "OQ565543"} failed type validation for "string"
....snip.......

      .tree.children[…].node_attrs.accession {"value": "KJ642617"} failed type validation for "string"
      .tree.children[…].node_attrs.accession {"value": "JX878417"} failed type validation for "string"
    validation for arm 1: {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/tree"}}
      .tree {"name": "NODE_0000001", "node_attrs": {"div": 0…} failed type validation for "array"
Validation of 'auspice/nextclade_mpox_MPXV.json' failed.

------------------------
Validation of auspice/nextclade_mpox_MPXV.json failed. Please check this in a local instance of `auspice`, as it is not expected to display correctly. 

Possibly related to #1264

@corneliusroemer corneliusroemer added the bug Something isn't working label Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant