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 field lists the entries the index correlates with, and the I field the index values themselves, one per amino acid : the original BioPHP parser left both aside, so the data of the entry was never available.
Tags
Table of Contents
Interfaces
- ParseDatabaseInterface
- Interface ParseDatabaseInterface
Properties
- $accession : string
- $author : string
- $correlations : array<string, float>
- The entries this index correlates with (C field), accession => correlation coefficient
- $description : string
- $index : array<string, float|null>
- The index value of each amino acid (I field), one-letter code => value, null for "NA"
- $journal : string
- $litRefs : array<string|int, mixed>
- $title : string
Methods
- __construct() : mixed
- Constructor.
- getAccession() : string
- getAuthor() : string
- getCorrelations() : array<string, float>
- 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.
- getIndex() : array<string, float|null>
- 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.
- parseCorrelations() : array<string, float>
- Reads the C field : pairs of an entry's accession and its correlation coefficient.
- parseIndex() : array<string, float|null>
- Reads the I field : a header of ten pairs naming the amino acids ("A/L R/K ..."), then a row of values for the first residue of each pair and a row for the second one. A value missing from the original study is written "NA".
- 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
= ""
$correlations
The entries this index correlates with (C field), accession => correlation coefficient
private
array<string, float>
$correlations
= []
$description
private
string
$description
= ""
$index
The index value of each amino acid (I field), one-letter code => value, null for "NA"
private
array<string, float|null>
$index
= []
$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
stringgetCorrelations()
public
getCorrelations() : array<string, float>
Return values
array<string, float> —The entries this index correlates with, accession => coefficient
getDescription()
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
stringgetIndex()
public
getIndex() : array<string, float|null>
Return values
array<string, float|null> —One-letter amino acid code => index value, null when the entry has none ("NA")
getJournal()
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
parseCorrelations()
Reads the C field : pairs of an entry's accession and its correlation coefficient.
private
parseCorrelations(string $sData) : array<string, float>
Example: C BUNA790101 0.949 ZIMJ680102 0.917
Parameters
- $sData : string
-
The C field, tag stripped, its lines joined
Return values
array<string, float>parseIndex()
Reads the I field : a header of ten pairs naming the amino acids ("A/L R/K ..."), then a row of values for the first residue of each pair and a row for the second one. A value missing from the original study is written "NA".
private
parseIndex(string $sData) : array<string, float|null>
Example: I A/L R/K N/M ... 4.35 4.38 4.75 ... 4.17 4.36 4.52 ...
Parameters
- $sData : string
-
The I field, tag stripped, its lines joined
Return values
array<string, float|null>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