public class EcodInstallation extends 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 String |
DEFAULT_VERSION |
static String |
DOMAINS_PATH |
static Pattern |
ECOD_RE |
static String |
ECOD_URL |
Constructor and Description |
---|
EcodInstallation() |
EcodInstallation(String cacheLocation,
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.
|
List<EcodDomain> |
filterByHierarchy(String hierarchy)
Get a list of domains within a particular level of the hierarchy
|
List<EcodDomain> |
getAllDomains()
Get all ECOD domains
|
String |
getCacheLocation()
Get the location of the cache directory (usually set to the PDB_CACHE_DIR
property).
|
EcodDomain |
getDomainsById(String ecodId)
Get a particular ECOD domain by the domain ID (e.g.
|
List<EcodDomain> |
getDomainsForPdb(String pdbId)
public EcodInstallation(String cacheLocation) {
this( cacheLocation, DEFAULT_VERSION );
}
/**
Get a list of all ECOD domains for a particular PDB ID
|
Integer |
getUpdateFrequency()
The expected ECOD update frequency determines whether the version
"latest" should be re-downloaded
|
String |
getUrl()
Get the top-level ECOD server URL.
|
String |
getVersion()
Return the ECOD version, as parsed from the file.
|
static void |
main(String[] args) |
void |
setCacheLocation(String cacheLocation)
Set an alternate download location for files
|
void |
setUpdateFrequency(Integer updateFrequency)
The "latest" version will be re-downloaded if it is older than
getUpdateFrequency() days. |
void |
setUrl(String url)
Specify a different mirror for the ECOD server.
|
String |
toString() |
public static final String DEFAULT_VERSION
public static final String ECOD_URL
public static final String DOMAINS_PATH
public EcodInstallation(String cacheLocation, String version)
cacheLocation
- Location to save files, typically from the PDB_CACHE_DIR parameterrequestedVersion
- ECOD requestedVersion to fetchpublic EcodInstallation()
EcodFactory.getEcodDatabase()
public List<EcodDomain> getDomainsForPdb(String pdbId) throws IOException
getDomainsForPdb
in interface EcodDatabase
pdbId
- IOException
public List<EcodDomain> filterByHierarchy(String hierarchy) throws 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)IOException
public EcodDomain getDomainsById(String ecodId) throws IOException
getDomainsById
in interface EcodDatabase
ecodId
- IOException
public List<EcodDomain> getAllDomains() throws IOException
getAllDomains
in interface EcodDatabase
IOException
public void clear()
public String getVersion() throws IOException
getVersion
in interface EcodDatabase
IOException
- If an error occurs while downloading or parsing the filepublic String getUrl()
public void setUrl(String url)
urlFormat
- the urlFormat to setpublic String getCacheLocation()
public void setCacheLocation(String cacheLocation)
cacheLocation
- public void ensureDomainsFileInstalled() throws IOException
IOException
public Integer getUpdateFrequency()
public void setUpdateFrequency(Integer updateFrequency)
getUpdateFrequency()
days. Setting this to null disables
re-downloading (delete $PDB_CACHE_DIR/ecod.latest.domains.txt manually
to force updating). Setting to 0 will force downloading for every
program execution.updateFrequency
- the updateFrequency to setCopyright © 2000–2018 BioJava. All rights reserved.