Skip to content

Instantly share code, notes, and snippets.

@mlandis
Created March 29, 2017 17:34
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/44096c6ebaa7f14e3685a31c518a57ee to your computer and use it in GitHub Desktop.
Save mlandis/44096c6ebaa7f14e3685a31c518a57ee to your computer and use it in GitHub Desktop.
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
;
End;
# RevBayes reports the following error
#
# Error: Argument or label mismatch for function call 'clamp' with arguments ( TimeTree<constant>).
# Correct usage is:
# clamp (AbstractHomologousDiscreteCharacterData<any> x)
#
# read alignment
dat = readDiscreteCharacterData("my_dat.nex")
# read tree
phy = readTrees("my_phy.tre")[1]
# build rate matrix
Q <- fnJC(4)
# create phylogenetic CTMC
seq ~ dnPhyloCTMC(tree=phy,
Q=Q,
type="DNA",
nSites=dat.nchar())
# NOTE: this is when I get the error!
# clamp the tree to seq
seq.clamp(phy)
((A:1,B:1):1,C:2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment