begin mrbayes; set autoclose=yes nowarn=yes; log start filename=NAME.txt replace; [ [defines partition according to codon position] charset first_pos = 1-1131\3; charset second_pos = 2-1131\3; charset third_pos = 3-1131\3; partition by_codon = 3:first_pos,second_pos,third_pos; [sets partition according to codon position] set partition=by_codon; [APPLIES Kimura? model to 1 and 2nd positions and gtr+|~+I model to 3rd codon position] lset applyto=(1,2) nst=2; Lset applyto=(3) nst=6 rates=invgamma;[ from MrModeltest, hLRT = AIC] [to unlink codon position such that each has its own set of parameters] unlink statefreq=(all) revmat=(all) shape=(all) pinvar=(all); [fix the statefreqs to equal for the first two codon positions but applies a flat Dirichlet prior to the state- freqs of the 3rd position] prset applyto=(1,2) statefreq=fixed(equal); prset applyto=(3) statefreq=dirichlet(1,1,1,1); ] outgroup 1; mcmc ngen=10000 printfreq=100 samplefreq=100 nchains=4 temp=0.2 swapfreq=1 savebrlens=yes; log stop; sump burnin=1000; sumt filename=name.nex contype=allcompat [conformat=simple] burnin=1000 nruns=2; end;