Documentation

ParsePrositeManager implements ParseDatabaseInterface

FinalYes

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.

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Interfaces

ParseDatabaseInterface
Interface ParseDatabaseInterface

Properties

$accession  : string
$comments  : array<string|int, mixed>
$dates  : array<string|int, mixed>
$dbRefs  : array<string|int, PrositeDbRef>
$description  : string
$docXref  : string
$entryName  : string
$entryType  : string
$matrix  : string
$numericalResults  : array<string|int, mixed>
$pattern  : string
$pdbXrefs  : array<string|int, mixed>
$rule  : string

Methods

__construct()  : mixed
Constructor.
getAccession()  : string
getComments()  : array<string|int, mixed>
getDates()  : array<string|int, mixed>
getDbRefs()  : array<string|int, PrositeDbRef>
getDescription()  : string
getDocXref()  : string
getEntryId()  : string
Extracts the identifier uniquely naming a PROSITE entry.
getEntryName()  : string
getEntryType()  : string
getFormat()  : string
The name this format is known by in the collection records and in DatabaseParserFactory.
getMatrix()  : string
getNumericalResults()  : array<string|int, mixed>
getPattern()  : string
getPdbXrefs()  : array<string|int, mixed>
getRule()  : string
isEntryEnd()  : bool
Tells whether a line closes a PROSITE entry.
isEntryStart()  : bool
Tells whether a line opens a new PROSITE entry.
parseDataFile()  : Sequence
Parses a PROSITE data file and populates this manager's fields.
accumulate()  : 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.
parseDate()  : mixed
Parses the DT line.
parseDbRefs()  : array<string|int, PrositeDbRef>
Turns the DR field into a list of PrositeDbRef.
parseId()  : mixed
Parses the ID line.
parseList()  : array<string|int, mixed>
Turns a "item1; item2; item3." string into a plain array.
parseQualifiers()  : array<string|int, mixed>
Turns a "/qualifier=value; /qualifier=value;" string into an associative array.

Properties

Methods

getComments()

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

getDates()

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

getEntryId()

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

getFormat()

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

public static getFormat() : string
Return values
string

getNumericalResults()

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

getPdbXrefs()

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

isEntryEnd()

Tells whether a line closes a PROSITE 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 PROSITE entry.

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

The line to analyze

Return values
bool

parseDataFile()

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

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

accumulate()

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.

private accumulate(ArrayIterator $aLines, array<string|int, mixed> $aFlines, string $sTag, string $sJoiner) : string
Parameters
$aLines : ArrayIterator
$aFlines : array<string|int, mixed>
$sTag : string
$sJoiner : string
Return values
string

parseDate()

Parses the DT line.

private parseDate(string $sLine) : mixed

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

Parameters
$sLine : string

parseDbRefs()

Turns the DR field into a list of PrositeDbRef.

private parseDbRefs(string $sText) : array<string|int, PrositeDbRef>

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

Parameters
$sText : string
Return values
array<string|int, PrositeDbRef>

parseId()

Parses the ID line.

private parseId(string $sLine) : mixed

Format : ID ENTRYNAME; TYPE.

Parameters
$sLine : string

parseList()

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

private parseList(string $sText) : array<string|int, mixed>
Parameters
$sText : string
Return values
array<string|int, mixed>

parseQualifiers()

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

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

Search results