Codon model based on GTR nucleotide matrix

3 views
Skip to first unread message

Keren Halabi

unread,
Dec 17, 2018, 9:33:46 AM12/17/18
to Bio++ Usage Help Forum
Dear Bio++ team,

I have noticed that in the call to YN98 constructor, there is a creation of a general codon model based on the nucleotide model K80:

YN98::YN98(const GeneticCode* gc, FrequenciesSet* codonFreqs) :
  AbstractBiblioSubstitutionModel("YN98."),
  pmodel_(new CodonDistanceFrequenciesSubstitutionModel(gc, new K80(dynamic_cast<const CodonAlphabet*>(gc->getSourceAlphabet())->getNucleicAlphabet()), codonFreqs))
{
...
}

I was wondering if one could alternatively set such codon model on the nucleotide model GTR, to allow more refined parametrization of the induced codon model?

Many thanks!
Keren

Laurent Guéguen

unread,
Dec 17, 2018, 11:48:32 AM12/17/18
to Bio++ Usage Help Forum
Hi Keren,

this is possible, and the syntax is bpp specific, since YN98 is specifically used for the model as
it is set in the article.
So, you can define:

model=CodonDistFreq(model=GTR, frequencies=F1X4)

but in this case the equilibrium frequencies are defined twice, in GTR and in frequencies. So
either you set the equilibirum parameters of GTR to 0.5, so that the nucleotide model has
a uniform equilibrium distribution :

GTR.theta=0.5
GTR.theta1=0.5
GTR.theta2=0.5

or you do not use specific frequencies parameterization:

model=CodonDist(model=GTR)

However, if you want to set the eq freq in a codeml-like fashion, such as
F3X4 or F61, it is simpler to use the first way.

Cheers,
Laurent


Reply all
Reply to author
Forward
0 new messages