bpp-phyl  2.2.0
bpp::SubstitutionModelFactory Class Reference

Utilitary class for creating substitution models. More...

#include <Bpp/Phyl/Model/SubstitutionModelFactory.h>

+ Collaboration diagram for bpp::SubstitutionModelFactory:

Public Member Functions

 SubstitutionModelFactory (const Alphabet *alphabet, const GeneticCode *geneticCode)
 Creates a new factory object with the given alphabet. More...
 
 SubstitutionModelFactory (const SubstitutionModelFactory &smf)
 
SubstitutionModelFactoryoperator= (const SubstitutionModelFactory &smf)
 
virtual ~SubstitutionModelFactory ()
 
virtual SubstitutionModelcreateModel (const std::string &modelName) const throw (AlphabetException, Exception)
 Get a new dynamically created SubstitutionModel object. More...
 

Static Public Attributes

static const std::string JUKES_CANTOR = "JC69"
 
static const std::string KIMURA_2P = "K80"
 
static const std::string HASEGAWA_KISHINO_YANO = "HKY85"
 
static const std::string TAMURA_NEI = "TN93"
 
static const std::string GENERAL_TIME_REVERSIBLE = "HKY85"
 
static const std::string STRAND_SYMMETRIC_REVERSIBLE = "SSR"
 
static const std::string TAMURA = "T92"
 
static const std::string LOBRY = "L95"
 
static const std::string FELSENSTEIN = "F84"
 
static const std::string JOHN_TAYLOR_THORNTON = "JTT92"
 
static const std::string DAYHOFF_SCHWARTZ_ORCUTT = "DSO78"
 
static const std::string WHELAN_AND_GOLDMAN = "WAG"
 
static const std::string LE_GASCUEL = "LG08"
 

Private Attributes

const Alphabet * alphabet_
 
const GeneticCode * geneticCode_
 

Detailed Description

Utilitary class for creating substitution models.

Definition at line 61 of file SubstitutionModelFactory.h.

Constructor & Destructor Documentation

◆ SubstitutionModelFactory() [1/2]

bpp::SubstitutionModelFactory::SubstitutionModelFactory ( const Alphabet *  alphabet,
const GeneticCode *  geneticCode 
)
inline

Creates a new factory object with the given alphabet.

This factory only provides ways to instanciate simple substitution models, for nucleotides and proteins.

Parameters
alphabetThe alphabet for wich models must be instanciated.
geneticCodeGenetic code to use for codon model.

Example:

const Alphabet* alphabet = new DNA();
SubstitutionModel* model = SubstitutionModelFactory(alphabet)
// model can be used in any object dealing with a nucleotide substitution models.

Definition at line 100 of file SubstitutionModelFactory.h.

◆ SubstitutionModelFactory() [2/2]

bpp::SubstitutionModelFactory::SubstitutionModelFactory ( const SubstitutionModelFactory smf)
inline

Definition at line 103 of file SubstitutionModelFactory.h.

◆ ~SubstitutionModelFactory()

virtual bpp::SubstitutionModelFactory::~SubstitutionModelFactory ( )
inlinevirtual

Definition at line 113 of file SubstitutionModelFactory.h.

Member Function Documentation

◆ createModel()

SubstitutionModel * SubstitutionModelFactory::createModel ( const std::string &  modelName) const
throw (AlphabetException,
Exception
)
virtual

Get a new dynamically created SubstitutionModel object.

Parameters
modelNameThe name of the model to use.
Returns
A pointer toward a new substitution model, with default parameter values.
Exceptions
AlphabetExceptionIf the model is not compatible with the given alphabet.
ExceptionIf the model name do not match any available model.

Definition at line 81 of file SubstitutionModelFactory.cpp.

◆ operator=()

SubstitutionModelFactory& bpp::SubstitutionModelFactory::operator= ( const SubstitutionModelFactory smf)
inline

Definition at line 106 of file SubstitutionModelFactory.h.

References alphabet_, and geneticCode_.

Member Data Documentation

◆ alphabet_

const Alphabet* bpp::SubstitutionModelFactory::alphabet_
private

Definition at line 79 of file SubstitutionModelFactory.h.

Referenced by operator=().

◆ DAYHOFF_SCHWARTZ_ORCUTT

const string SubstitutionModelFactory::DAYHOFF_SCHWARTZ_ORCUTT = "DSO78"
static

Definition at line 74 of file SubstitutionModelFactory.h.

◆ FELSENSTEIN

const string SubstitutionModelFactory::FELSENSTEIN = "F84"
static

Definition at line 72 of file SubstitutionModelFactory.h.

◆ GENERAL_TIME_REVERSIBLE

const string SubstitutionModelFactory::GENERAL_TIME_REVERSIBLE = "HKY85"
static

Definition at line 68 of file SubstitutionModelFactory.h.

◆ geneticCode_

const GeneticCode* bpp::SubstitutionModelFactory::geneticCode_
private

Definition at line 80 of file SubstitutionModelFactory.h.

Referenced by operator=().

◆ HASEGAWA_KISHINO_YANO

const string SubstitutionModelFactory::HASEGAWA_KISHINO_YANO = "HKY85"
static

Definition at line 66 of file SubstitutionModelFactory.h.

◆ JOHN_TAYLOR_THORNTON

const string SubstitutionModelFactory::JOHN_TAYLOR_THORNTON = "JTT92"
static

Definition at line 73 of file SubstitutionModelFactory.h.

◆ JUKES_CANTOR

const string SubstitutionModelFactory::JUKES_CANTOR = "JC69"
static

Definition at line 64 of file SubstitutionModelFactory.h.

◆ KIMURA_2P

const string SubstitutionModelFactory::KIMURA_2P = "K80"
static

Definition at line 65 of file SubstitutionModelFactory.h.

◆ LE_GASCUEL

const string SubstitutionModelFactory::LE_GASCUEL = "LG08"
static

Definition at line 76 of file SubstitutionModelFactory.h.

◆ LOBRY

const string SubstitutionModelFactory::LOBRY = "L95"
static

Definition at line 71 of file SubstitutionModelFactory.h.

◆ STRAND_SYMMETRIC_REVERSIBLE

const string SubstitutionModelFactory::STRAND_SYMMETRIC_REVERSIBLE = "SSR"
static

Definition at line 69 of file SubstitutionModelFactory.h.

◆ TAMURA

const string SubstitutionModelFactory::TAMURA = "T92"
static

Definition at line 70 of file SubstitutionModelFactory.h.

◆ TAMURA_NEI

const string SubstitutionModelFactory::TAMURA_NEI = "TN93"
static

Definition at line 67 of file SubstitutionModelFactory.h.

◆ WHELAN_AND_GOLDMAN

const string SubstitutionModelFactory::WHELAN_AND_GOLDMAN = "WAG"
static

Definition at line 75 of file SubstitutionModelFactory.h.


The documentation for this class was generated from the following files: