pdb_io.PdbReader
- class pdb_io.PdbReader(pdb_directory: str, pdb_type: str = 'cif', gzipped: bool = True)[source]
Bases:
objectObject for parsing protein structures in pdb or cif format from a specific directory
- Parameters:
pdb_directory (str) – a directory containing protein structure files
pdb_type (str) – the format of the protein structure files. Default “cif”
gzipped (bool) – true if the protein structure files are compressed with gzip, false if uncompressed
- directory_queries
- pdb_directory
path to the directory containing protein structure files
- Type:
pathlib.Path
- text_handler
method for opening text stream
- Type:
Callable
- parser
- Type:
PDB.MMCIFParser or PDB.PDBParser
- __init__(pdb_directory: str, pdb_type: str = 'cif', gzipped: bool = True)[source]
Object for parsing protein structures in pdb or cif format from a specific directory
- Parameters:
pdb_directory (str) – a directory containing protein structure files
pdb_type (str) – the format of the protein structure files. Default “cif”
gzipped (bool) – true if the protein structure files are compressed with gzip, false if uncompressed
- directory_queries
- pdb_directory
path to the directory containing protein structure files
- Type:
pathlib.Path
- text_handler
method for opening text stream
- Type:
Callable
- parser
- Type:
PDB.MMCIFParser or PDB.PDBParser
Methods
__init__(pdb_directory[, pdb_type, gzipped])Object for parsing protein structures in pdb or cif format from a specific directory
read_file(protein_id, file_name)Parse a protein structure file and return a biopython PDB structure
Attributes
read each file in the directory and get the protein chain IDs and each protein structure file
- property directory_queries
read each file in the directory and get the protein chain IDs and each protein structure file
- Returns:
the path to each protein structure file and the IDs of the polypeptide chains in that protein
- Return type:
- read_file(protein_id: str, file_name: str) Structure | None[source]
Parse a protein structure file and return a biopython PDB structure
- Parameters:
protein_id (str) – pdb entity ID of the protein structure
file_name (str) – name of the protein structure file
- Returns:
Biopython structure entity
- Return type:
PDB.Structure.Structure or None