\Amelaye\BioPHP\Domain\Parser\Service ParseHgbaseManager

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.

Summary

Methods
Properties
Constants
__construct
getFormat
isEntryStart
isEntryEnd
getEntryId
parseDataFile
getHaplotypeId
getAllele
getIsInBlock
getPopulationId
getPopName
getPopIndiv
getFreqPerc
getFreqIndiv
getSourceId
getCitation
getSubmitterName
getSubmissionId
getSourceComment
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
readLabel
readData
parsePopulation
parseFrequency
parseSubmitter
haplotypeId
allele
isInBlock
populationId
popName
popIndiv
freqPerc
freqIndiv
sourceId
citation
submitterName
submissionId
sourceComment
No private constants found

Properties

$haplotypeId

$haplotypeId : string

Type

string —

$allele

$allele : string

Type

string —

$isInBlock

$isInBlock : string

Type

string —

$populationId

$populationId : string

Type

string —

$popName

$popName : string

Type

string —

$popIndiv

$popIndiv : int

Type

int —

$freqPerc

$freqPerc : float

Type

float —

$freqIndiv

$freqIndiv : int

Type

int —

$sourceId

$sourceId : string

Type

string —

$citation

$citation : string

Type

string —

$submitterName

$submitterName : string

Type

string —

$submissionId

$submissionId : string

Type

string —

$sourceComment

$sourceComment : string

Type

string —

Methods

__construct()

__construct() : mixed

Constructor.

Returns

mixed —

getFormat()

getFormat() : string

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

Returns

string —

isEntryStart()

isEntryStart(string  $sLine) : bool

Tells whether a line opens a new HGBase entry.

Parameters

string $sLine

The line to analyze

Returns

bool —

isEntryEnd()

isEntryEnd(string  $sLine) : bool

Tells whether a line closes an HGBase entry.

Parameters

string $sLine

The line to analyze

Returns

bool —

getEntryId()

getEntryId(array  $aFlines, string  $sLine) : string

Extracts the identifier uniquely naming an HGBase entry.

Parameters

array $aFlines

The whole file, buffered

string $sLine

The line opening the entry

Returns

string —

parseDataFile()

parseDataFile(array  $aFlines) : \Amelaye\BioPHP\Domain\Sequence\Entity\Sequence

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

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

array $aFlines

The lines the script has to parse

Throws

\Exception

Returns

\Amelaye\BioPHP\Domain\Sequence\Entity\Sequence —

$oSequence

getHaplotypeId()

getHaplotypeId() : string

Returns

string —

getAllele()

getAllele() : string

Returns

string —

getIsInBlock()

getIsInBlock() : string

Returns

string —

getPopulationId()

getPopulationId() : string

Returns

string —

getPopName()

getPopName() : string

Returns

string —

getPopIndiv()

getPopIndiv() : int

Returns

int —

getFreqPerc()

getFreqPerc() : float

Returns

float —

getFreqIndiv()

getFreqIndiv() : int

Returns

int —

getSourceId()

getSourceId() : string

Returns

string —

getCitation()

getCitation() : string

Returns

string —

getSubmitterName()

getSubmitterName() : string

Returns

string —

getSubmissionId()

getSubmissionId() : string

Returns

string —

getSourceComment()

getSourceComment() : string

Returns

string —

readLabel()

readLabel(string  $sLine) : string

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

Parameters

string $sLine

The line to analyze

Returns

string —

readData()

readData(string  $sLine) : string

Everything a line carries after its label.

Parameters

string $sLine

The line to analyze

Returns

string —

parsePopulation()

parsePopulation(string  $sData) : void

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

Example: Caucasian (USA) (216 individuals)

Parameters

string $sData

The line, label stripped

Returns

void —

parseFrequency()

parseFrequency(string  $sData) : void

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

Example: 2% (1039 individuals)

Parameters

string $sData

The line, label stripped

Returns

void —

parseSubmitter()

parseSubmitter(string  $sData) : void

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

Example: Jan. W. Koper (SUB0001234)

Parameters

string $sData

The line, label stripped

Returns

void —