Package org.biojava.nbio.structure.ecod
Class EcodInstallation
java.lang.Object
org.biojava.nbio.structure.ecod.EcodInstallation
- All Implemented Interfaces:
 EcodDatabase
Provides access to the Evolutionary Classification of Protein Domains (ECOD).
 The preferred mechanism for obtaining instances of this class is through the
 
EcodFactory class.
 Reference:
 H. Cheng, R. D. Schaeffer, Y. Liao, L. N. Kinch, J. Pei, S. Shi, B. H.\
   Kim, N. V. Grishin. (2014) ECOD: An evolutionary classification of protein
   domains. PLoS Comput Biol 10(12): e1003926.
 http://prodata.swmed.edu/ecod/- Author:
 - Spencer Bliven
 
- 
Nested Class Summary
Nested Classes - 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionEcodInstallation(String cacheLocation, String version) Use EcodFactory to create instances. - 
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all domains, requiring the file to be reparsed for subsequent accessesvoidBlocks until ECOD domains file has been downloaded and parsed.filterByHierarchy(String hierarchy) Get a list of domains within a particular level of the hierarchyGet all ECOD domainsGet the location of the cache directory (usually set to the PDB_CACHE_DIR property).getDomainsById(String ecodId) Get a particular ECOD domain by the domain ID (e.g.getDomainsForPdb(String pdbId) public EcodInstallation(String cacheLocation) { this( cacheLocation, DEFAULT_VERSION ); } /** Get a list of all ECOD domains for a particular PDB IDgetUrl()Get the top-level ECOD server URL.Return the ECOD version, as parsed from the file.static voidvoidsetCacheLocation(String cacheLocation) Set an alternate download location for filesvoidSpecify a different mirror for the ECOD server.toString() 
- 
Field Details
- 
DEFAULT_VERSION
- See Also:
 
 - 
ECOD_URL
- See Also:
 
 - 
DOMAINS_PATH
- See Also:
 
 - 
ECOD_RE
 
 - 
 - 
Constructor Details
- 
EcodInstallation
Use EcodFactory to create instances. The instantiation of multiple installations at the same path can lead to race conditions when downloading files.- Parameters:
 cacheLocation- Location to save files, typically from the PDB_CACHE_DIR parameterrequestedVersion- ECOD requestedVersion to fetch
 
 - 
 - 
Method Details
- 
getDomainsForPdb
public EcodInstallation(String cacheLocation) { this( cacheLocation, DEFAULT_VERSION ); } /** Get a list of all ECOD domains for a particular PDB ID- Specified by:
 getDomainsForPdbin interfaceEcodDatabase- Parameters:
 pdbId-- Returns:
 - the list of domains, or null if no matching domains were found
 - Throws:
 IOException
 - 
filterByHierarchy
Get a list of domains within a particular level of the hierarchy- Specified by:
 filterByHierarchyin interfaceEcodDatabase- Parameters:
 hierarchy- A dot-separated list giving the X-group, H-group, and/or T-group (e.g. "1.1" for all members of the RIFT-related H-group)- Returns:
 - Throws:
 IOException
 - 
getDomainsById
Get a particular ECOD domain by the domain ID (e.g. "e4hhbA1")- Specified by:
 getDomainsByIdin interfaceEcodDatabase- Parameters:
 ecodId-- Returns:
 - Throws:
 IOException
 - 
getAllDomains
Get all ECOD domains- Specified by:
 getAllDomainsin interfaceEcodDatabase- Returns:
 - Throws:
 IOException
 - 
clear
public void clear()Clears all domains, requiring the file to be reparsed for subsequent accesses - 
getVersion
Return the ECOD version, as parsed from the file. Note that this may differ from the version requested in the constructor for the special case of "latest"- Specified by:
 getVersionin interfaceEcodDatabase- Returns:
 - the ECOD version
 - Throws:
 IOException- If an error occurs while downloading or parsing the file
 - 
getUrl
Get the top-level ECOD server URL. Defaults to "http://prodata.swmed.edu"- Returns:
 - the url to the ecod server
 
 - 
setUrl
Specify a different mirror for the ECOD server.- Parameters:
 urlFormat- the urlFormat to set
 - 
getCacheLocation
Get the location of the cache directory (usually set to the PDB_CACHE_DIR property). ECOD files will be downloaded to this directory- Returns:
 
 - 
setCacheLocation
Set an alternate download location for files- Parameters:
 cacheLocation-
 - 
ensureDomainsFileInstalled
Blocks until ECOD domains file has been downloaded and parsed. This may be useful in multithreaded environments.- Throws:
 IOException
 - 
toString
 - 
main
 
 -