\Amelaye\BioPHP\Domain\Parser\Service ParsePdbManager

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\Parser\Entity 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.

Summary

Methods
Properties
Constants
__construct
getFormat
isEntryStart
isEntryEnd
getEntryId
parseDataFile
getIdCode
getClassification
getDepositionDate
getTitle
getCompounds
getSources
getKeywords
getExperimentalTechnique
getAuthors
getSeqRes
getHelices
getSheets
getCryst1
getAtoms
getHetAtoms
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
parseSpecificationList
parseHeader
parseSeqRes
parseHelix
parseSheet
parseCryst1
parseAtom
aminoAcidCodes
idCode
classification
depositionDate
title
compounds
sources
keywords
experimentalTechnique
authors
seqRes
helices
sheets
cryst1
atoms
hetAtoms
sCompnd
sSource
sKeywds
sAuthor
aSeqResCodes
No private constants found

Properties

$aminoAcidCodes

$aminoAcidCodes : array

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".

Type

array<string|int, mixed> —

$idCode

$idCode : string

Type

string —

$classification

$classification : string

Type

string —

$depositionDate

$depositionDate : string

Type

string —

$title

$title : string

Type

string —

$compounds

$compounds : array

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

..

Type

array<string|int, mixed> —

$sources

$sources : array

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

..

Type

array<string|int, mixed> —

$keywords

$keywords : array

Type

array<string|int, mixed> —

$experimentalTechnique

$experimentalTechnique : string

Type

string —

$authors

$authors : array

Type

array<string|int, mixed> —

$seqRes

$seqRes : array

Type

array<string|int, mixed> —

$helices

$helices : array

Type

array<string|int, mixed> —

$sheets

$sheets : array

Type

array<string|int, mixed> —

$cryst1

$cryst1 : array

Type

array<string|int, mixed> —

$atoms

$atoms : array

Type

array<string|int, mixed> —

$hetAtoms

$hetAtoms : array

Type

array<string|int, mixed> —

$sCompnd

$sCompnd : string

Type

string —

$sSource

$sSource : string

Type

string —

$sKeywds

$sKeywds : string

Type

string —

$sAuthor

$sAuthor : string

Type

string —

$aSeqResCodes

$aSeqResCodes : array

Type

array<string|int, mixed> —

Methods

__construct()

__construct() : mixed

Constructor.

Returns

mixed —

getFormat()

getFormat() : string

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

Returns

string —

isEntryStart()

isEntryStart(string  $sLine) : bool

Tells whether a line opens a new PDB entry.

Parameters

string $sLine

The line to analyze

Returns

bool —

isEntryEnd()

isEntryEnd(string  $sLine) : bool

Tells whether a line closes a PDB entry.

Parameters

string $sLine

The line to analyze

Returns

bool —

getEntryId()

getEntryId(array  $aFlines, string  $sLine) : string

Extracts the identifier uniquely naming a PDB entry.

Parameters

array $aFlines

The whole file, buffered

string $sLine

The line opening the entry

Returns

string —

parseDataFile()

parseDataFile(array  $aFlines) : \Amelaye\BioPHP\Domain\Sequence\Entity\Sequence

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

Parameters

array $aFlines

The lines the script has to parse

Throws

\Exception

Returns

\Amelaye\BioPHP\Domain\Sequence\Entity\Sequence —

$oSequence

getIdCode()

getIdCode() : string

Returns

string —

getClassification()

getClassification() : string

Returns

string —

getDepositionDate()

getDepositionDate() : string

Returns

string —

getTitle()

getTitle() : string

Returns

string —

getCompounds()

getCompounds() : array

Returns

array —

getSources()

getSources() : array

Returns

array —

getKeywords()

getKeywords() : array

Returns

array —

getExperimentalTechnique()

getExperimentalTechnique() : string

Returns

string —

getAuthors()

getAuthors() : array

Returns

array —

getSeqRes()

getSeqRes() : array

Returns

array —

getHelices()

getHelices() : \Amelaye\BioPHP\Domain\Parser\Interfaces\PdbHelixInterface[]

Returns

\Amelaye\BioPHP\Domain\Parser\Interfaces\PdbHelixInterface[] —

getSheets()

getSheets() : \Amelaye\BioPHP\Domain\Parser\Interfaces\PdbSheetInterface[]

Returns

\Amelaye\BioPHP\Domain\Parser\Interfaces\PdbSheetInterface[] —

getCryst1()

getCryst1() : array

Returns

array —

getAtoms()

getAtoms() : \Amelaye\BioPHP\Domain\Parser\Interfaces\PdbAtomInterface[]

Returns

\Amelaye\BioPHP\Domain\Parser\Interfaces\PdbAtomInterface[] —

getHetAtoms()

getHetAtoms() : \Amelaye\BioPHP\Domain\Parser\Interfaces\PdbAtomInterface[]

Returns

\Amelaye\BioPHP\Domain\Parser\Interfaces\PdbAtomInterface[] —

parseSpecificationList()

parseSpecificationList(string  $sText) : array

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.

Parameters

string $sText

Returns

array —

parseHeader()

parseHeader(string  $sLine) : mixed

Parses the HEADER line.

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

Parameters

string $sLine

Returns

mixed —

parseSeqRes()

parseSeqRes(string  $sLine) : mixed

Parses one SEQRES line and accumulates residue codes per chain.

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

Parameters

string $sLine

Returns

mixed —

parseHelix()

parseHelix(string  $sLine) : \Amelaye\BioPHP\Domain\Parser\Interfaces\PdbHelixInterface

Parses one HELIX line.

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

string $sLine

Returns

\Amelaye\BioPHP\Domain\Parser\Interfaces\PdbHelixInterface —

parseSheet()

parseSheet(string  $sLine) : \Amelaye\BioPHP\Domain\Parser\Interfaces\PdbSheetInterface

Parses one SHEET line.

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

Parameters

string $sLine

Returns

\Amelaye\BioPHP\Domain\Parser\Interfaces\PdbSheetInterface —

parseCryst1()

parseCryst1(string  $sLine) : mixed

Parses the CRYST1 line.

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

string $sLine

Returns

mixed —

parseAtom()

parseAtom(string  $sLine) : \Amelaye\BioPHP\Domain\Parser\Interfaces\PdbAtomInterface

Parses one ATOM or HETATM line.

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

string $sLine

Returns

\Amelaye\BioPHP\Domain\Parser\Interfaces\PdbAtomInterface —