\Amelaye\BioPHP\Domain\Parser\Service ParsePrositeManager

Class ParsePrositeManager A PROSITE entry describes a motif (pattern, or matrix/profile), not an annotated sequence, so - like ParsePdbManager - this class does not reuse the Sequence/Feature entities of ParseDbAbstractManager. It uses the same 2-char-tag/3-space layout as EMBL and Swiss-Prot, so multi-line fields are read with the same lookahead approach as ParseEmblManager. The MA (matrix) field, which Legacy/motif.inc.php itself only half-implemented (buggy 3-level nesting), is kept as a raw string here rather than ported as-is.

Summary

Methods
Properties
Constants
__construct
getFormat
isEntryStart
isEntryEnd
getEntryId
parseDataFile
getEntryName
getEntryType
getAccession
getDates
getDescription
getPattern
getMatrix
getNumericalResults
getComments
getRule
getPdbXrefs
getDbRefs
getDocXref
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
accumulate
parseId
parseDate
parseQualifiers
parseList
parseDbRefs
entryName
entryType
accession
dates
description
pattern
matrix
numericalResults
comments
rule
pdbXrefs
dbRefs
docXref
No private constants found

Properties

$entryName

$entryName : string

Type

string —

$entryType

$entryType : string

Type

string —

$accession

$accession : string

Type

string —

$dates

$dates : array

Type

array<string|int, mixed> —

$description

$description : string

Type

string —

$pattern

$pattern : string

Type

string —

$matrix

$matrix : string

Type

string —

$numericalResults

$numericalResults : array

Type

array<string|int, mixed> —

$comments

$comments : array

Type

array<string|int, mixed> —

$rule

$rule : string

Type

string —

$pdbXrefs

$pdbXrefs : array

Type

array<string|int, mixed> —

$dbRefs

$dbRefs : \Amelaye\BioPHP\Domain\Parser\Interfaces\PrositeDbRefInterface[]

Type

array<string|int, PrositeDbRefInterface> —

$docXref

$docXref : string

Type

string —

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 PROSITE entry.

Parameters

string $sLine

The line to analyze

Returns

bool —

isEntryEnd()

isEntryEnd(string  $sLine) : bool

Tells whether a line closes a PROSITE entry.

Parameters

string $sLine

The line to analyze

Returns

bool —

getEntryId()

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

Extracts the identifier uniquely naming a PROSITE 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 PROSITE 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

getEntryName()

getEntryName() : string

Returns

string —

getEntryType()

getEntryType() : string

Returns

string —

getAccession()

getAccession() : string

Returns

string —

getDates()

getDates() : array

Returns

array —

getDescription()

getDescription() : string

Returns

string —

getPattern()

getPattern() : string

Returns

string —

getMatrix()

getMatrix() : string

Returns

string —

getNumericalResults()

getNumericalResults() : array

Returns

array —

getComments()

getComments() : array

Returns

array —

getRule()

getRule() : string

Returns

string —

getPdbXrefs()

getPdbXrefs() : array

Returns

array —

getDbRefs()

getDbRefs() : \Amelaye\BioPHP\Domain\Parser\Interfaces\PrositeDbRefInterface[]

Returns

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

getDocXref()

getDocXref() : string

Returns

string —

accumulate()

accumulate(\ArrayIterator  $aLines, array  $aFlines, string  $sTag, string  $sJoiner) : string

Accumulates a multi-line field: the current line's data, plus every following line still tagged $sTag, joined with $sJoiner. Advances $aLines past what it reads.

Parameters

\ArrayIterator $aLines
array $aFlines
string $sTag
string $sJoiner

Returns

string —

parseId()

parseId(string  $sLine) : mixed

Parses the ID line.

Format : ID ENTRYNAME; TYPE.

Parameters

string $sLine

Returns

mixed —

parseDate()

parseDate(string  $sLine) : mixed

Parses the DT line.

Format : DT MMM-YEAR (CREATED); MMM-YEAR (DATA UPDATE); MMM-YEAR (INFO UPDATE).

Parameters

string $sLine

Returns

mixed —

parseQualifiers()

parseQualifiers(string  $sText) : array

Turns a "/qualifier=value; /qualifier=value;" string into an associative array.

Parameters

string $sText

Returns

array —

parseList()

parseList(string  $sText) : array

Turns a "item1; item2; item3." string into a plain array.

Parameters

string $sText

Returns

array —

parseDbRefs()

parseDbRefs(string  $sText) : \Amelaye\BioPHP\Domain\Parser\Interfaces\PrositeDbRefInterface[]

Turns the DR field into a list of PrositeDbRef.

Format : DR ACCESSION, ENTRY_NAME, T|F|N; ACCESSION, ENTRY_NAME, T|F|N; ...

Parameters

string $sText

Returns

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