Fatal exception: Could not find a proper state to initialise. Perhaps try another seed.

125 views
Skip to first unread message

Özgür Taşkent

unread,
Jan 18, 2018, 6:21:11 PM1/18/18
to beast-users

Hello beast-users,

I am trying to run Beast (Beast2.4.5) with sequences of modern humans, ancient hominins and chimpanzee for a ~8kb long region on chromosome 9. To better calibrate the tree I defined a prior for human-chimp divergence as it was suggested here: http://beast2-dev.github.io/beast-docs/beast2/DivergenceDating/DivergenceDatingTutorial.html.

When I run Beast, I get the error message at the bottom of this email. I did try using different modern human sequences together with chimp for calibration prior, but I got the same error message each time.   


I would very much appreciate any help.
Ozgur  


Remco Bouckaert

unread,
Jan 18, 2018, 6:33:02 PM1/18/18
to beast...@googlegroups.com
Hi Ozgur,

It looks like you are doing a StarBeast analysis and have a calibration on a gene tree. I hope this is intentional, since you say you used the divergence dating tutorial, which uses a Standard analysis, not a StarBeast analysis. Unfortunately, the initialisation of the species and gene trees using StarBeastStartState cannot handle a calibration on the gene tree. 

To fix this, you need a different initialisation, for example by editing the XML in a text editor as follows:

1. Search for the “init” element and commit out (or delete) this element:
<!--
    <init id="SBI" spec="beast.evolution.speciation.StarBeastStartState" birthRate="@birthRate.t:Species" popMean="@popMean" speciesTree="@Tree.t:Species">
        <gene idref="Tree.t:chr9_Del_lessPops_2"/>
        <speciesTreePrior id="SpeciesTreePopSize.Species" spec="beast.evolution.speciation.SpeciesTreePrior" bottomPopSize="@popSize" gammaParameter="@popMean" taxonset="@taxonsuperset" tree="@Tree.t:Species"/>
    </init>
-->


2. In its place, add a RandomTree initialiser for the species tree, and a RandomGeneTree initialiser for the gene tree:

    <init spec='beast.evolution.tree.RandomTree' id='randomSpeciesTree' initial='@Tree.t:Species'
        taxonset='@taxonsuperset'>
        <populationModel spec='ConstantPopulation'>
                <popSize spec='parameter.RealParameter' value='1'/>
        </populationModel>
    </init>

<init spec='beast.evolution.speciation.RandomGeneTree' id='randomGeneTree1' initial='@Tree.t:chr9_Del_lessPops_2' speciesTree='@Tree.t:Species' taxa='@chr9_Del_lessPops_2'>
        <populationModel spec='ConstantPopulation'>
                <popSize spec='parameter.RealParameter' value='1'/>
        </populationModel>
    </init>


3. Since the SpeciesTreePopSize.Species is referred to by the species-coalescent distribution, but commented out in Step 1 above, you need to replace the reference
            <distribution idref="SpeciesTreePopSize.Species"/>
with
            <distribution id="treePrior.t:chr9_Del_lessPops_2" spec="beast.evolution.speciation.GeneTreeForSpeciesTreeDistribution" speciesTree="@Tree.t:Species" speciesTreePrior="@SpeciesTreePopSize.Species" tree="@Tree.t:chr9_Del_lessPops_2"/>

With this XML the file should start.

Cheers,

Remco


--
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...@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.

tug7...@temple.edu

unread,
Jan 20, 2018, 12:25:50 PM1/20/18
to beast-users
I have a similar problem that I am hoping you can help me with. 
I want to put together a taxon set that includes hundreds of individuals in order to set a calibration point. When I use beauti standard, there is no taxon set tab and when I try to choose the taxa in the editor that pops up with the "add prior" button, it lists all of my samples, without recognizing sets. 
I only have one calibration point for one node, so all taxa down one branch is a set and all the taxa down the other branch is a set. How would I set the groups correctly in standard? 
When using starbeast, there is a taxonset panel and beast correctly recognizes my two groups, but I get the same error message as Ozgur when I attempt to run the program. 

Thankyou!


On Thursday, January 18, 2018 at 6:33:02 PM UTC-5, Remco Bouckaert wrote:
Hi Ozgur,

It looks like you are doing a StarBeast analysis and have a calibration on a gene tree. I hope this is intentional, since you say you used the divergence dating tutorial, which uses a Standard analysis, not a StarBeast analysis. Unfortunately, the initialisation of the species and gene trees using StarBeastStartState cannot handle a calibration on the gene tree. 

To fix this, you need a different initialisation, for example by editing the XML in a text editor as follows:

1. Search for the “init” element and commit out (or delete) this element:
<!--
    <init id="SBI" spec="beast.evolution.speciation.StarBeastStartState" birthRate="@birthRate.t:Species" popMean="@popMean" speciesTree="@Tree.t:Species">
        <gene idref="Tree.t:chr9_Del_lessPops_2"/>
        <speciesTreePrior id="SpeciesTreePopSize.Species" spec="beast.evolution.speciation.SpeciesTreePrior" bottomPopSize="@popSize" gammaParameter="@popMean" taxonset="@taxonsuperset" tree="@Tree.t:Species"/>
    </init>
-->


2. In its place, add a RandomTree initialiser for the species tree, and a RandomGeneTree initialiser for the gene tree:

    <init spec='beast.evolution.tree.RandomTree' id='randomSpeciesTree' init...@Tree.t:Species'
        taxonset='@taxonsuperset'>
        <populationModel spec='ConstantPopulation'>
                <popSize spec='parameter.RealParameter' value='1'/>
        </populationModel>
    </init>

<init spec='beast.evolution.speciation.RandomGeneTree' id='randomGeneTree1' init...@Tree.t:chr9_Del_lessPops_2' specie...@Tree.t:Species' taxa='@chr9_Del_lessPops_2'>

Huw A. Ogilvie

unread,
Jan 21, 2018, 1:31:07 AM1/21/18
to beast-users
If you are getting the same error as Ozgur when running StarBEAST, make sure you are applying the calibration to the species tree and not to one of the gene trees (unless you really want to calibrate one of the gene trees, which is a pretty rare situation). If you don't have an outgroup, then the calibration should be applied to the MRCA of all taxa (i.e. the root node), because there is no other internal node.

Remco Bouckaert

unread,
Jan 21, 2018, 1:52:52 PM1/21/18
to beast...@googlegroups.com
Specifying taxon sets can indeed be done using the “+ Add prior” button in the priors panel in BEAUti. 
When the dialog pops up with “Taxon set editor” in the title bar, you can select taxa from the list on the left to be included in the taxon set (and be shown in the list on the right).

If you have many taxa, this may be a bit error prone, and it may be easier to define them in the NEXUS file together with your alignment, using a sets block. The format is as follows:

begin sets;
taxset germanic = oldnorse oldhighgerman oldprussian oldenglish;
end;

where ‘germanic’ is the name of the set, and ‘oldnorse’, ‘oldhighgerman’, ‘oldprussian’ and ‘oldenglish’ must be matching taxon names associated with sequences in the alignment. When importing the NEXUS file with a sets block, these sets appear in the priors panel, similar to the way they can be defined through the “+ Add prior” button.

Hope this helps,

Remco
Reply all
Reply to author
Forward
0 new messages