This is copied from a user request - please post questions such as these in the discussion forum to make the question and answer visible and useful to others
Recently, we have tried to generate a json with the augur export v2 command to upload it to the profile. However, we get an error related to the
branch_lengths.json file. I have checked the file and compared its structure with the one we obtained for the previous analysis, currently published in Nextstrain, and I can’t find the error.
The command and error message is:
No errors raised in previous steps.
augur export v2 \ --tree results/tree.nwk \ --metadata data/nextstrain_reinf.tsv \ --node-data results/branch_lengths.json \ --output auspice/sars-cov-2.json
Traceback (most recent call last): File "/home/vhir/anaconda3/envs/nextstrain/bin/augur", line 10, in <module> sys.exit(main()) File "/home/vhir/anaconda3/envs/nextstrain/lib/python3.9/site-packages/augur/__main__.py", line 10, in main return augur.run( argv[1:] ) File "/home/vhir/anaconda3/envs/nextstrain/lib/python3.9/site-packages/augur/__init__.py", line 75, in run return args.__command__.run(args) File "/home/vhir/anaconda3/envs/nextstrain/lib/python3.9/site-packages/augur/export.py", line 22, in run return run_v2(args) File "/home/vhir/anaconda3/envs/nextstrain/lib/python3.9/site-packages/augur/export_v2.py", line 974, in run_v2 node_data, node_attrs, node_data_names, metadata_names = parse_node_data_and_metadata(T, node_data_file, metadata_file) File "/home/vhir/anaconda3/envs/nextstrain/lib/python3.9/site-packages/augur/export_v2.py", line 919, in parse_node_data_and_metadata if node["strain"] in node_attrs: # i.e. this node name is in the tree KeyError: 'strain'`
We are sending the files, in case you could check them, as mentioned in an issue published in Nextstrain (Error in Job 3: Exporting data files for for auspice).