Class EmdbEntryResolver
The primary lookup is EMDB's own search API, which returns the identifier and the author-recommended contour level together in a single small CSV response. That is also the route Jmol uses, so BioJava's answer matches what a user sees elsewhere. If it fails, RCSB's entry API is consulted for the identifier alone.
The experimental method is deliberately not inferred from a structure's resolution: BioJava is known to mis-parse resolution for some cryo-EM entries (biojava/biojava#1000), so the presence of an EMDB identifier is the reliable signal.
Answers are cached on disk. Under
LocalPDBDirectory.FetchBehavior.LOCAL_ONLY the cached answer is used whatever its age and
no connection is opened.
- Since:
- 7.3.0
- Author:
- Amr ALHOSSARY
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault template for the EMDB entry map metadata.static final StringDefault template for the RCSB entry record, used as a fallback.static final StringDefault template for the EMDB search that maps a PDB entry to the EM reconstructions it was fitted into, returning the contour level as well. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetContourLevelFor(PdbId pdbId) The contour level the depositors recommend for the map a PDB entry was fitted into, as reported by the EMDB search.getEmdbIds(PdbId pdbId) The EMDB entries a PDB entry was fitted into.getEntryInfo(String emdbId) Reads an EMDB entry's map metadata: contour level, RMS deviation and the size of the primary map file.static voidRestores all default URL templates.voidsetCacheRoot(File cacheRoot) voidsetFetchBehavior(LocalPDBDirectory.FetchBehavior fetchBehavior) static voidsetMapInfoUrlTemplate(String template) voidsetMappingMaxAgeDays(int days) static voidsetRcsbEntryUrlTemplate(String template) static voidsetSearchUrlTemplate(String template)
-
Field Details
-
DEFAULT_SEARCH_URL_TEMPLATE
Default template for the EMDB search that maps a PDB entry to the EM reconstructions it was fitted into, returning the contour level as well.- See Also:
-
DEFAULT_MAP_INFO_URL_TEMPLATE
Default template for the EMDB entry map metadata.- See Also:
-
DEFAULT_RCSB_ENTRY_URL_TEMPLATE
Default template for the RCSB entry record, used as a fallback.- See Also:
-
-
Constructor Details
-
EmdbEntryResolver
- Parameters:
cacheRoot- the BioJava cache directory
-
-
Method Details
-
setCacheRoot
- Parameters:
cacheRoot- the BioJava cache directory
-
setFetchBehavior
- Parameters:
fetchBehavior- how aggressively to refresh cached answers
-
setMappingMaxAgeDays
public void setMappingMaxAgeDays(int days) - Parameters:
days- how long a cached mapping stays fresh. Mappings change only when an entry is re-released, so this can be generous.
-
setSearchUrlTemplate
- Parameters:
template- the EMDB search URL template
-
setMapInfoUrlTemplate
- Parameters:
template- the EMDB map metadata URL template
-
setRcsbEntryUrlTemplate
- Parameters:
template- the RCSB entry URL template used as a fallback
-
resetToDefaults
public static void resetToDefaults()Restores all default URL templates. -
getEmdbIds
The EMDB entries a PDB entry was fitted into.- Parameters:
pdbId- the PDB entry- Returns:
- the EMDB identifiers, most relevant first; empty if the entry is not an EM structure or has no associated map
-
getContourLevelFor
The contour level the depositors recommend for the map a PDB entry was fitted into, as reported by the EMDB search.- Parameters:
pdbId- the PDB entry- Returns:
- the level in absolute map units, or
nullif unknown
-
getEntryInfo
Reads an EMDB entry's map metadata: contour level, RMS deviation and the size of the primary map file.The response is cached verbatim, so asking twice costs one request.
- Parameters:
emdbId- the EMDB entry, in any accepted form- Returns:
- the metadata, or
nullif it could not be obtained
-