\Amelaye\BioPHP\Domain\Sequence\Traits SequenceTrait

Trait SequenceTrait

Summary

Methods
Properties
Constants
compDNA
revCompDNA
cleanSequence
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Methods

compDNA()

compDNA(string  $sSequence) : string

Returns complement of sequence $sSequence

Parameters

string $sSequence

Throws

\Exception

Returns

string —

revCompDNA()

revCompDNA(string  $sSequence) : string

Will yield the Reverse complement of a DNA sequence. Allows degenerated nucleotides

Parameters

string $sSequence

is the sequence

Throws

\Exception

Returns

string —

cleanSequence()

cleanSequence(string  $sSequence, string  $sMolType) : bool

Checks that a sequence only holds symbols belonging to the alphabet of its molecule type.

The comparison is case insensitive, so a record read from a GenBank or EMBL file, where the sequence is written in lower case, is not rejected for that reason alone.

Parameters

string $sSequence

The sequence

string $sMolType

DNA, RNA or PROTEIN

Returns

bool —

TRUE when every symbol is known, FALSE when one of them is not, and FALSE as well when the molecule type itself cannot be checked