Class PDBStatus
All methods query the PDB website.
PDB supersessions form a directed acyclic graph, where edges point from an
obsolete ID to the entry that directly superseded it. For example, here are
edges from one portion of the graph:
1CAT -> 3CAT
3CAT -> 7CAT
3CAT -> 8CAT
The methods getReplaces(pdbId, false)
/
getReplacement(pdbId, false, true)
just get the incoming/outgoing edges for a single node. The recursive versions
(getReplaces(pdbId, true)
,
getReplacement(pdbId, true, false)
)
will do a depth-first search up/down the tree and return a list of all nodes ]
reached.
Finally, the getCurrent() method returns a single PDB ID from among the
results of
getReplacement(pdbId, true)
.
To be consistent with the old REST ordering, this is the PDB ID that occurs
last alphabetically.
Results are cached to reduce server load.
- Since:
- 3.0.2
- Author:
- Spencer Bliven <sbliven@ucsd.edu>, Amr AL-Hossary
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
The status of PDB IDs are cached to reduce server overload.static String
getCurrent
(String oldPdbId) Gets the current version of a PDB ID.Returns a list of current PDB IDsgetReplacement
(String oldPdbId, boolean recurse, boolean includeObsolete) Gets the PDB which superseded oldPdbId.getReplaces
(String newPdbId, boolean recurse) Get the ID of the protein which was made obsolete by newPdbId.static PDBStatus.Status
Get the status of the PDB in question.static PDBStatus.Status[]
Get the status of the a collection of PDBs in question in a single query.
-
Field Details
-
DEFAULT_PDB_SERVER
- See Also:
-
PDB_SERVER_PROPERTY
- See Also:
-
-
Constructor Details
-
PDBStatus
public PDBStatus()
-
-
Method Details
-
getStatus
Get the status of the PDB in question.- Parameters:
pdbId
-- Returns:
- The status, or null if an error occurred.
-
getStatus
Get the status of the a collection of PDBs in question in a single query.- Parameters:
pdbIds
-- Returns:
- The status array, or null if an error occurred.
- See Also:
-
getCurrent
Gets the current version of a PDB ID. This is equivalent to selecting the first element fromgetReplacement(String,boolean,boolean)
- Parameters:
oldPdbId
-- Returns:
- The replacement for oldPdbId, or null if none are found or if an error occurred.
-
getReplacement
public static List<String> getReplacement(String oldPdbId, boolean recurse, boolean includeObsolete) Gets the PDB which superseded oldPdbId. For CURRENT IDs, this will be itself. For obsolete IDs, the behavior depends on the recursion parameter. If false, only IDs which directly supersede oldPdbId are returned. If true, the replacements for obsolete records are recursively fetched, yielding a list of all current replacements of oldPdbId.- Parameters:
oldPdbId
- A pdb IDrecurse
- Indicates whether the replacements for obsolete records should be fetched.includeObsolete
- Indicates whether obsolete records should be included in the results.- Returns:
- The PDB which replaced oldPdbId. This may be oldPdbId itself, for current records. A return value of null indicates that the ID has been removed from the PDB or that an error has occurred.
-
getReplaces
Get the ID of the protein which was made obsolete by newPdbId.- Parameters:
newPdbId
- PDB ID of the newer structurerecurse
- If true, return all ancestors of newPdbId. Otherwise, just go one step newer than oldPdbId.- Returns:
- A (possibly empty) list of ID(s) of the ancestor(s) of newPdbId, or null if an error occurred.
-
clearCache
public static void clearCache()The status of PDB IDs are cached to reduce server overload. This method clears the cached records. -
getCurrentPDBIds
Returns a list of current PDB IDs- Returns:
- a list of PDB IDs, or null if a problem occurred
- Throws:
IOException
-