public class PDBStatus extends Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
PDBStatus.Status
Represents the status of PDB IDs.
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PDB_SERVER |
static String |
PDB_SERVER_PROPERTY |
Constructor and Description |
---|
PDBStatus() |
Modifier and Type | Method and Description |
---|---|
static void |
clearCache()
The status of PDB IDs are cached to reduce server overload.
|
static String |
getCurrent(String oldPdbId)
Gets the current version of a PDB ID.
|
static SortedSet<String> |
getCurrentPDBIds()
Returns a list of current PDB IDs
|
static List<String> |
getReplacement(String oldPdbId,
boolean recurse,
boolean includeObsolete)
Gets the PDB which superseded oldPdbId.
|
static List<String> |
getReplaces(String newPdbId,
boolean recurse)
Get the ID of the protein which was made obsolete by newPdbId.
|
static PDBStatus.Status |
getStatus(String pdbId)
Get the status of the PDB in question.
|
static PDBStatus.Status[] |
getStatus(String[] pdbIds)
Get the status of the a collection of PDBs in question in a single query.
|
public static final String DEFAULT_PDB_SERVER
public static final String PDB_SERVER_PROPERTY
public PDBStatus()
public static PDBStatus.Status getStatus(String pdbId)
pdbId
- public static PDBStatus.Status[] getStatus(String[] pdbIds)
pdbIds
- getStatus(String)
public static String getCurrent(String oldPdbId)
oldPdbId
- public static List<String> getReplacement(String oldPdbId, boolean recurse, boolean includeObsolete)
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.public static List<String> getReplaces(String newPdbId, boolean recurse)
newPdbId
- PDB ID of the newer structurerecurse
- If true, return all ancestors of newPdbId.
Otherwise, just go one step newer than oldPdbId.public static void clearCache()
public static SortedSet<String> getCurrentPDBIds() throws IOException
IOException
Copyright © 2000–2018 BioJava. All rights reserved.