Validate and initialize error

1,184 views
Skip to first unread message

Jim McGuire

unread,
Mar 17, 2017, 8:41:59 PM3/17/17
to beast-users
Hi All,

I've seen other posts describing errors similar to the ones I am receiving now, but the posted solutions aren't working for me (or, more likely, I am implementing them incorrectly). I have a 100-locus data set that I am attempting to set-up for a calibrated species tree analysis using StarBeast2 (version 2.4.5). The full error message is the following:

java.lang.RuntimeException: Operator updown.all.Species.Contig118 has a statenode speciationRate.t:Species in its inputs that is missing from the state.

at beast.core.MCMC.initAndValidate(Unknown Source)

at beast.util.XMLParser.initBEASTObjects(Unknown Source)

at beast.util.XMLParser.parse(Unknown Source)

at beast.util.XMLParser.parseFile(Unknown Source)

at beast.app.BeastMCMC.parseArgs(Unknown Source)

at beast.app.beastapp.BeastMain.main(Unknown Source)

at beast.app.beastapp.BeastLauncher.main(Unknown Source)


Error 110 parsing the xml input file


validate and intialize error: Operator updown.all.Species.Contig118 has a statenode speciationRate.t:Species in its inputs that is missing from the state.


Error detected about here:

  <beast>

      <run id='mcmc' spec='MCMC'>


based on prior posts, I've tried adding the following in various ways but to no avail:


        <state> 

        <stateNode idref='speciationRate.t:Species'/> 

</state>


When I add this text, I get a new error:

Error 130 parsing the xml input file


This BEASTInterface (updown.all.Species.Contig118) has no input with name state. Choose one of these inputs: scaleFactor,up,down,optimise,elementWise,upper,lower,weight


Error detected about here:

  <beast>

      <run id='mcmc' spec='MCMC'>

          <operator id='updown.all.Species.Contig118' spec='UpDownOperator'> 

I've looked for an explanation/setting in the operators panel in BEAUTI also to no avail.

Many thanks for any advice on how to correct this issue!

Jim




Huw A. Ogilvie

unread,
Mar 18, 2017, 3:45:56 AM3/18/17
to beast-users
Hi Jim,

I'm not exactly sure what would be causing the error without reading the XML file. But my first guess is the calibrations - when creating an MRCA prior it must be applied to the species tree, not any of the gene trees.

Jim McGuire

unread,
Mar 18, 2017, 10:10:38 AM3/18/17
to beast-users
Hi Huw,

I definitely set the calibration on the species tree and not on any of the gene trees. I can send the xml file to you if you are willing to look at it..

Thanks!

Jim

Jim McGuire

unread,
Mar 18, 2017, 1:26:01 PM3/18/17
to beast-users
Hi Huw,

Update: I just created another xml file with no calibration and I'm still getting the same error:

java.lang.RuntimeException: Operator updown.all.Species.Contig118 has a statenode clockRate.c:Contig254 in its inputs that is missing from the state.

at beast.core.MCMC.initAndValidate(Unknown Source)

at beast.util.XMLParser.initBEASTObjects(Unknown Source)

at beast.util.XMLParser.parse(Unknown Source)

at beast.util.XMLParser.parseFile(Unknown Source)

at beast.app.BeastMCMC.parseArgs(Unknown Source)

at beast.app.beastapp.BeastMain.main(Unknown Source)

at beast.app.beastapp.BeastLauncher.main(Unknown Source)


Error 110 parsing the xml input file


validate and intialize error: Operator updown.all.Species.Contig118 has a statenode clockRate.c:Contig254 in its inputs that is missing from the state.


Error detected about here:

  <beast>

      <run id='mcmc' spec='MCMC'>


Jim

Justin Bagley

unread,
Mar 18, 2017, 3:25:45 PM3/18/17
to beast...@googlegroups.com
Dear Jim,

Thanks for sending me the XML file. I've gotten pretty good at manually debugging XMLs and shell scripts. I spent about 20 minutes testing the file this afternoon, and I got it to work! Working XML is attached, in zip archive. The problem? Looks like we've uncovered a bug here, where for some reason, parameter names given in UpDownOper section are different from those in the state. This should be fixed by the developers.

I fixed the first error you mentioned in your original email by renaming all the UpDownOper references to speciationRate parameters using "id=" instead of "idref=" and "SpeciationRate.t:Species" instead of "cySpeciationRate.t:Species", as defined in the state section near the top of the file.

i.e. I replaced:
        <up idref="speciationRate.t:Species"/>    OR             <up id="speciationRate.t:Species"/>
with: 
        <up idref="cySpeciationRate.t:Species"/>

 
I tried to run, but encountered the same error again, except this time UpDownOper's were referencing "idref="ClockRate.c:..." instead of "uclnClockRate.c:..." (e.g. idref="uclnClockRate.c:Contig69), as defined in the state. I fixed all of the incorrect ClockRate parameter names in the operators section. Then I went back through that entire operators section (~22,000 lines of code!) and replaced incorrect "id=" for "idref=" again. Don't worry, I did this quickly with regex from the command line (also could be done in a text editor)! 

