Skip to content

Instantly share code, notes, and snippets.

View mlandis's full-sized avatar

Michael Landis mlandis

View GitHub Profile
# 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
@mlandis
mlandis / brew doctor & brew --config
Last active December 21, 2015 02:39
Logs for "brew install openmpi" errors
> 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
@mlandis
mlandis / example_K80+I.Rev
Created November 30, 2016 21:53
Johan's K80+I model
# 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)
@mlandis
mlandis / my_dat.nex
Created March 29, 2017 17:34
Minimum working example for seq.clamp() error
#NEXUS
Begin data;
Dimensions ntax=3 nchar=5;
Format datatype=DNA missing=? gap=-;
Matrix
A CTGAA
B TCCCG
C CAAAC
;
# 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