Skip to content
Register Sign in Wishlist

Code for chapter 16


Below is the script as shown in chapter 16 of the book. This is free to copy and paste into your code editor.

Script 16.1

# Script 16.1
# nexus
begin data;
dimensions ntax=10 nchar=80;
format datatype=dna interleave=yes gap=- missing=?;
matrix
Seq1 CTGTCCCACTCTAAGTCCAG CAATGAGACTGGTATCCTGG ACATGGCCCAAAGAGGGTGA
Seq2 CTGCCCCACCCTAAGTCCAA CACTGAGTACGGTTGTTTGG AAATGGCCCAAGGAGGGTGA
Seq3 CTGCTCCGCCCTAAGTCCAA CACTGAGTACGGTTGTTTGG AAATGGCCCATTGAGGGTGA
Seq4 CTGCTCCGCCCTAAGTCCAA CACTGAGTACGGTTGTTTGG AAATGGCCCATTGAGGGTGA
Seq5 CTGCTCCACCCTAAGTCCAA CACTGAGTACGGTTGTTTGG AAATGGCCCAGGGAGGGTGA
Seq6 CTGCTCCACCCTAAGTCCAA CACTGAGTACGGTTGTTTGG AAATGGCCCAGGGAGGGTGA
Seq7 CTGCTCCACCCTAAGTCCAA CAATGAGTACGGTAGTACGG ACATGGCCCACAGAGGGTGA
Seq8 CTGCTCCACCCTAAGTCCAA CACTGAGTACGGTTGTTTGG AAATGGCCCAAGGAGGGTGA
Seq9 CTACTCCACCCTAAGTCCAA CACTGAGTGCGGTTGTATGG ACATGGCCCAGGGAGGGTGA
Seq10 CTGCCCCATCCTAAGTCCAA CACTGAGTACGGTTGTTTGG ACATGGCCCAAGGAGGGTGA
;
begin mrbayes;
# Seq 1 is used as outgroup
outgroup 1;
log start filename=users_filename.log replace;
594 Fundamentals of Bioinformatics
# general model of DNA substitution
# with gamma-distributed rate variation across sites
lset nst=6 rates=gamma;
# quiet execution
set autoclose = yes;
# Markov chain Monte Carlo (mcmcp)
# 10000000 cycles (ngen), sample every 100 cycles (samplefreq),
# 4 chains (nchains),
# print information every 1000 cycles (printfreq)
# keep information on branch length (savebrlens)
mcmcp ngen=10000000 samplefreq=100 nchains=4 printfreq=1000
savebrlens=yes filename=users_filename;
mcmc;
# produce a summary of the trees produced (sumt)
# discard 1000 samples before calculating statistics (burnin)
# use 50-majority (halfcompat) to produce consensus tree (contype)
sumt filename=users_filename burnin=1000 contype=halfcompat;
log stop;
end;
 

Sign In

Please sign in to access your account

Cancel

Not already registered? Create an account now. ×

Find content that relates to you

Join us online

This site uses cookies to improve your experience. Read more Close

Are you sure you want to delete your account?

This cannot be undone.

Cancel

Thank you for your feedback which will help us improve our service.

If you requested a response, we will make sure to get back to you shortly.

×
Please fill in the required fields in your feedback submission.
×