pypath.utils.pdb.ResidueMapper§

class pypath.utils.pdb.ResidueMapper[source]§

Bases: Logger

This class stores and serves the PDB –> UniProt residue level mapping. Attempts to download the mapping, and stores it for further use. Converts PDB residue numbers to the corresponding UniProt ones.

__init__()[source]§

Make this instance a logger.

Parameters:
  • name – The label of this instance that will be prepended to all messages it sends to the logger.

  • module – Send the messages by the logger of this module.

Methods

__init__()

Make this instance a logger.

clean()

Removes cached mappings, freeing up memory.

get_residue(pdb, resnum[, chain])

For a residue in a PDB structure returns the UniProt ID and the position of the residue in the UniProt sequence.

load_mapping(pdbs)

Loads PDB-UniProt sequence mapping for one or more PDB IDs.

clean()[source]§

Removes cached mappings, freeing up memory.

get_residue(pdb, resnum, chain=None)[source]§

For a residue in a PDB structure returns the UniProt ID and the position of the residue in the UniProt sequence.

Args

pdb (str): A PDB structure ID. resnum (int): The position of the residue. chain (str): The chain ID, optional.

Returns

Tuple of residue number, offset, UniProt ID and chain ID. Returns None if the residue can not be found.

load_mapping(pdbs)[source]§

Loads PDB-UniProt sequence mapping for one or more PDB IDs.

Args

pdb (str,list): One or more PDB IDs.