Properties

$accession

$accession : array

Type

normal

$sequence

$sequence : \Amelaye\BioPHP\Domain\Sequence\Entity\Sequence

Type

normal

$authors

$authors : array

Type

normal

$features

$features : array

Type

normal

$keywords

$keywords : array

Type

normal

$references

$references : array

Type

normal

$srcForm

$srcForm : \Amelaye\BioPHP\Domain\Sequence\Entity\SrcForm

Type

normal

$gbSequence

$gbSequence : \Amelaye\BioPHP\Domain\Sequence\Entity\GbSequence

Type

normal

$spDatabank

$spDatabank : array

Type

normal

$aLines

$aLines : array

Type

normal

Methods

__construct()

__construct() : mixed

Constructor.

Returns

mixed

getAccession()

getAccession() : array

Returns

array

getSequence()

getSequence() : \Amelaye\BioPHP\Domain\Sequence\Entity\Sequence

Returns

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

getAuthors()

getAuthors() : array

Returns

array

getGbSequence()

getGbSequence() : \Amelaye\BioPHP\Domain\Sequence\Entity\GbSequence

Returns

\Amelaye\BioPHP\Domain\Sequence\Entity\GbSequence

getFeatures()

getFeatures() : array

Returns

array

getKeywords()

getKeywords() : array

Returns

array

getReferences()

getReferences() : array

Returns

array

getSrcForm()

getSrcForm() : \Amelaye\BioPHP\Domain\Sequence\Entity\SrcForm

Returns

\Amelaye\BioPHP\Domain\Sequence\Entity\SrcForm

getSpDatabank()

getSpDatabank() : array

Returns

array

setAccession()

setAccession(array  $accession) : void

Parameters

array $accession

setSequence()

setSequence(\Amelaye\BioPHP\Domain\Sequence\Entity\Sequence  $sequence) : void

Parameters

\Amelaye\BioPHP\Domain\Sequence\Entity\Sequence $sequence

setAuthors()

setAuthors(array  $authors) : void

Parameters

array $authors

setFeatures()

setFeatures(array  $features) : void

Parameters

array $features

setKeywords()

setKeywords(array  $keywords) : void

Parameters

array $keywords

setReferences()

setReferences(array  $references) : void

Parameters

array $references

setSrcForm()

setSrcForm(\Amelaye\BioPHP\Domain\Sequence\Entity\SrcForm  $srcForm) : void

Parameters

\Amelaye\BioPHP\Domain\Sequence\Entity\SrcForm $srcForm

setGbSequence()

setGbSequence(\Amelaye\BioPHP\Domain\Sequence\Entity\GbSequence  $gbSequence) : void

Parameters

\Amelaye\BioPHP\Domain\Sequence\Entity\GbSequence $gbSequence

setSpDatabank()

setSpDatabank(array  $spDatabank) : void

Parameters

array $spDatabank

parseDataFile()

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

Parses a Swissprot data file and returns a Seq object containing parsed data.

Parses the Feature Table lines (those that begin with FT) in a Swissprot data file, extracts the feature key name, from endpoint, to endpoint, and description, and stores them in a (simple) array.

Parameters

array $aFlines

The lines the script has to parse

Throws

\Exception

Returns

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

$oSequence

left()

left(string  $str, int  $numchars) : bool|string

Returns the first $numchars characters of a string.

Parameters

string $str
int $numchars

Returns

bool|string

right()

right(string  $str, int  $numchars) : bool|string

Returns the substring beginning at $numchars characters from the right end of a string.

Parameters

string $str
int $numchars

Returns

bool|string

intrim()

intrim(string  $string) : mixed

Removes "internal spaces" (as opposed to leading and trailing spaces) from a string.

Parameters

string $string

Returns

mixed

getmin()

getmin(int  $x, int  $y, int  $z) : int

Gets the minimum of three (usually numeric) values $x, $y, and $z.

For now, this can't handle situations when one or more arguments is FALSE.

Parameters

int $x
int $y
int $z

Returns

int

rem_right()

rem_right(string  $str, int  $charcount = 1) : bool|string

Removes $charcount characters from the right (end) of a string.

Parameters

string $str
int $charcount

Returns

bool|string

trim_element()

trim_element( $value,  $key) : mixed

trim_element() removes leading and trailing spaces from a string. In conjunction with the array_walk() function, it removes spaces from each element of an array.

Parameters

$value
$key

Returns

mixed

buildIDFields()

buildIDFields() : mixed

