Skip to content

Instantly share code, notes, and snippets.

@mlandis
Created November 6, 2014 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlandis/392340164646e5b4af6d to your computer and use it in GitHub Desktop.
Save mlandis/392340164646e5b4af6d to your computer and use it in GitHub Desktop.
# io
fp = "./"
fn = fp + "prior_unrooted.txt"
# make a tree variable
n_tips = 10
for (i in 1:n_tips) { names[i] = "T"+i }
t ~ dnUniformTopology(nTaxa=n_tips, names=names)
# create a vector of moves
mvi = 1
mv[mvi++] = mvSPR(t)
# create a vector of monitors
mni = 1
mn[mni++] = mnScreen(t)
mn[mni++] = mnFile(t,file=fn)
# create the model from the DAG
mdl = model(t)
# create and run MCMC
ch = mcmc(mdl, mn, mv)
ch.run(1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment