ParseGenomeManager
in package
implements
ParseDatabaseInterface
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
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
$commonName
private
string
$commonName
= ""
$gbBasepairs
private
int
$gbBasepairs
= 0
$gbEntries
private
int
$gbEntries
= 0
$gbRelease
private
string
$gbRelease
= ""
$isComplete
private
string
$isComplete
= ""
$organism
private
string
$organism
= ""
$references
private
array<string|int, GenomeReference>
$references
= []
$size
private
int
$size
= 0
$taxClass
private
array<string|int, mixed>
$taxClass
= []
Methods
__construct()
Constructor.
public
__construct() : mixed
getCommonName()
public
getCommonName() : string
Return values
stringgetEntryId()
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
stringgetFormat()
The name this format is known by in the collection records and in DatabaseParserFactory.
public
static getFormat() : string
Return values
stringgetGbBasepairs()
public
getGbBasepairs() : int
Return values
intgetGbEntries()
public
getGbEntries() : int
Return values
intgetGbRelease()
public
getGbRelease() : string
Return values
stringgetIsComplete()
Whether the genome has been completely sequenced, as written in the record.
public
getIsComplete() : string
Return values
stringgetOrganism()
The scientific name of the organism.
public
getOrganism() : string
Return values
stringgetReferences()
public
getReferences() : array<string|int, GenomeReference>
Return values
array<string|int, GenomeReference>getSize()
The haploid genome size, in base pairs.
public
getSize() : int
Return values
intgetTaxClass()
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
boolisEntryStart()
Tells whether a line opens a new genome record.
public
static isEntryStart(string $sLine) : bool
Parameters
- $sLine : string
-
The line to analyze
Return values
boolparseDataFile()
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
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
stringreadLabel()
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
stringsplitTaxonomy()
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