\Amelaye\BioPHP\Domain\Parser\Service ParseKeggOrthologManager

Class ParseKeggOrthologManager An ortholog record groups the genes of different organisms that descend from one common ancestral gene and do the same job, which is what lets a pathway be carried from one species to another.

Summary

Methods
Properties
Constants
getFormat
parseDataFile
getDefinition
getClassification
getGenes
getDbLinks
__construct
isEntryStart
isEntryEnd
getEntryId
getEntry
getNames
No public properties found
No public constants found
readEntryId
readLabel
readData
readFields
joinLines
splitTokens
parsePathways
parseDbLinks
entry
names
No protected constants found
No private methods found
definition
classification
genes
dbLinks
No private constants found

Properties

$entry

$entry : string

Type

string —

$names

$names : array

Type

array<string|int, mixed> —

$definition

$definition : string

Type

string —

$classification

$classification : array

Type

array<string|int, mixed> —

$genes

$genes : array

One entry per organism, e.g. "HSA: 3101 3098".

Type

array<string|int, mixed> —

$dbLinks

$dbLinks : array

Type

array<string|int, mixed> —

Methods

getFormat()

getFormat() : string

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

Returns

string —

parseDataFile()

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

Parses a KEGG ortholog data file and populates this manager's fields.

Parameters

array $aFlines

The lines the script has to parse

Throws

\Exception

Returns

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

$oSequence

getDefinition()

getDefinition() : string

Returns

string —

getClassification()

getClassification() : array

Returns

array —

getGenes()

getGenes() : array

Returns

array —

getDbLinks()

getDbLinks() : array

Returns

array —

__construct()

__construct() : mixed

Constructor.

Returns

mixed —

isEntryStart()

isEntryStart(string  $sLine) : bool

Tells whether a line opens a new KEGG record.

Parameters

string $sLine

The line to analyze

Returns

bool —

isEntryEnd()

isEntryEnd(string  $sLine) : bool

Tells whether a line closes a KEGG record. KEGG closes on three slashes where most flat files use two.

Parameters

string $sLine

The line to analyze

Returns

bool —

getEntryId()

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

Extracts the identifier uniquely naming a KEGG record.

Parameters

array $aFlines

The whole file, buffered

string $sLine

The line opening the entry

Returns

string —

getEntry()

getEntry() : string

Returns

string —

getNames()

getNames() : array

Returns

array —

readEntryId()

readEntryId(string  $sData) : string

Reads the identifier out of an ENTRY line. Its last word names the kind of record rather than the record itself - "C00031 Compound", "EC 2.7.1.1 Enzyme" - so the identifier is what comes before it, which for an enzyme is the two words "EC" and its number.

Parameters

string $sData

Returns

string —

readLabel()

readLabel(string  $sLine) : string

Reads the label a line carries in its first twelve columns.

Parameters

string $sLine

The line to analyze

Returns

string —

readData()

readData(string  $sLine) : string

Reads the data a line carries, which starts at its thirteenth column.

Parameters

string $sLine

The line to analyze

Returns

string —

readFields()

readFields(array  $aFlines) : array

Gathers a record into its fields : one entry per label, holding the data of its own line and of every continuation line below it.

Parameters

array $aFlines

The lines the script has to parse

Returns

array —

joinLines()

joinLines(array  $aLines) : string

Joins the lines of a field into one string. A line opening with "$" continues the word the line above broke off, so it joins without a space.

Parameters

array $aLines

Returns

string —

splitTokens()

splitTokens(array  $aLines) : array

Splits the lines of a field into the whitespace-separated identifiers they list.

Parameters

array $aLines

Returns

array —

parsePathways()

parsePathways(array  $aLines) : array

Reads a PATHWAY field into pairs of map identifier and pathway name.

Format : PATHWAY PATH: map00010 Glycolysis / Gluconeogenesis

Parameters

array $aLines

Returns

array —

parseDbLinks()

parseDbLinks(array  $aLines) : array

Reads a DBLINKS field into pairs of database name and identifier, one per line.

Format : DBLINKS CAS: 50-99-7

Parameters

array $aLines

Returns

array —