\Amelaye\BioPHP\Domain\Parser\Service ParseGenomeManager

Class ParseGenomeManager A genome record sums up how far an organism has been sequenced. It holds statistics and a list of references rather than a sequence, so this class exposes plain scalars and GenomeReferenceInterface objects rather than the Sequence/Feature entities of ParseDbAbstractManager. Its continuation lines are indented with a tab.

Summary

Methods
Properties
Constants
__construct
getFormat
isEntryStart
isEntryEnd
getEntryId
parseDataFile
getOrganism
getCommonName
getTaxClass
getIsComplete
getGbRelease
getGbEntries
getGbBasepairs
getSize
getReferences
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
readLabel
readData
closeReference
splitTaxonomy
organism
commonName
taxClass
isComplete
gbRelease
gbEntries
gbBasepairs
size
references
No private constants found

Properties

$organism

$organism : string

Type

string —

$commonName

$commonName : string

Type

string —

$taxClass

$taxClass : array

Type

array<string|int, mixed> —

$isComplete

$isComplete : string

Type

string —

$gbRelease

$gbRelease : string

Type

string —

$gbEntries

$gbEntries : int

Type

int —

$gbBasepairs

$gbBasepairs : int

Type

int —

$size

$size : int

Type

int —

$references

$references : \Amelaye\BioPHP\Domain\Parser\Interfaces\GenomeReferenceInterface[]

Type

array<string|int, GenomeReferenceInterface> —

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 genome record.

Parameters

string $sLine

The line to analyze

Returns

bool —

isEntryEnd()

isEntryEnd(string  $sLine) : bool

Tells whether a line closes a genome record.

Parameters

string $sLine

The line to analyze

Returns

bool —

getEntryId()

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

Extracts the identifier uniquely naming a genome record, which is the scientific name of the organism.

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 a genome data file and populates this manager's fields.

Parameters

array $aFlines

The lines the script has to parse

Throws

\Exception

Returns

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

$oSequence

getOrganism()

getOrganism() : string

The scientific name of the organism.

Returns

string —

getCommonName()

getCommonName() : string

Returns

string —

getTaxClass()

getTaxClass() : array

Returns

array —

getIsComplete()

getIsComplete() : string

Whether the genome has been completely sequenced, as written in the record.

Returns

string —

getGbRelease()

getGbRelease() : string

Returns

string —

getGbEntries()

getGbEntries() : int

Returns

int —

getGbBasepairs()

getGbBasepairs() : int

Returns

int —

getSize()

getSize() : int

The haploid genome size, in base pairs.

Returns

int —

getReferences()

getReferences() : \Amelaye\BioPHP\Domain\Parser\Interfaces\GenomeReferenceInterface[]

Returns

\Amelaye\BioPHP\Domain\Parser\Interfaces\GenomeReferenceInterface[] —

readLabel()

readLabel(string  $sLine) : string

The label opening a line, upper cased. An indented line continues the one above it and has no label of its own.

Parameters

string $sLine

The line to analyze

Returns

string —

readData()

readData(string  $sLine) : string

Everything a line carries after its label, or the whole of an indented line.

Parameters

string $sLine

The line to analyze

Returns

string —

closeReference()

closeReference(\Amelaye\BioPHP\Domain\Parser\Interfaces\GenomeReferenceInterface|null  $oReference, string  $sAuthors, string  $sTitle) : void

Files the reference being filled, with the multiline fields it accumulated.

Parameters

\Amelaye\BioPHP\Domain\Parser\Interfaces\GenomeReferenceInterface|null $oReference

The reference set, if one is open

string $sAuthors

The accumulated REF_AUTHOR lines

string $sTitle

The accumulated REF_TITLE lines

Returns

void —

splitTaxonomy()

splitTaxonomy(string  $sTaxonomy) : array

The classification is a semicolon separated lineage which may run over several lines.

Parameters

string $sTaxonomy

The accumulated CLASSIFICATION lines

Returns

array —