Applying a time-reversible nucleotide model

We display the available set of nucleotide substitution models.

[1]:
from cogent3 import available_models

available_models("nucleotide")
[1]:
Specify a model using 'Abbreviation' (case sensitive).
Model Type Abbreviation Description
nucleotide JC69 Jukes and Cantor's 1969 model
nucleotide K80 Kimura 1980
nucleotide F81 Felsenstein's 1981 model
nucleotide HKY85 Hasegawa, Kishino and Yanamo 1985 model
nucleotide TN93 Tamura and Nei 1993 model
nucleotide GTR General Time Reversible nucleotide substitution model.
nucleotide ssGN strand-symmetric general Markov nucleotide (non-stationary, non-reversible). Kaehler, 2017, Journal of Theoretical Biology 420: 144–51
nucleotide GN General Markov Nucleotide (non-stationary, non-reversible). Kaehler, Yap, Zhang, Huttley, 2015, Sys Biol 64 (2): 281–93
nucleotide BH Barry and Hartigan Discrete Time substitution model Barry and Hartigan 1987. Biometrics 43: 261–76.
nucleotide DT Discrete Time substitution model (non-stationary, non-reversible). motif_length=2 makes this a dinucleotide model, motif_length=3 a trinucleotide model.

10 rows x 3 columns

Using the GTR model

We specify the general time-reversible model (Lanave et al) by its abbreviation. By default, this model does not optimise the codon frequencies but uses the average estimated from the alignment. We configure the model to optimise the root motif probabilities.

[2]:
from cogent3.app import io, evo

loader = io.load_aligned(format="fasta", moltype="dna")
aln = loader("../data/primate_brca1.fasta")
model = evo.model("GTR",
                  tree="../data/primate_brca1.tree",
                  sm_args=dict(optimise_motif_probs=True))
result = model(aln)
result
[2]:
GTR
key lnL nfp DLC unique_Q
-6992.5741 19 True
[3]:
result.lf
[3]:

GTR

log-likelihood = -6992.5741

number of free parameters = 19

Global params
A/C A/G A/T C/G C/T
1.2296 5.2478 0.9472 2.3389 5.9666
Edge params
edge parent length
Galago root 0.1727
HowlerMon root 0.0448
Rhesus edge.3 0.0215
Orangutan edge.2 0.0077
Gorilla edge.1 0.0025
Human edge.0 0.0060
Chimpanzee edge.0 0.0028
edge.0 edge.1 0.0000
edge.1 edge.2 0.0034
edge.2 edge.3 0.0119
edge.3 root 0.0076
Motif params
A C G T
0.3792 0.1719 0.2066 0.2423