KeyError: 'geo_resolutions'

Hello,

I’ve been trying to get to work my first build with default parameters (only change I made was the include.txt to include all of my sequences and bypass the subsampling scheme) and I came across this error when running the snakemake workflow:

Job 2: Adjusting main auspice JSON to take into account travel history


        python3 ./scripts/modify-tree-according-to-exposure.py             --input results/north-america_usa_puertorico/ncov_with_hcov19_prefix.json             --colors results/north-america_usa_puertorico/colors.tsv             --lat-longs defaults/lat_longs.tsv             --sampling country             --exposure country_exposure             --output results/north-america_usa_puertorico/ncov_with_accessions_and_travel_branches.json 2>&1 | tee logs/incorporate_travel_history_north-america_usa_puertorico.txt

WARNING: Colour for country -> asia  is missing & auspice will choose a shade of grey for this.
WARNING: Colour for country -> south america  is missing & auspice will choose a shade of grey for this.
WARNING: Colour for country -> oceania  is missing & auspice will choose a shade of grey for this.
WARNING: Colour for country -> north america  is missing & auspice will choose a shade of grey for this.
WARNING: Colour for country -> europe  is missing & auspice will choose a shade of grey for this.
WARNING: Colour for country -> africa  is missing & auspice will choose a shade of grey for this.
Traceback (most recent call last):
  File "./scripts/modify-tree-according-to-exposure.py", line 149, in <module>
    update_latlongs(input_json["meta"]["geo_resolutions"], sampling_values, latlongs)
KeyError: 'geo_resolutions'

Waiting at most 15 seconds for missing files.
MissingOutputException in line 1251 of /home/arodzh/ncov/workflow/snakemake_rules/main_workflow.smk:
Job Missing files after 15 seconds:
results/north-america_usa_puertorico/ncov_with_accessions_and_travel_branches.json
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
Job id: 2 completed successfully, but some output files are missing. 2
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /home/arodzh/ncov/.snakemake/log/2021-08-06T153002.924761.snakemake.log

Thanks

As you are using default parameters for your builds, I presume that some characteristic of your input data is resulting in output which is missing latitude / longitude data, but why this is I don’t know. (input_json["meta"]["geo_resolutions"] is where latitude & longitude information for each deme to be shown in the map is defined.)

You should be able to solve this issue by skipping travel history adjustment, which is rarely used these days, by adding the following to your builds.yaml:

skip_travel_history_adjustment: True

which should allow the pipeline to complete, but doesn’t really solve the underlying issue.