Documentation

ParseHgbaseManager implements ParseDatabaseInterface

FinalYes

Class ParseHgbaseManager An HGBase entry describes a human mutation and the population it was observed in, not a sequence, so this class exposes plain scalars rather than the Sequence/Feature entities of ParseDbAbstractManager. Its lines are a label, a tab, then the data.

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Interfaces

ParseDatabaseInterface
Interface ParseDatabaseInterface

Properties

$allele  : string
$citation  : string
$freqIndiv  : int
$freqPerc  : float
$haplotypeId  : string
$isInBlock  : string
$popIndiv  : int
$popName  : string
$populationId  : string
$sourceComment  : string
$sourceId  : string
$submissionId  : string
$submitterName  : string

Methods

__construct()  : mixed
Constructor.
getAllele()  : string
getCitation()  : string
getEntryId()  : string
Extracts the identifier uniquely naming an HGBase entry.
getFormat()  : string
The name this format is known by in the collection records and in DatabaseParserFactory.
getFreqIndiv()  : int
getFreqPerc()  : float
getHaplotypeId()  : string
getIsInBlock()  : string
getPopIndiv()  : int
getPopName()  : string
getPopulationId()  : string
getSourceComment()  : string
getSourceId()  : string
getSubmissionId()  : string
getSubmitterName()  : string
isEntryEnd()  : bool
Tells whether a line closes an HGBase entry.
isEntryStart()  : bool
Tells whether a line opens a new HGBase entry.
parseDataFile()  : Sequence
Parses an HGBase data file and populates this manager's fields.
parseFrequency()  : void
Reads a FREQUENCY line, which gives a percentage then the population it was measured on.
parsePopulation()  : void
Reads a POPULATION line, which names the population then counts its individuals.
parseSubmitter()  : void
Reads a SUBMITTER line, which names the submitter then gives the submission identifier.
readData()  : string
Everything a line carries after its label.
readLabel()  : string
The label opening a line, upper cased. Labels are separated from their data by a tab or a run of spaces.

Properties

Methods

getEntryId()

Extracts the identifier uniquely naming an HGBase 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
string

getFormat()

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

public static getFormat() : string
Return values
string

isEntryEnd()

Tells whether a line closes an HGBase entry.

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

The line to analyze

Return values
bool

isEntryStart()

Tells whether a line opens a new HGBase entry.

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

The line to analyze

Return values
bool

parseDataFile()

Parses an HGBase data file and populates this manager's fields.

public parseDataFile(array<string|int, mixed> $aFlines) : Sequence

The label is matched whole rather than by its first characters : POPULATION is a prefix of POPULATIONID, and the original BioPHP parser read a POPULATIONID line as both.

Parameters
$aFlines : array<string|int, mixed>

The lines the script has to parse

Tags
throws
Exception
Return values
Sequence

$oSequence

parseFrequency()

Reads a FREQUENCY line, which gives a percentage then the population it was measured on.

private parseFrequency(string $sData) : void

Example: 2% (1039 individuals)

Parameters
$sData : string

The line, label stripped

parsePopulation()

Reads a POPULATION line, which names the population then counts its individuals.

private parsePopulation(string $sData) : void

Example: Caucasian (USA) (216 individuals)

Parameters
$sData : string

The line, label stripped

parseSubmitter()

Reads a SUBMITTER line, which names the submitter then gives the submission identifier.

private parseSubmitter(string $sData) : void

Example: Jan. W. Koper (SUB0001234)

Parameters
$sData : string

The line, label stripped

readData()

Everything a line carries after its label.

private static readData(string $sLine) : string
Parameters
$sLine : string

The line to analyze

Return values
string

readLabel()

The label opening a line, upper cased. Labels are separated from their data by a tab or a run of spaces.

private static readLabel(string $sLine) : string
Parameters
$sLine : string

The line to analyze

Return values
string
On this page

Search results