MolecularSequenceFactory
in package
The molecule type stored by the parsers is the raw one of the source file : "mRNA" or "ss-DNA" for GenBank and EMBL, "PRT;" for Swiss-Prot. This factory maps those to the matching value object instead of leaving the caller compare strings.
Class MolecularSequenceFactory
Tags
Table of Contents
Methods
- fromEntity() : AbstractMolecularSequence
- Wraps the sequence held by a parsed record, using its own molecule type.
- fromMolType() : AbstractMolecularSequence
- Wraps a raw string according to a molecule type.
Methods
fromEntity()
Wraps the sequence held by a parsed record, using its own molecule type.
public
static fromEntity(Sequence $oSequence) : AbstractMolecularSequence
Parameters
- $oSequence : Sequence
-
A record coming from one of the database parsers
Tags
Return values
AbstractMolecularSequencefromMolType()
Wraps a raw string according to a molecule type.
public
static fromMolType(string $sMolType, string $sSequence) : AbstractMolecularSequence
A record declared as RNA is not always written with uracil : GenBank and EMBL store their mRNA entries with thymine, following the cDNA convention. When the symbols contradict the declared type, the symbols win, so that a real record can always be wrapped.
Parameters
- $sMolType : string
-
A raw molecule type, e.g. "DNA", "mRNA", "ss-DNA", "PRT;"
- $sSequence : string
-
The raw sequence string