﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
3893	Make EMDB fetch display author suggested contour level	Tom Goddard	Tom Goddard	"Eric uses the following code to fetch the EMDB XML meta data to get the author suggested contour level for NIH 3D scripts.  Would be good if ChimeraX automatically did this.  A few EMDB entries where the default ChimeraX contour level is poor (too high) are EMD 1385 and 2770 (randomly chosen by Eric).

{{{
       import requests
       data_key = ""EMD-"" + emdb_id
       response = requests.get('https://www.ebi.ac.uk/pdbe/api/emdb/entry/map/%s' % data_key)
       if response.status_code == requests.codes.ok:
           data = response.json()
           try:
               info = data[data_key]
           except KeyError:
               error(""Key %s not found in metadata for %s"" % (data_key, emdb_id))
           else:
               try:
                   contour_level = info[0]['map']['contour_level']['value']
               except:
                   warn(""No suggested contour level found in metadata for %s"" % emdb_id)
               else:
                   note(""Using EMDB-recommended contour level of %g"" % contour_level)
       else:
           warn(""Could not access metadata for EMDB entry %s"" % emdb_id)
}}}"	enhancement	assigned	moderate		Volume Data				Eric Pettersen				all	ChimeraX
