Documentation

ParsePdbManager implements ParseDatabaseInterface

FinalYes

Class ParsePdbManager PDB structure files describe 3D atomic coordinates, not GenBank/EMBL-style annotated sequences, so this parser does not reuse the Sequence/Feature entities of ParseDbAbstractManager - it exposes its own plain Domain\Model objects instead.

Only the fields most commonly used in structural bioinformatics are covered (identification, sequence per chain, secondary structure, atomic coordinates); the many rarely-used PDB record types (CONECT, ANISOU, MASTER, ...) are left out, matching what Legacy/pdb.inc.php itself had actually implemented.

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Interfaces

ParseDatabaseInterface
Interface ParseDatabaseInterface

Properties

$aminoAcidCodes  : array<string|int, mixed>
3-letter to 1-letter amino acid code table, for turning SEQRES residues into a usable protein sequence. Unknown residues (including HETATM-only ones) map to "X".
$aSeqResCodes  : array<string|int, mixed>
$atoms  : array<string|int, mixed>
$authors  : array<string|int, mixed>
$classification  : string
$compounds  : array<string|int, mixed>
One block per molecule, keyed by token : MOL_ID, MOLECULE, CHAIN.
$cryst1  : array<string|int, mixed>
$depositionDate  : string
$experimentalTechnique  : string
$helices  : array<string|int, mixed>
$hetAtoms  : array<string|int, mixed>
$idCode  : string
$keywords  : array<string|int, mixed>
$sAuthor  : string
$sCompnd  : string
$seqRes  : array<string|int, mixed>
$sheets  : array<string|int, mixed>
$sKeywds  : string
$sources  : array<string|int, mixed>
One block per molecule, keyed by token : MOL_ID, ORGANISM_SCIENTIFIC, STRAIN.
$sSource  : string
$title  : string

Methods

__construct()  : mixed
Constructor.
getAtoms()  : array<string|int, PdbAtom>
getAuthors()  : array<string|int, mixed>
getClassification()  : string
getCompounds()  : array<string|int, mixed>
getCryst1()  : array<string|int, mixed>
getDepositionDate()  : string
getEntryId()  : string
Extracts the identifier uniquely naming a PDB entry.
getExperimentalTechnique()  : string
getFormat()  : string
The name this format is known by in the collection records and in DatabaseParserFactory.
getHelices()  : array<string|int, PdbHelix>
getHetAtoms()  : array<string|int, PdbAtom>
getIdCode()  : string
getKeywords()  : array<string|int, mixed>
getSeqRes()  : array<string|int, mixed>
getSheets()  : array<string|int, PdbSheet>
getSources()  : array<string|int, mixed>
getTitle()  : string
isEntryEnd()  : bool
Tells whether a line closes a PDB entry.
isEntryStart()  : bool
Tells whether a line opens a new PDB entry.
parseDataFile()  : Sequence
Parses a PDB data file and populates this manager's fields and model objects.
parseAtom()  : PdbAtom
Parses one ATOM or HETATM line.
parseCryst1()  : mixed
Parses the CRYST1 line.
parseHeader()  : mixed
Parses the HEADER line.
parseHelix()  : PdbHelix
Parses one HELIX line.
parseSeqRes()  : mixed
Parses one SEQRES line and accumulates residue codes per chain.
parseSheet()  : PdbSheet
Parses one SHEET line.
parseSpecificationList()  : array<string|int, mixed>
Parses a COMPND or SOURCE record, both written in what the PDB format calls a specification list : "TOKEN: value;" pairs where each MOL_ID opens the block of one molecule. Keeping the blocks apart is what ties a chain to the molecule it belongs to, so a structure holding several molecules yields several blocks. Records of files older than the specification are free text carrying no token, and stay plain strings.

Properties

$aminoAcidCodes

3-letter to 1-letter amino acid code table, for turning SEQRES residues into a usable protein sequence. Unknown residues (including HETATM-only ones) map to "X".

private static array<string|int, mixed> $aminoAcidCodes = ["ALA" => "A", "ARG" => "R", "ASN" => "N", "ASP" => "D", "CYS" => "C", "GLN" => "Q", "GLU" => "E", "GLY" => "G", "HIS" => "H", "ILE" => "I", "LEU" => "L", "LYS" => "K", "MET" => "M", "PHE" => "F", "PRO" => "P", "SER" => "S", "THR" => "T", "TRP" => "W", "TYR" => "Y", "VAL" => "V"]

