ParseAaindexManager
in package
implements
ParseDatabaseInterface
Class ParseAaindexManager An AAINDEX1 entry describes a numerical property of the twenty amino acids, not a sequence, so this class exposes plain scalars rather than the Sequence/Feature entities of ParseDbAbstractManager. Its data fields are single letter tags whose continuation lines start with a space, the GenBank way. The C (correlated entries) and I (index values) fields are not decomposed : they are fixed numeric tables the original BioPHP parser never touched either.
Tags
Table of Contents
Interfaces
- ParseDatabaseInterface
- Interface ParseDatabaseInterface
Properties
- $accession : string
- $author : string
- $description : string
- $journal : string
- $litRefs : array<string|int, mixed>
- $title : string
Methods
- __construct() : mixed
- Constructor.
- getAccession() : string
- getAuthor() : string
- getDescription() : string
- getEntryId() : string
- Extracts the identifier uniquely naming an AAINDEX1 entry.
- getFormat() : string
- The name this format is known by in the collection records and in DatabaseParserFactory.
- getJournal() : string
- getLitRefs() : array<string|int, mixed>
- Cross-references, keyed by database name.
- getTitle() : string
- isEntryEnd() : bool
- Tells whether a line closes an AAINDEX1 entry.
- isEntryStart() : bool
- Tells whether a line opens a new AAINDEX1 entry.
- parseDataFile() : Sequence
- Parses an AAINDEX1 data file and populates this manager's fields.
- parseReferences() : void
- Reads the R line, which lists cross-references as "DBNAME:ID" pairs. The line is allowed to be empty.
Properties
$accession
private
string
$accession
= ""
$author
private
string
$author
= ""
$description
private
string
$description
= ""
$journal
private
string
$journal
= ""
$litRefs
private
array<string|int, mixed>
$litRefs
= []
$title
private
string
$title
= ""
Methods
__construct()
Constructor.
public
__construct() : mixed
getAccession()
public
getAccession() : string
Return values
stringgetAuthor()
public
getAuthor() : string
Return values
stringgetDescription()
public
getDescription() : string
Return values
stringgetEntryId()
Extracts the identifier uniquely naming an AAINDEX1 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
stringgetFormat()
The name this format is known by in the collection records and in DatabaseParserFactory.
public
static getFormat() : string
Return values
stringgetJournal()
public
getJournal() : string
Return values
stringgetLitRefs()
Cross-references, keyed by database name.
public
getLitRefs() : array<string|int, mixed>
Return values
array<string|int, mixed>getTitle()
public
getTitle() : string
Return values
stringisEntryEnd()
Tells whether a line closes an AAINDEX1 entry.
public
static isEntryEnd(string $sLine) : bool
Parameters
- $sLine : string
-
The line to analyze
Return values
boolisEntryStart()
Tells whether a line opens a new AAINDEX1 entry.
public
static isEntryStart(string $sLine) : bool
Parameters
- $sLine : string
-
The line to analyze
Return values
boolparseDataFile()
Parses an AAINDEX1 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
parseReferences()
Reads the R line, which lists cross-references as "DBNAME:ID" pairs. The line is allowed to be empty.
private
parseReferences(string $sData) : void
Example: R LIT:1810048b PMID:1575719
Parameters
- $sData : string
-
The R line, tag stripped