CMAPLE 1.0.0
C++ MAximum Parsimonious Likelihood Estimation
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
cmaple::Model Class Reference

#include <model.h>

Classes

struct  ModelParams
 

Public Member Functions

 Model (const cmaple::ModelBase::SubModel sub_model=cmaple::ModelBase::DEFAULT, const cmaple::SeqRegion::SeqType seqtype=cmaple::SeqRegion::SEQ_AUTO)
 Constructor from a model name.
 
 ~Model ()
 Destructor.
 
void fixParameters (const bool &fixed_model_params)
 Keep the model parameters unchanged. This API is useful when using one model for multiple trees - after the model parameters are estimated according to a tree, users can keep them unchanged, then use the model for other trees.
 
ModelParams getParams ()
 Export the substitution model and its parameters to a ModelParams structure.
 

Detailed Description

Class represents a substitution model

Constructor & Destructor Documentation

◆ Model()

cmaple::Model::Model ( const cmaple::ModelBase::SubModel  sub_model = cmaple::ModelBase::DEFAULT,
const cmaple::SeqRegion::SeqType  seqtype = cmaple::SeqRegion::SEQ_AUTO 
)

Constructor from a model name.

Parameters
[in]sub_modela substitution model. Default: DEFAULT - GTR for DNA, and LG for Protein data. List of supported models:
DNA models: JC, GTR, UNREST;
Protein models: GTR20, NONREV, LG, WAG, JTT, Q_PFAM, Q_BIRD, Q_MAMMAL, Q_INSECT, Q_PLANT, Q_YEAST, JTTDCMUT, DCMUT, VT, PMB, BLOSUM62, DAYHOFF, MTREV, MTART, MTZOA, MTMET, MTVER, MTINV, MTMAM, FLAVI, HIVB, HIVW, FLU, RTREV, CPREV, NQ_PFAM, NQ_BIRD, NQ_MAMMAL, NQ_INSECT, NQ_PLANT, NQ_YEAST;
See Substitution models for references of those models.
[in]seqtypeData type of sequences (optional): SEQ_DNA (nucleotide data), SEQ_PROTEIN (amino acid data), or SEQ_AUTO (auto detection)
Exceptions
std::invalid_argumentif any of the following situations occur.
  • sub_model is unknown/unsupported
  • sub_model is DEFAULT and seqtype is SEQ_AUTO

Member Function Documentation

◆ fixParameters()

void cmaple::Model::fixParameters ( const bool &  fixed_model_params)

Keep the model parameters unchanged. This API is useful when using one model for multiple trees - after the model parameters are estimated according to a tree, users can keep them unchanged, then use the model for other trees.

Parameters
[in]fixed_model_paramsTRUE to keep the model parameters unchanged

◆ getParams()

ModelParams cmaple::Model::getParams ( )

Export the substitution model and its parameters to a ModelParams structure.

Returns
A ModelParams structure.

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