Hi Crystal,
I too am trying to use the Mk model in BEAST with only SNP data (no invariant sites). I have also had a difficult time adopting this model into something that plays nicely with BEAST! As far as your troubles go, I had the same problem with the same crashes and the same error message that I also managed to capture via screen shot. For me, if I remember correctly, the solution was to change the state count in the Mk model to this:
<kStateType id="kst" stateCount="4" startWith="1"/>
<frequencyModel id="freqModel">
<kStateType idref="kst"/>
<parameter dimension="4" value="0.25 0.25 0.25 0.25" id="model.frequencies"/>
<lewisMk id="lewisModel" totalOrder="false">
<frequencyModel idref="freqModel"/>
<order state="1" adjacentTo="2"/>
<order state="3" adjacentTo="2"/>
<order state="3" adjacentTo="4"/>
I have no idea why this worked because in my data, I actually do have five states: A, C, G, T and N, but it fixed the crashing problem for me. If anyone has comments about why this works or how to better code SNPs with the Mk model, I would love to hear them!
In addition to the above, I've been having a problem of my own: I can begin a BEAST run using the Mk model on my local computer, which runs and finishes just fine. However, when I upload the same xml file to a cluster which is running the same version of BEAST (1.7.4) and a higher version of java, I get the following error message:
[Ljava.lang.Object;@33bc3d08
Constructing 4-state datatype
Parsing error - poorly formed BEAST file, test.xml:
The '<lewisMk>' element with id, 'lewisModel', is incorrectly constructed.
The following was expected:
Exactly one ELEMENT of name frequencies REQUIRED containing
Exactly one ELEMENT of type FrequencyModel REQUIRED
Why would my file run fine in one environment but terminate in another? I've attached an example file if anyone would be so kind as to look over it for me...
Thanks!
Roxana