ParsePrintsManager
in package
implements
ParseDatabaseInterface
Class ParsePrintsManager A PRINTS entry describes a protein fingerprint, not a sequence, so this class exposes plain scalars rather than the Sequence/Feature entities of ParseDbAbstractManager. Its data fields are lower case three-character tags ending with a semicolon (gc;, gn;, ga;, gd;), unlike every other format the library reads.
Tags
Table of Contents
Interfaces
- ParseDatabaseInterface
- Interface ParseDatabaseInterface
Properties
- $createDate : string
- $description : string
- $entryName : string
- $entryType : string
- $updDate : string
Methods
- __construct() : mixed
- Constructor.
- getCreateDate() : string
- getDescription() : string
- getEntryId() : string
- Extracts the identifier uniquely naming a PRINTS entry.
- getEntryName() : string
- getEntryType() : string
- getFormat() : string
- The name this format is known by in the collection records and in DatabaseParserFactory.
- getUpdDate() : string
- isEntryEnd() : bool
- PRINTS entries carry no end-of-entry marker, so a stream holding several of them cannot be split : reading stops at the end of the file. This mirrors the original BioPHP parser, which had the same limitation.
- isEntryStart() : bool
- Tells whether a line opens a new PRINTS entry. The gc; field carries the entry name and comes first.
- parseDataFile() : Sequence
- Parses a PRINTS data file and populates this manager's fields.
- parseDates() : void
- Reads the ga; line, which carries the creation date then any number of "KEY value" pairs.
Properties
$createDate
private
string
$createDate
= ""
$description
private
string
$description
= ""
$entryName
private
string
$entryName
= ""
$entryType
private
string
$entryType
= ""
$updDate
private
string
$updDate
= ""
Methods
__construct()
Constructor.
public
__construct() : mixed
getCreateDate()
public
getCreateDate() : string
Return values
stringgetDescription()
public
getDescription() : string
Return values
stringgetEntryId()
Extracts the identifier uniquely naming a PRINTS 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
stringgetEntryName()
public
getEntryName() : string
Return values
stringgetEntryType()
public
getEntryType() : string
Return values
stringgetFormat()
The name this format is known by in the collection records and in DatabaseParserFactory.
public
static getFormat() : string
Return values
stringgetUpdDate()
public
getUpdDate() : string
Return values
stringisEntryEnd()
PRINTS entries carry no end-of-entry marker, so a stream holding several of them cannot be split : reading stops at the end of the file. This mirrors the original BioPHP parser, which had the same limitation.
public
static isEntryEnd(string $sLine) : bool
Parameters
- $sLine : string
-
The line to analyze
Return values
boolisEntryStart()
Tells whether a line opens a new PRINTS entry. The gc; field carries the entry name and comes first.
public
static isEntryStart(string $sLine) : bool
Parameters
- $sLine : string
-
The line to analyze
Return values
boolparseDataFile()
Parses a PRINTS 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
Return values
Sequence —$oSequence
parseDates()
Reads the ga; line, which carries the creation date then any number of "KEY value" pairs.
private
parseDates(string $sData) : void
Example: ga; 16-NOV-1995; UPDATE 06-JUN-1999
Parameters
- $sData : string
-
The ga; line, tag stripped