Skip to content

Instantly share code, notes, and snippets.

@mlandis
mlandis / my_dat.nex
Created Mar 29, 2017
Minimum working example for seq.clamp() error
View my_dat.nex
#NEXUS
Begin data;
Dimensions ntax=3 nchar=5;
Format datatype=DNA missing=? gap=-;
Matrix
A CTGAA
B TCCCG
C CAAAC
;
@mlandis
mlandis / example_K80+I.Rev
Created Nov 30, 2016
Johan's K80+I model
View example_K80+I.Rev
# read in the data
data <- readDiscreteCharacterData(data_filename)
# read in a tree (this could also be a stochastic tree variable)
tree <- readTrees(tree_filename)[1]
# assign a lognormal prior to the transition/transversion rate
kappa_sd <- 1.0
kappa_mean <- -0.5 * kappa_sd^2
kappa ~ dnLognormal(kappa_mean, kappa_sd)
View prior_unrooted
# 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
View prior_timetree
# io
fp = "./"
fn = fp + "prior_timetree.txt"
# make a tree variable
n_tips = 10
for (i in 1:n_tips) { names[i] = "T"+i }
t ~ dnUniformTimeTree(originTime=1.0, taxonNames=names)
# create a vector of moves
@mlandis
mlandis / brew doctor & brew --config
Last active Dec 21, 2015
Logs for "brew install openmpi" errors
View brew doctor & brew --config
> brew doctor
Your system is ready to brew.
> brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: de885ecdb0889d1246eda3621cb5d89d46130b7e
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 16-core 64-bit nehalem