Documentation

ParseTransfacAbstractManager implements ParseDatabaseInterface

AbstractYes

Class ParseTransfacAbstractManager TRANSFAC ships one flat file per kind of record - matrix.dat, gene.dat, class.dat, cell.dat, factor.dat, site.dat - which all share the same grammar : a two-letter label in the first columns, its data from the fifth, "XX" lines spacing the fields apart and "//" closing the record. That grammar, the AC/ID/DT fields every record carries and the way a field spanning several lines is joined, live here; each subclass adds the fields of its own record.

The date reads by tokens rather than at the fixed offset Legacy/transfac.inc.php used for five of its six record types : that offset assumed a two-digit year ("20.06.90") and misses the marker as soon as the file writes the year in full, which TRANSFAC has long been doing.

Tags
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

Table of Contents

Interfaces

ParseDatabaseInterface
Interface ParseDatabaseInterface

Properties

$accession  : string
$dateCreated  : string
$dateUpdated  : string
$id  : string

Methods

__construct()  : mixed
Constructor.
getAccession()  : string
getDateCreated()  : string
getDateUpdated()  : string
getEntryId()  : string
Extracts the identifier uniquely naming a TRANSFAC record, its accession number.
getId()  : string
isEntryEnd()  : bool
Tells whether a line closes a TRANSFAC record.
isEntryStart()  : bool
Tells whether a line opens a new TRANSFAC record, which the accession number does.
append()  : string
Appends the data of a line to a field written over several of them.
parseCommonField()  : bool
Reads the fields every TRANSFAC record carries, and says whether it did : a subclass calls this first and only looks at the labels of its own record when it did not.
parseDate()  : mixed
Parses one DT line, which dates either the creation or the last update of the record and may carry a time of day.
readData()  : string
Reads the data a line carries, which starts at its fifth column.
readLabel()  : string
Reads the two-letter label a line carries.
splitList()  : array<string|int, mixed>
Splits a field listing its values, semicolon separated and possibly closed by a period, into its items.

Properties

Methods

getEntryId()

Extracts the identifier uniquely naming a TRANSFAC record, its accession number.

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

isEntryEnd()

Tells whether a line closes a TRANSFAC 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 TRANSFAC record, which the accession number does.

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

The line to analyze

Return values
bool

append()

Appends the data of a line to a field written over several of them.

protected append(string $sBuffer, string $sData) : string
Parameters
$sBuffer : string
$sData : string
Return values
string

parseCommonField()

Reads the fields every TRANSFAC record carries, and says whether it did : a subclass calls this first and only looks at the labels of its own record when it did not.

protected parseCommonField(string $sLabel, string $sData) : bool
Parameters
$sLabel : string
$sData : string
Return values
bool

parseDate()

Parses one DT line, which dates either the creation or the last update of the record and may carry a time of day.

protected parseDate(string $sData) : mixed

Format : DT 20.06.90 11:00:03 (created); ewi.

Parameters
$sData : string

readData()

Reads the data a line carries, which starts at its fifth column.

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

The line to analyze

Return values
string

readLabel()

Reads the two-letter label a line carries.

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

The line to analyze

Return values
string

splitList()

Splits a field listing its values, semicolon separated and possibly closed by a period, into its items.

protected splitList(string $sText[, string $sSeparator = ";" ]) : array<string|int, mixed>
Parameters
$sText : string
$sSeparator : string = ";"
Return values
array<string|int, mixed>
On this page

Search results