Documentation

MolecularSequenceFactory

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
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

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

fromMolType()

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

Tags
throws
InvalidSequenceException

When the molecule type is unknown or a symbol is invalid

Return values
AbstractMolecularSequence
On this page

Search results