There appears to be a bug in the EMDB import process, a user has run into the following job failure when they try to import from EMDB:
***************************************************************
Attempting to load 1 entry from EMDB
Loading details for EMD-13310
Unable to connect to EMDB server
'EMD-13310'
Done.
--------------------------------------------------------------
Compiling job outputs...
Updating job size...
Exporting job and creating csg files...
***************************************************************
I’ve verified that I can curl https://www.ebi.ac.uk/emdb/api/entry/13310
from the cryoSPARC master, so it does not seem to be an inability to connect to the EMDB API.
In digging into the code in cryosparc_compute/jobs/imports/run.py
that does EMDB imports, it looks like the error Unable to connect to EMDB server
is a generic catch-all for any type of exception that occurs when processing the API JSON response data.
However, while examining the EMDB response handling, I noticed this block of code, where entry
is the data from the API’s JSON response:
data = response.json()
entry = data[entry_id][0]
rc.log(f" Title: {entry['deposition']['title']}")
rc.log(f" Authors: {entry['deposition']['authors']}")
rc.log(f" Deposition date: {entry['deposition']['deposition_date']}")
rc.log(f" Release date: {entry['deposition']['map_release_date']}")
rc.log(f" Entry version: {entry['version']}")
rc.log(f" Resolution: {entry['processing']['reconstruction']['resolution_by_author']}<C3><85>")
rc.log(f" Size: {int(entry['map']['file']['size_kb'])/float(1<<10):.2f} MB")
rc.log(f" Contour level: {entry['map']['contour_level']['value']}")
rc.log(f" URL: https://www.ebi.ac.uk/emdb/EMD-{entry_id}")
When compared to the JSON output of https://www.ebi.ac.uk/emdb/api/entry/13310, and to the API reference at https://www.ebi.ac.uk/emdb/api/, it appears that cryoSPARC might be expecting an older version of the API. For instance, what cryoSPARC is expecting under the deposition
key seems to exist under the admin
key in the API, and has a fairly different schema. This appears to be the source of the problem- import is failing due to an exception being thrown when trying to read the response JSON.