$compounds

One block per molecule, keyed by token : MOL_ID, MOLECULE, CHAIN.

private array<string|int, mixed> $compounds = []

..

$sources

One block per molecule, keyed by token : MOL_ID, ORGANISM_SCIENTIFIC, STRAIN.

private array<string|int, mixed> $sources = []

..

Methods

getAuthors()

public getAuthors() : array<string|int, mixed>
Return values
array<string|int, mixed>

getClassification()

public getClassification() : string
Return values
string

getCompounds()

public getCompounds() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCryst1()

public getCryst1() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDepositionDate()

public getDepositionDate() : string
Return values
string

getEntryId()

Extracts the identifier uniquely naming a PDB entry.

public static getEntryId(array<string|int, mixed> $aFlines, string $sLine) : string
Parameters
$aFlines : array<string|int, mixed>

The whole file, buffered

$sLine : string

The line opening the entry

Return values
string

getExperimentalTechnique()

public getExperimentalTechnique() : string
Return values
string

getFormat()

The name this format is known by in the collection records and in DatabaseParserFactory.

public static getFormat() : string
Return values
string

getKeywords()

public getKeywords() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSeqRes()

public getSeqRes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSources()

public getSources() : array<string|int, mixed>
Return values
array<string|int, mixed>

isEntryEnd()

Tells whether a line closes a PDB entry.

public static isEntryEnd(string $sLine) : bool
Parameters
$sLine : string

The line to analyze

Return values
bool

isEntryStart()

Tells whether a line opens a new PDB entry.

public static isEntryStart(string $sLine) : bool
Parameters
$sLine : string

The line to analyze

Return values
bool

parseDataFile()

Parses a PDB data file and populates this manager's fields and model objects.

public parseDataFile(array<string|int, mixed> $aFlines) : Sequence
Parameters
$aFlines : array<string|int, mixed>

The lines the script has to parse

Tags
throws
Exception
Return values
Sequence

$oSequence

parseAtom()

Parses one ATOM or HETATM line.

private parseAtom(string $sLine) : PdbAtom

Columns : 7-11 serial, 13-16 name, 17 altLoc, 18-20 resName, 22 chainID, 23-26 resSeq, 31-38 x, 39-46 y, 47-54 z, 55-60 occupancy, 61-66 tempFactor, 77-78 element.

Parameters
$sLine : string
Return values
PdbAtom

parseCryst1()

Parses the CRYST1 line.

private parseCryst1(string $sLine) : mixed

Columns : 7-15 a, 16-24 b, 25-33 c, 34-40 alpha, 41-47 beta, 48-54 gamma, 56-66 space group, 67-70 Z.

Parameters
$sLine : string

parseHeader()

Parses the HEADER line.

private parseHeader(string $sLine) : mixed

Columns : 11-50 classification, 51-59 deposition date, 63-66 idCode.

Parameters
$sLine : string

parseHelix()

Parses one HELIX line.

private parseHelix(string $sLine) : PdbHelix

Columns : 12-14 helixID, 16-18 initResName, 20 initChainID, 22-25 initSeqNum, 28-30 endResName, 32 endChainID, 34-37 endSeqNum, 39-40 helixClass, 72-76 length.

Parameters
$sLine : string
Return values
PdbHelix

parseSeqRes()

Parses one SEQRES line and accumulates residue codes per chain.

private parseSeqRes(string $sLine) : mixed

Columns : 12 chainID, 20- residues (3-letter codes, space-separated).

Parameters
$sLine : string

parseSheet()

Parses one SHEET line.

private parseSheet(string $sLine) : PdbSheet

Columns : 8-10 strand, 12-14 sheetID, 18-20 initResName, 22 initChainID, 23-26 initSeqNum, 29-31 endResName, 33 endChainID, 34-37 endSeqNum.

Parameters
$sLine : string
Return values
PdbSheet

parseSpecificationList()

Parses a COMPND or SOURCE record, both written in what the PDB format calls a specification list : "TOKEN: value;" pairs where each MOL_ID opens the block of one molecule. Keeping the blocks apart is what ties a chain to the molecule it belongs to, so a structure holding several molecules yields several blocks. Records of files older than the specification are free text carrying no token, and stay plain strings.

private parseSpecificationList(string $sText) : array<string|int, mixed>
Parameters
$sText : string
Return values
array<string|int, mixed>
On this page

Search results