i.e. I replaced:
       <up idref="clockRate.c:.../>     OR     <up id="clockRate.c:.../>
with:         
        <up idref="uclnClockRate.c:.../>    ## (e.g. <up idref="uclnClockRate.c:Contig33"/>)


Finally, this gave me the XML file in current state (*_jcb3.xml), which is running beautifully (prelim .log file proving it worked is attached in archive). I tested this final XML file on Linux supercomputing cluster, and local Mac osSierra. Run was killed on Linux because it chomped too much memory, but could probably be coaxed to run with different memory settings; XML ran just fine on my MacBook Pro.

Glad to help! Good luck with your agamid/Draco work! Awesome lizards!

Cheers,

Justin

Justin C. Bagley, Ph.D.
CNPq Young Talent Fellow (Postdoc)
& Senior Research Associate
Departamento de Zoologia
Universidade de Brasília
70910-900 Brasília, DF, Brasil
jcba...@unb.br
Website: http://www.justinbagley.org

Present (internship) address:
Lozier Lab, SEC 1305
Department of Biological Sciences
The University of Alabama
Tuscaloosa, AL 35487

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users+unsubscribe@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.

Archive.zip

Huw A. Ogilvie

unread,
Mar 19, 2017, 12:58:25 AM3/19/17
to beast-users
The larger problem is that there should be only one "updown.all.Species" element, but for some reason one has been created for each locus.

Jim, you could possibly send me a list, detailing step-by-step exactly how you generated the uncalibrated XML file?
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.

Huw A. Ogilvie

unread,
Mar 19, 2017, 1:16:42 AM3/19/17
to beast-users
Nevermind, I am able to reproduce the error. It appears to be specific to gene tree relaxed clock analyses.

It will be fixed in the next version of StarBEAST2, but I would consider using gene tree relaxed clocks (GT-UCLNs) with *BEAST/StarBEAST2. Figure 5 of the StarBEAST2 preprint shows that GT-UCLNs are no more accurate at resolving branch lengths than a strict clock, and Figure 2 shows that the GT-UCLN model can be 10x slower than a strict clock.

Huw A. Ogilvie

unread,
Mar 19, 2017, 1:17:17 AM3/19/17
to beast-users
Urgh, RE-consider.

Jim McGuire

unread,
Mar 25, 2017, 5:53:32 PM3/25/17
to beast-users
Hi Huw,

I assume that Justin Bagley let you all know that the problem that I was having with my xml input file was likely caused by a bug in BEAUTI (I assume he mentioned it because he was the one who figured it out). He did some hand-editing of the xml file and that file is now working. However, I'm having trouble duplicating his suggested fixes when I generate new input files, which suggests that he made a few extra changes that he didn't tell me about or - more likely - that the changes I made in paramter settings generating new problems that I am not able to see/resolve on my own. I'm curious if you or the team have been working on fixes to the bug and if so, if I might be able to get a beta version of BEAUTI that resolves my problem (assuming providing an advance version on your next update is something you can actually do).

Thanks!

Jim 

Huw A. Ogilvie

unread,
Mar 26, 2017, 12:11:18 AM3/26/17
to beast-users
Hi Jim,

An update to StarBEAST2 which fixes the problem should be available through BEAUTi within the next week or so. You can download it now from GitHub - https://github.com/genomescale/starbeast2/releases - and install it by hand following these instructions - http://www.beast2.org/managing-packages/#Install_by_hand

However like I said earlier, I'm not sure that gene tree relaxed clocks are a good option for most people.

Jim McGuire

unread,
Mar 26, 2017, 12:19:34 AM3/26/17
to beast-users
Hi Huw,

Thank for the info on the updated version!

So, when you say gene tree relaxed clock analyses are not a good option, are you suggesting that I use strict clocks for this analysis? This is what I was trying to set up today, but the "id" and "idref" issues in the xml file are still generated. I certainly have had many problems trying to get proper convergence with calibrated species tree analyses. I'd be keen to hear your advice regarding the proper way to set the calibrations.

Thanks!

Jim  

Huw A. Ogilvie

unread,
Mar 26, 2017, 12:31:14 AM3/26/17
to beast-users
Hi Jim,

From our analyses, strict clocks do a pretty good job at inferring the posterior distribution of species trees using *BEAST/StarBEAST2. Species tree relaxed clocks are 10x slower, but do a little better at inferring the posterior distribution of species trees, and also infer per-lineage relative clock rates. Gene tree relaxed clocks kind of in between but don't infer per-lineage relative clock rates, so there's not much benefit from using them.

Did you recreate the XML file from scratch using the new version, with either strict clocks or relaxed clocks? If you are still having issues, please send me the XML you generated.
Reply all
Reply to author
Forward
0 new messages