Parses ID line Format : ID PROTNAME_PROTSOURCE DATA_CLASS; MOL_TYPE; LENGTH AA.

Throws

\Exception

Returns

mixed

buildACFields()

buildACFields(array  $aAccess) : array

Parses AC line Format : AC P01375;

Parameters

array $aAccess

Throws

\Exception

Returns

array

buildDTFields()

buildDTFields() : mixed

Parses DT Line Format : DT 21-JUL-1986 (REL. 01, LAST SEQUENCE UPDATE)

Throws

\Exception

Returns

mixed

buildDEFields()

buildDEFields(string  $sDescription, int  $iDescCpt) : mixed

Parses DE line Format : DE TUMOR NECROSIS FACTOR PRECURSOR (TNF-ALPHA) (CACHECTIN).

Parameters

string $sDescription
int $iDescCpt

Throws

\Exception

Returns

mixed

buildKWFields()

buildKWFields(string  $sKeywords) : mixed

Parses KW Fields Format : KW WORD1; WORD2; WORD3; etc .

..

Parameters

string $sKeywords

Throws

\Exception

Returns

mixed

buildOSFields()

buildOSFields(string  $sSource, int  $iSourceCpt) : mixed

Parses OS line Format : OS HOMO SAPIENS (HUMAN).

Parameters

string $sSource
int $iSourceCpt

Throws

\Exception

Returns

mixed

buildOCField()

buildOCField(string  $sOrganism, int  $iOrgaCpt) : mixed

Parses OC lines Format : OC EUKARYOTA; METAZOA; CHORDATA; VERTEBRATA; TETRAPODA; MAMMALIA; OC EUTHERIA; PRIMATES.

Parameters

string $sOrganism
int $iOrgaCpt

Throws

\Exception

Returns

mixed

buildFTField()

buildFTField() : mixed

Parses FT lines Format : FT KEY START END COMMENT.

Throws

\Exception

Returns

mixed

buildDRField()

buildDRField() : mixed

Parses DR lines Format : DR DATA_BANK_IDENTIFIER; PRIMARY_IDENTIFIER; SECONDARY_IDENTIFIER We assume that all three data items are mandatory/present in all DR entries.

( refno => ( (dbname1, pid1, sid1), (dbname2, pid2, sid2), ... ), 1 => ( ... ) ) ( 0 => ( (REBASE, pid1, sid1), (WORPEP, pid2, sid2), ... ), 1 => ( ... ) ) ( rn => ( "rp" => "my rp", "rc" => ("tok1" => "value", ...) ) ) ( 10 => ( "RP" => "my rp", "RC" => ("PLASMID" => "PLA_VAL", ... ) ) ) Example: DR AARHUS/GHENT-2DPAGE; 8006; IEF.

Throws

\Exception

Returns

mixed

buildRNField()

buildRNField(array  $aFlines, array  $aReferences, array  $aAuthors) : mixed

Parses RN lines - This is a paragraph which contains several lines Example : RN [8] RP X-RAY CRYSTALLOGRAPHY (2.6 ANGSTROMS).

RX MEDLINE; 90008932. RA ECK M.J., SPRANG S.R.; RL J. BIOL. CHEM. 264:17595-17605(1989).

Parameters

array $aFlines
array $aReferences
array $aAuthors

Throws

\Exception

Returns

mixed

buildGNField()

buildGNField( $aGename) : mixed

Parses GN line - GN is always exactly one line.

GNAME1 OR GNAME2 ( (GNAME1, GNAME2) ) GNAME1 AND GNAME2 ( (GNAME1), (GNAME2) ) GNAME1 AND (GNAME2 OR GNAME3) ( (GNAME1), (GNAME2, GNAME3) ) GNAME1 OR (GNAME2 AND GNAME3) NOT POSSIBLE!!! ALGORITHM: 1) Split expressions by " AND ". 2) Test each "token" if in between parentheses or not. 3) If not, then token is a singleton, else it's a multiple-ton. 4) Singletons are translated into (GNAME1). Multiple-tons are translated into (GNAME1, GNAME 2). 5) Push gene name array into larger array. Go to next token.

Parameters

$aGename

Throws

\Exception

Returns

mixed

buildSQField()

buildSQField() : mixed

Parses SQ lines and below SQ SEQUENCE XXXX AA; XXXXX MW; XXXXX CN;

Throws

\Exception

Returns

mixed

makeRefArray()

makeRefArray(array  $aReferences) : mixed

Creates references array

Parameters

array $aReferences

Throws

\Exception

Returns

mixed