Package org.biojava.nbio.structure.scop
Class ScopInstallation
java.lang.Object
org.biojava.nbio.structure.scop.ScopInstallation
- All Implemented Interfaces:
LocalScopDatabase
,ScopDatabase
- Direct Known Subclasses:
BerkeleyScopInstallation
This class provides access to the SCOP protein structure classification.
For more information about SCOP see here:
- SCOP: http://scop.mrc-lmb.cam.ac.uk/scop/
- Introduction: http://scop.mrc-lmb.cam.ac.uk/scop/intro.html
- SCOP parsable files: http://scop.mrc-lmb.cam.ac.uk/scop/parse/
- Author:
- Andreas Prlic
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreate a new SCOP installation, downloading the file to "the right place".ScopInstallation
(String cacheLocation) Create a new SCOP installation. -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected void
protected void
protected void
protected void
downloadFileFromRemote
(URL remoteURL, File localFile) Downloads the SCOP installation file +/- its validation metadata files.protected void
void
void
void
void
filterByClassificationId
(String query) Get all scop descriptions that start with a classification ID, e.g. b.1.18filterByDescription
(String query) Get all scop descriptions that start with a certain name. e.g.filterByDomainName
(String query) search through SCOP and filter based on domain namegetByCategory
(ScopCategory category) Get all records of a particular classification.protected String
protected String
getComments
(int sunid) Get comments about a SCOP domain by its sunidprotected String
getDomainByScopID
(String scopId) get a ScopDomain by its SCOP ID (warning, they are not stable between releases!)getDomainsForPDB
(String pdbId) Get a list of ScopDomains that have been assigned to a PDB IDprotected String
getScopDescriptionBySunid
(int sunid) Return the SCOP description for a node in the hierarchy by its "sunid" id.getScopDomainsBySunid
(Integer sunid) Get a SCOP domain by its sunidgetScopNode
(int sunid) Access a particular ScopNode.Returns the SCOP versiongetTree
(ScopDomain domain) get the SCOP sub-tree for a particular domain.void
Removes all of the comments (dir.com file) in order to free memory.void
setCacheLocation
(String cacheLocation) void
setScopVersion
(String scopVersion) Sets the scop version used.
-
Field Details
-
DEFAULT_VERSION
- See Also:
-
claFileName
- See Also:
-
desFileName
- See Also:
-
hieFileName
- See Also:
-
comFileName
- See Also:
-
SCOP_DOWNLOAD
- See Also:
-
SCOP_DOWNLOAD_ALTERNATE
- See Also:
-
FILESPLIT
-
-
Constructor Details
-
ScopInstallation
Create a new SCOP installation.- Parameters:
cacheLocation
- where the SCOP files are stored. If they can't be found at that location they will get automatically downloaded and installed there.
-
ScopInstallation
public ScopInstallation()Create a new SCOP installation, downloading the file to "the right place". This will first check for system properties or environmental variables calledUserConfiguration.PDB_CACHE_DIR
, or else will use a temporary directory
-
-
Method Details
-
nullifyComments
Removes all of the comments (dir.com file) in order to free memory. The file will need to be reloaded ifgetComments(int)
is called subsequently. -
ensureClaInstalled
- Throws:
IOException
-
ensureDesInstalled
- Throws:
IOException
-
ensureComInstalled
- Throws:
IOException
-
ensureHieInstalled
- Throws:
IOException
-
getByCategory
Description copied from interface:ScopDatabase
Get all records of a particular classification.- Specified by:
getByCategory
in interfaceScopDatabase
- Parameters:
category
- e.g. "superfamily"- Returns:
- all records of this type
-
filterByClassificationId
Description copied from interface:ScopDatabase
Get all scop descriptions that start with a classification ID, e.g. b.1.18- Specified by:
filterByClassificationId
in interfaceScopDatabase
- Parameters:
query
-- Returns:
- list of scop descriptions
-
getTree
Description copied from interface:ScopDatabase
get the SCOP sub-tree for a particular domain.- Specified by:
getTree
in interfaceScopDatabase
- Parameters:
domain
-- Returns:
- list of ScopNodes providing the path to this domain
-
filterByDomainName
Description copied from interface:ScopDatabase
search through SCOP and filter based on domain name- Specified by:
filterByDomainName
in interfaceScopDatabase
- Parameters:
query
- a (part) of a name- Returns:
- list of matchin ScopDomains
-
filterByDescription
Description copied from interface:ScopDatabase
Get all scop descriptions that start with a certain name. e.g. Globin- Specified by:
filterByDescription
in interfaceScopDatabase
- Parameters:
query
-- Returns:
- list of scop descriptions
-
getScopDescriptionBySunid
Description copied from interface:ScopDatabase
Return the SCOP description for a node in the hierarchy by its "sunid" id.- Specified by:
getScopDescriptionBySunid
in interfaceScopDatabase
- Parameters:
sunid
-- Returns:
- a ScopDescription object
-
getDomainsForPDB
Description copied from interface:ScopDatabase
Get a list of ScopDomains that have been assigned to a PDB ID- Specified by:
getDomainsForPDB
in interfaceScopDatabase
- Parameters:
pdbId
- the PDB entry- Returns:
- a list of ScopDomains
-
getDomainByScopID
Description copied from interface:ScopDatabase
get a ScopDomain by its SCOP ID (warning, they are not stable between releases!)- Specified by:
getDomainByScopID
in interfaceScopDatabase
- Parameters:
scopId
- e.g. d2bq6a1- Returns:
- a ScopDomain or null if no domain with the particular ID could be found
-
getScopNode
Description copied from interface:ScopDatabase
Access a particular ScopNode. The scopNode then allows to traverse through the scop hierarchy...- Specified by:
getScopNode
in interfaceScopDatabase
- Parameters:
sunid
- the scop unique id- Returns:
- a ScopNode that matches this sunid
-
downloadClaFile
- Throws:
IOException
-
downloadDesFile
- Throws:
IOException
-
downloadHieFile
- Throws:
IOException
-
downloadComFile
- Throws:
IOException
-
downloadFileFromRemote
Downloads the SCOP installation file +/- its validation metadata files.- Parameters:
remoteURL
- The remote file to downloadlocalFile
- the local file to download to- Throws:
IOException
- in cases of file I/O, including failure to download a healthy (non-corrupted) file.
-
getClaFilename
-
getDesFilename
-
getHieFilename
-
getComFilename
-
getCacheLocation
-
setCacheLocation
-
getScopVersion
Description copied from interface:ScopDatabase
Returns the SCOP version- Specified by:
getScopVersion
in interfaceScopDatabase
- Returns:
- version of SCOP
-
setScopVersion
Description copied from interface:ScopDatabase
Sets the scop version used.- Specified by:
setScopVersion
in interfaceScopDatabase
- Parameters:
scopVersion
-
-
addMirror
-
getMirrors
-
getScopDomainsBySunid
Description copied from interface:ScopDatabase
Get a SCOP domain by its sunid- Specified by:
getScopDomainsBySunid
in interfaceScopDatabase
- Parameters:
sunid
- the scop unique id- Returns:
- a list of scop domains that match this sunid
-
getComments
Description copied from interface:ScopDatabase
Get comments about a SCOP domain by its sunid- Specified by:
getComments
in interfaceScopDatabase
- Parameters:
sunid
-- Returns:
-