SequenceTrait
Trait SequenceTrait
Tags
Table of Contents
Methods
- cleanSequence() : bool
- Checks that a sequence only holds symbols belonging to the alphabet of its molecule type.
- compDNA() : string
- Returns complement of sequence $sSequence
- revCompDNA() : string
- Will yield the Reverse complement of a DNA sequence. Allows degenerated nucleotides
Methods
cleanSequence()
Checks that a sequence only holds symbols belonging to the alphabet of its molecule type.
public
cleanSequence(string $sSequence, string $sMolType) : bool
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
- $sSequence : string
-
The sequence
- $sMolType : string
-
DNA, RNA or PROTEIN
Return values
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
compDNA()
Returns complement of sequence $sSequence
public
compDNA(string $sSequence) : string
Parameters
- $sSequence : string
Tags
Return values
stringrevCompDNA()
Will yield the Reverse complement of a DNA sequence. Allows degenerated nucleotides
public
revCompDNA(string $sSequence) : string
Parameters
- $sSequence : string
-
is the sequence