forgi.threedee.utilities.modified_res module¶
A module for dealing with modified residues.
For now the only functionality is to find out the corresponding unmodified residue.
-
class
forgi.threedee.utilities.modified_res.
ModifiedResidueLookup
(query_db=False)[source]¶ Bases:
future.types.newobject.newobject
Convenience wrapper to access modified_res_lookup.RESIDUE_DICT. If a key does not exist, query the database to add it.
Parameters: query_db – If true, query PDBeChem whenever a 3-letter code is not understood.
-
forgi.threedee.utilities.modified_res.
query_PDBeChem
(three_letter_code)[source]¶ Query the PDBeChem and return a dictionary with key-value pairs.
Unfortunately, this information does not seem to be provided in any machine-readable format. We have to parse the html.
-
forgi.threedee.utilities.modified_res.
to_4_letter_alphabeth
(chain, query_db=False)[source]¶ Rename the modified residues so that they have the same names as unmodified residues.
If a residue’s name is unknown, query PDBeChem.
If the residue is not a ribonucleotide, remove it from the chain.
If it is a modified ribonucleotde, replace it by the unmodified “standard parent”
Parameters: - chain – A Bio.PDB.Chain structure
- query_db – If true, query PDBeChem whenever a 3-letter code is unknown.
Returns: The same chain, but with only AUGC residues.