Documentation

ParseGenomeManager implements ParseDatabaseInterface

FinalYes

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 GenomeReference objects rather than the Sequence/Feature entities of ParseDbAbstractManager. Its continuation lines are indented with a tab.

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Interfaces

ParseDatabaseInterface
Interface ParseDatabaseInterface

Properties

$commonName  : string
$gbBasepairs  : int
$gbEntries  : int
$gbRelease  : string
$isComplete  : string
$organism  : string
$references  : array<string|int, GenomeReference>
$size  : int
$taxClass  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructor.
getCommonName()  : string
getEntryId()  : string
Extracts the identifier uniquely naming a genome record, which is the scientific name of the organism.
getFormat()  : string
The name this format is known by in the collection records and in DatabaseParserFactory.
getGbBasepairs()  : int
getGbEntries()  : int
getGbRelease()  : string
getIsComplete()  : string
Whether the genome has been completely sequenced, as written in the record.
getOrganism()  : string
The scientific name of the organism.
getReferences()  : array<string|int, GenomeReference>
getSize()  : int
The haploid genome size, in base pairs.
getTaxClass()  : array<string|int, mixed>
isEntryEnd()  : bool
Tells whether a line closes a genome record.
isEntryStart()  : bool
Tells whether a line opens a new genome record.
parseDataFile()  : Sequence
Parses a genome data file and populates this manager's fields.
closeReference()  : void
Files the reference being filled, with the multiline fields it accumulated.
readData()  : string
Everything a line carries after its label, or the whole of an indented line.
readLabel()  : string
The label opening a line, upper cased. An indented line continues the one above it and has no label of its own.
splitTaxonomy()  : array<string|int, mixed>
The classification is a semicolon separated lineage which may run over several lines.

Properties

Methods

getEntryId()

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

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

getIsComplete()

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

public getIsComplete() : string
Return values
string

getOrganism()

The scientific name of the organism.

public getOrganism() : string
Return values
string

getSize()

The haploid genome size, in base pairs.

public getSize() : int
Return values
int

getTaxClass()

public getTaxClass() : array<string|int, mixed>
Return values
array<string|int, mixed>

isEntryEnd()

Tells whether a line closes a genome record.

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

The line to analyze

Return values
bool

isEntryStart()

Tells whether a line opens a new genome record.

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

The line to analyze

Return values
bool

parseDataFile()

Parses a genome 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

closeReference()

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

private closeReference(GenomeReference|null $oReference, string $sAuthors, string $sTitle) : void
Parameters
$oReference : GenomeReference|null

The reference set, if one is open

$sAuthors : string

The accumulated REF_AUTHOR lines

$sTitle : string

The accumulated REF_TITLE lines

readData()

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

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

The line to analyze

Return values
string

readLabel()

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

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

The line to analyze

Return values
string

splitTaxonomy()

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

private splitTaxonomy(string $sTaxonomy) : array<string|int, mixed>
Parameters
$sTaxonomy : string

The accumulated CLASSIFICATION lines

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

Search results