public class EcodInstallation extends java.lang.Object implements EcodDatabase
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/Modifier and Type | Class and Description |
---|---|
static class |
EcodInstallation.EcodParser |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_VERSION |
static java.lang.String |
DOMAINS_PATH |
static java.util.regex.Pattern |
ECOD_RE |
static java.lang.String |
ECOD_URL |
Constructor and Description |
---|
EcodInstallation(java.lang.String cacheLocation,
java.lang.String version)
Use EcodFactory to create instances.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all domains, requiring the file to be reparsed for subsequent accesses
|
void |
ensureDomainsFileInstalled()
Blocks until ECOD domains file has been downloaded and parsed.
|
java.util.List<EcodDomain> |
filterByHierarchy(java.lang.String hierarchy)
Get a list of domains within a particular level of the hierarchy
|
java.util.List<EcodDomain> |
getAllDomains()
Get all ECOD domains
|
java.lang.String |
getCacheLocation()
Get the location of the cache directory (usually set to the PDB_CACHE_DIR
property).
|
EcodDomain |
getDomainsById(java.lang.String ecodId)
Get a particular ECOD domain by the domain ID (e.g.
|
java.util.List<EcodDomain> |
getDomainsForPdb(java.lang.String pdbId)
public EcodInstallation(String cacheLocation) {
this( cacheLocation, DEFAULT_VERSION );
}
/**
Get a list of all ECOD domains for a particular PDB ID
|
java.lang.String |
getUrl()
Get the top-level ECOD server URL.
|
java.lang.String |
getVersion()
Return the ECOD version, as parsed from the file.
|
static void |
main(java.lang.String[] args) |
void |
setCacheLocation(java.lang.String cacheLocation)
Set an alternate download location for files
|
void |
setUrl(java.lang.String url)
Specify a different mirror for the ECOD server.
|
java.lang.String |
toString() |
public static final java.lang.String DEFAULT_VERSION
public static final java.lang.String ECOD_URL
public static final java.lang.String DOMAINS_PATH
public static final java.util.regex.Pattern ECOD_RE
public EcodInstallation(java.lang.String cacheLocation, java.lang.String version)
cacheLocation
- Location to save files, typically from the PDB_CACHE_DIR parameterrequestedVersion
- ECOD requestedVersion to fetchpublic java.util.List<EcodDomain> getDomainsForPdb(java.lang.String pdbId) throws java.io.IOException
getDomainsForPdb
in interface EcodDatabase
pdbId
- java.io.IOException
public java.util.List<EcodDomain> filterByHierarchy(java.lang.String hierarchy) throws java.io.IOException
filterByHierarchy
in interface EcodDatabase
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)java.io.IOException
public EcodDomain getDomainsById(java.lang.String ecodId) throws java.io.IOException
getDomainsById
in interface EcodDatabase
ecodId
- java.io.IOException
public java.util.List<EcodDomain> getAllDomains() throws java.io.IOException
getAllDomains
in interface EcodDatabase
java.io.IOException
public void clear()
public java.lang.String getVersion() throws java.io.IOException
getVersion
in interface EcodDatabase
java.io.IOException
- If an error occurs while downloading or parsing the filepublic java.lang.String getUrl()
public void setUrl(java.lang.String url)
urlFormat
- the urlFormat to setpublic java.lang.String getCacheLocation()
public void setCacheLocation(java.lang.String cacheLocation)
cacheLocation
- public void ensureDomainsFileInstalled() throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)