Created
March 29, 2017 17:34
-
-
Save mlandis/44096c6ebaa7f14e3685a31c518a57ee to your computer and use it in GitHub Desktop.
Minimum working example for seq.clamp() error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NEXUS | |
Begin data; | |
Dimensions ntax=3 nchar=5; | |
Format datatype=DNA missing=? gap=-; | |
Matrix | |
A CTGAA | |
B TCCCG | |
C CAAAC | |
; | |
End; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((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