\Amelaye\BioPHP\Domain\Parser\Service ParseTransfacFactorManager

Class ParseTransfacFactorManager A factor record describes one transcription factor : its name and synonyms, the organism it comes from, the structural class it belongs to and its homologs in other species.

Summary

Methods
Properties
Constants
getFormat
parseDataFile
getFactorName
getSynonyms
getOrganism
getSpecies
getTaxClass
getHomologs
getClassAccession
getClassId
getClassDecimalNo
getSequence
__construct
isEntryStart
isEntryEnd
getEntryId
getAccession
getId
getDateCreated
getDateUpdated
No public properties found
No public constants found
readLabel
readData
parseCommonField
parseDate
append
splitList
accession
id
dateCreated
dateUpdated
No protected constants found
parseOrganism
parseClass
factorName
synonyms
organism
species
taxClass
homologs
classAccession
classId
classDecimalNo
sequence
sSynonyms
sTaxonomy
sHomologs
No private constants found

Properties

$accession

$accession : string

Type

string —

$id

$id : string

Type

string —

$dateCreated

$dateCreated : string

Type

string —

$dateUpdated

$dateUpdated : string

Type

string —

$factorName

$factorName : string

Type

string —

$synonyms

$synonyms : array

Type

array<string|int, mixed> —

$organism

$organism : string

Common name of the organism, e.g. "human".

Type

string —

$species

$species : string

Scientific name of the organism, e.g. "homo sapiens".

Type

string —

$taxClass

$taxClass : array

Type

array<string|int, mixed> —

$homologs

$homologs : array

Type

array<string|int, mixed> —

$classAccession

$classAccession : string

Type

string —

$classId

$classId : string

Type

string —

$classDecimalNo

$classDecimalNo : string

Type

string —

$sequence

$sequence : string

Type

string —

$sSynonyms

$sSynonyms : string

Type

string —

$sTaxonomy

$sTaxonomy : string

Type

string —

$sHomologs

$sHomologs : string

Type

string —

Methods

getFormat()

getFormat() : string

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

Returns

string —

parseDataFile()

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

Parses a TRANSFAC factor 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

getFactorName()

getFactorName() : string

Returns

string —

getSynonyms()

getSynonyms() : array

Returns

array —

getOrganism()

getOrganism() : string

Returns

string —

getSpecies()

getSpecies() : string

Returns

string —

getTaxClass()

getTaxClass() : array

Returns

array —

getHomologs()

getHomologs() : array

Returns

array —

getClassAccession()

getClassAccession() : string

Returns

string —

getClassId()

getClassId() : string

Returns

string —

getClassDecimalNo()

getClassDecimalNo() : string

Returns

string —

getSequence()

getSequence() : string

Returns

string —

__construct()

__construct() : mixed

Constructor.

Returns

mixed —

isEntryStart()

isEntryStart(string  $sLine) : bool

Tells whether a line opens a new TRANSFAC record, which the accession number does.

Parameters

string $sLine

The line to analyze

Returns

bool —

isEntryEnd()

isEntryEnd(string  $sLine) : bool

Tells whether a line closes a TRANSFAC record.

Parameters

string $sLine

The line to analyze

Returns

bool —

getEntryId()

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

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

Parameters

array $aFlines

The whole file, buffered

string $sLine

The line opening the entry

Returns

string —

getAccession()

getAccession() : string

Returns

string —

getId()

getId() : string

Returns

string —

getDateCreated()

getDateCreated() : string

Returns

string —

getDateUpdated()

getDateUpdated() : string

Returns

string —

readLabel()

readLabel(string  $sLine) : string

Reads the two-letter label a line carries.

Parameters

string $sLine

The line to analyze

Returns

string —

readData()

readData(string  $sLine) : string

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

Parameters

string $sLine

The line to analyze

Returns

string —

parseCommonField()

parseCommonField(string  $sLabel, string  $sData) : 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.

Parameters

string $sLabel
string $sData

Returns

bool —

parseDate()

parseDate(string  $sData) : mixed

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

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

Parameters

string $sData

Returns

mixed —

append()

append(string  $sBuffer, string  $sData) : string

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

Parameters

string $sBuffer
string $sData

Returns

string —

splitList()

splitList(string  $sText, string  $sSeparator = ";") : array

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

Parameters

string $sText
string $sSeparator

Returns

array —

parseOrganism()

parseOrganism(string  $sData) : mixed

Parses the OS line, which names the organism twice : commonly, then scientifically.

Format : OS human, homo sapiens

Parameters

string $sData

Returns

mixed —

parseClass()

parseClass(string  $sData) : mixed

Parses the CL line, which points at the structural class of the factor.

Format : CL C0001; CH; 2.3.3.0.1.

Parameters

string $sData

Returns

mixed —