Documentation

ParsePmdManager implements ParseDatabaseInterface

FinalYes

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
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

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

Methods

getAuthors()

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
string

getFormat()

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

public static getFormat() : string
Return values
string

getMutationType()

public getMutationType() : string
Return values
string

isEntryEnd()

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
bool

isEntryStart()

Tells whether a line opens a new PMD entry.

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

The line to analyze

Return values
bool

parseDataFile()

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
throws
Exception
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

Return values
array<string|int, mixed>
On this page

Search results