ParsePmdManager
in package
implements
ParseDatabaseInterface
Class ParsePmdManager A PMD entry describes a mutation reported in the literature, not a sequence, so this class exposes plain scalars rather than the Sequence/Feature entities of ParseDbAbstractManager.
The CHANGE, DISEASE and DBREF fields are left aside : their layout was never settled, and the original BioPHP parser declared them without ever filling them.
Tags
Table of Contents
Interfaces
- ParseDatabaseInterface
- Interface ParseDatabaseInterface
Constants
- LABEL_WIDTH : mixed = 16
- Width of the label column, the data starting right after it.
Properties
- $articleNo : string
- $authors : array<string|int, mixed>
- $entryNo : string
- $entryType : string
- $journal : string
- $medlineNo : string
- $mutationType : string
- $title : string
Methods
- __construct() : mixed
- Constructor.
- getArticleNo() : string
- getAuthors() : array<string|int, mixed>
- getEntryId() : string
- Extracts the identifier uniquely naming a PMD entry, which is the entry type followed by its number.
- getEntryNo() : string
- getEntryType() : string
- getFormat() : string
- The name this format is known by in the collection records and in DatabaseParserFactory.
- getJournal() : string
- getMedlineNo() : string
- getMutationType() : string
- getTitle() : string
- isEntryEnd() : bool
- Tells whether a line closes a PMD entry. PMD uses a triple slash, where the GenBank family uses a double one.
- isEntryStart() : bool
- Tells whether a line opens a new PMD entry.
- parseDataFile() : Sequence
- Parses a PMD data file and populates this manager's fields.
- parseEntry() : void
- Reads the ENTRY line. The entry type is its first character and the entry number the six that follow, both at fixed positions.
- splitAuthors() : array<string|int, mixed>
- Authors are written as a list separated by commas and closed by an ampersand.
Constants
LABEL_WIDTH
Width of the label column, the data starting right after it.
private
mixed
LABEL_WIDTH
= 16
Properties
$articleNo
private
string
$articleNo
= ""
$authors
private
array<string|int, mixed>
$authors
= []
$entryNo
private
string
$entryNo
= ""
$entryType
private
string
$entryType
= ""
$journal
private
string
$journal
= ""
$medlineNo
private
string
$medlineNo
= ""
$mutationType
private
string
$mutationType
= ""
$title
private
string
$title
= ""
Methods
__construct()
Constructor.
public
__construct() : mixed
getArticleNo()
public
getArticleNo() : string
Return values
stringgetAuthors()
public
getAuthors() : array<string|int, mixed>
Return values
array<string|int, mixed>getEntryId()
Extracts the identifier uniquely naming a PMD entry, which is the entry type followed by its number.
public
static getEntryId(array<string|int, mixed> $aFlines, string $sLine) : string
Example: ENTRY A000300 - Artificial 2607383
Parameters
- $aFlines : array<string|int, mixed>
-
The whole file, buffered
- $sLine : string
-
The line opening the entry
Return values
stringgetEntryNo()
public
getEntryNo() : 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
stringgetJournal()
public
getJournal() : string
Return values
stringgetMedlineNo()
public
getMedlineNo() : string
Return values
stringgetMutationType()
public
getMutationType() : string
Return values
stringgetTitle()
public
getTitle() : string
Return values
stringisEntryEnd()
Tells whether a line closes a PMD entry. PMD uses a triple slash, where the GenBank family uses a double one.
public
static isEntryEnd(string $sLine) : bool
Parameters
- $sLine : string
-
The line to analyze
Return values
boolisEntryStart()
Tells whether a line opens a new PMD entry.
public
static isEntryStart(string $sLine) : bool
Parameters
- $sLine : string
-
The line to analyze
Return values
boolparseDataFile()
Parses a PMD 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
parseEntry()
Reads the ENTRY line. The entry type is its first character and the entry number the six that follow, both at fixed positions.
private
parseEntry(string $sData) : void
Parameters
- $sData : string
-
The ENTRY line, label stripped
splitAuthors()
Authors are written as a list separated by commas and closed by an ampersand.
private
splitAuthors(string $sAuthors) : array<string|int, mixed>
Parameters
- $sAuthors : string
-
The accumulated AUTHORS lines