We employ codon models to test whether the mode of natural selection affecting human and chimpanzee lineages is distinctive. This is done by specifying the edges of interest (Yang 1998 ).
I’m setting optimise_motif_probs=False to speed up execution of the examples, not because it’s a good idea!
from cogent3 import get_app
loader = get_app("load_aligned" , format_name= "fasta" , moltype= "dna" )
aln = loader("data/primate_brca1.fasta" )
hc_differ = get_app("natsel_timehet" ,
"GNC" ,
tree= "data/primate_brca1.tree" ,
optimise_motif_probs= False ,
tip1= "Human" ,
tip2= "Chimpanzee" ,
)
result = hc_differ(aln)
result
Statistics
LR df pvalue
4.9248 1 0.0265
hypothesis key lnL nfp DLC unique_Q
null 'GNC-null' -6713.2743 23 True True
alt 'GNC-alt' -6710.8118 24 True True
GNC-alt
log-likelihood = -6710.8118
number of free parameters = 24
Global params
A>C A>G A>T C>A C>G C>T G>A G>C G>T T>A T>C
0.86 3.54 0.98 1.67 2.21 6.26 7.92 1.23 0.80 1.29 3.07
Edge params
edge parent length omega
Galago root 0.52 0.79
HowlerMon root 0.13 0.79
Rhesus edge.3 0.06 0.79
Orangutan edge.2 0.02 0.79
Gorilla edge.1 0.01 0.79
Human edge.0 0.02 2.64
Chimpanzee edge.0 0.01 2.64
edge.0 edge.1 0.00 0.79
edge.1 edge.2 0.01 0.79
edge.2 edge.3 0.04 0.79
edge.3 root 0.02 0.79
Motif params
AAA AAC AAG AAT ACA ACC ACG ACT AGA AGC AGG AGT ATA
0.06 0.02 0.03 0.06 0.02 0.00 0.00 0.03 0.02 0.03 0.01 0.04 0.02
continuation
ATC ATG ATT CAA CAC CAG CAT CCA CCC CCG CCT CGA CGC
0.01 0.01 0.02 0.02 0.01 0.02 0.02 0.02 0.01 0.00 0.03 0.00 0.00
continuation
CGG CGT CTA CTC CTG CTT GAA GAC GAG GAT GCA GCC GCG
0.00 0.00 0.01 0.01 0.01 0.01 0.08 0.01 0.03 0.03 0.02 0.01 0.00
continuation
GCT GGA GGC GGG GGT GTA GTC GTG GTT TAC TAT TCA TCC
0.01 0.02 0.01 0.01 0.01 0.01 0.01 0.01 0.02 0.00 0.01 0.02 0.01
continuation
TCG TCT TGC TGG TGT TTA TTC TTG TTT
0.00 0.03 0.00 0.00 0.02 0.02 0.01 0.01 0.02