Applying a time-reversible nucleotide model#
We display the available set of nucleotide substitution models.
from cogent3 import available_models
available_models("nucleotide")
Model Type | Abbreviation | Description |
---|---|---|
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. |
nucleotide | GN | General Markov Nucleotide (non-stationary, non-reversible). Kaehler, Yap, Zhang, Huttley, 2015, Sys Biol 64 (2): 281–93 |
nucleotide | ssGN | strand-symmetric general Markov nucleotide (non-stationary, non-reversible). Kaehler, 2017, Journal of Theoretical Biology 420: 144–51 |
nucleotide | K80 | Kimura 1980 |
nucleotide | JC69 | Jukes and Cantor's 1969 model |
nucleotide | GTR | General Time Reversible nucleotide substitution model. |
nucleotide | TN93 | Tamura and Nei 1993 model |
nucleotide | HKY85 | Hasegawa, Kishino and Yano 1985 model |
nucleotide | F81 | Felsenstein's 1981 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.
from cogent3 import get_app
loader = get_app("load_aligned", format="fasta", moltype="dna")
aln = loader("data/primate_brca1.fasta")
model = get_app("model",
"GTR", tree="data/primate_brca1.tree", optimise_motif_probs=True
)
result = model(aln)
result
key | lnL | nfp | DLC | unique_Q |
---|---|---|---|---|
'GTR' | -6992.5769 | 19 | True | True |
result.lf
GTR
log-likelihood = -6992.5769
number of free parameters = 19
A/C | A/G | A/T | C/G | C/T |
---|---|---|---|---|
1.2296 | 5.2478 | 0.9473 | 2.3389 | 5.9666 |
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 |
A | C | G | T |
---|---|---|---|
0.3792 | 0.1719 | 0.2066 | 0.2423 |