ASTRAL RAF (Rapid Access Format) Sequence Maps.
The ASTRAL RAF Sequence Maps record the relationship between the PDB SEQRES records (representing the sequence of the molecule used in an experiment) to the ATOM records (representing the atoms experimentally observed).
This data is derived from the Protein Data Bank CIF files. Known errors in the CIF files are corrected manually, with the original PDB file serving as the final arbiter in case of discrepancies.
Residues are referenced by residue ID. This consists of a the PDB residue sequence number (up to 4 digits) and an optional PDB insertion code (an ascii alphabetic character, a-z, A-Z). e.g. “1”, “10A”, “1010b”, “-1”
See “ASTRAL RAF Sequence Maps”:http://astral.stanford.edu/raf.html
Dictionary protein_letters_3to1_extended provides a mapping from the 3-letter amino acid codes found in PDB files to 1-letter codes. The 3-letter codes include chemically modified residues.
Convert RAF one-letter amino acid codes into IUPAC standard codes.
Letters are uppercased, and “.” (“Unknown”) is converted to “X”.
- class Bio.SCOP.Raf.SeqMapIndex(filename)
An RAF file index.
The RAF file itself is about 50 MB. This index provides rapid, random access of RAF records without having to load the entire file into memory.
The index key is a concatenation of the PDB ID and chain ID. e.g “2drcA”,
"155c_". RAF uses an underscore to indicate blank chain IDs.
Initialize the RAF file index.
filename – The file to index
Return an item from the indexed file.
Get the sequence map for a collection of residues.
residues – A Residues instance, or a string that can be converted into a Residues instance.
- class Bio.SCOP.Raf.SeqMap(line=None)
An ASTRAL RAF (Rapid Access Format) Sequence Map.
This is a list like object; You can find the location of particular residues with index(), slice this SeqMap into fragments, and glue fragments back together with extend().
pdbid – The PDB 4 character ID
pdb_datestamp – From the PDB file
version – The RAF format version. e.g. 0.01
flags – RAF flags. (See release notes for more information.)
res – A list of Res objects, one for each residue in this sequence map
Initialize the class.
- index(resid, chainid='_')
Return the index of the SeqMap for the given resid and chainid.
Extract a single Res object from the SeqMap.
Append another Res object onto the list of residue mappings.
Append another SeqMap onto the end of self.
Both SeqMaps must have the same PDB ID, PDB datestamp and RAF version. The RAF flags are erased if they are inconsistent. This may happen when fragments are taken from different chains.
In place addition of SeqMap objects.
Addition of SeqMap objects.
- getAtoms(pdb_handle, out_handle)
Extract all relevant ATOM and HETATOM records from a PDB file.
The PDB file is scanned for ATOM and HETATOM records. If the chain ID, residue ID (seqNum and iCode), and residue type match a residue in this sequence map, then the record is echoed to the output handle.
This is typically used to find the coordinates of a domain, or other residue subset.
pdb_handle – A handle to the relevant PDB file.
out_handle – All output is written to this file like object.
- class Bio.SCOP.Raf.Res
A single residue mapping from a RAF record.
chainid – A single character chain ID.
resid – The residue ID.
atom – amino acid one-letter code from ATOM records.
seqres – amino acid one-letter code from SEQRES records.
Initialize the class.
Iterate over RAF file, giving a SeqMap object for each line.
handle – file-like object.