StarBeast2

1,065 views
Skip to first unread message

S.Willis

unread,
May 4, 2016, 10:24:38 AM5/4/16
to beast-users
Hi Remco, et al.,

I noticed when I upgraded to 2.4 recently that the StarBEAST2 package and template had been added, and the note suggests it should be faster than the original module (?). I can't find any other literature about it. Is it ready for primetime, e.g. with path sampling? Are other folks using this and experiencing increased performance?

Most of the Beauti template tabs seem similar to the previous *Beast template. However, can you all provide some insight into the population priors (Constant IO)? I have generally found that with the previous version the constant population size parameterization is an utter failure with my data, while the linear flavors work well. Are either of these parameterizations in the new model equivalent?

Thanks!

Stu 

Huw A. Ogilvie

unread,
May 4, 2016, 8:34:39 PM5/4/16
to beast-users
Hi Stu,

StarBEAST2 is a rewrite of *BEAST (from-scratch, except for the initialisation code), and a manuscript describing it is in preparation. StarBEAST2 improves performance in three ways:

(1) New MCMC operators that make coordinated changes to the height of a species tree node and a collection of gene tree nodes
(2) The ability to analytically integrate over constant population sizes (that's what is meant by Constant IO)
(3) More sensible default weights for MCMC operators in the context of a *BEAST analysis

The new MCMC operators (starbeast2.CoordinatedUniform and starbeast2.CoordinatedExponential) are inspired by the NodesNudge operator developed by Graham Jones and available in his STACEY package. CoordinatedUniform is based on the algorithm described by Graham in section 4.1 of the STACEY preprint, and CoordinatedExponential modifies that algorithm to enable changes to the species tree root node.

In the case of Constant IO, the downside is that population sizes are no longer explicitly estimated, so if you are actually interested in estimating values of Ne this should not be used. On the other hand, the new "SpeciesTreeBranchRates" template adds support for estimating relaxed-clock substitution rates for each species tree branch, which was not available in previous implementations of *BEAST.

The current StarBEAST2 template lacks two important features; linear population size models, and support for node height calibrations. I will be adding these in the near future. I have not yet tested StarBEAST2 with path sampling, and have zero idea if it works at all currently, but I will add that to my to-do list :-)

Regards,

Huw

Huw A. Ogilvie

unread,
May 4, 2016, 8:47:18 PM5/4/16
to beast-users
As an alternative to StarBEAST2, you could use the STACEY or StarBeastWithSTACEYops templates available in the latest version of STACEY. Constant IO (analytical integration of population sizes, first developed by Liu, Pearl, Brumfield and Edwards in 2008) is available if you are using the STACEY template. From my understanding, StarBeastWithSTACEYops is the same as the previous version of *BEAST (so linear population models should be available), but with five new operators ported from STACEY.

S.Willis

unread,
May 5, 2016, 11:17:12 AM5/5/16
to beast-users
Ok, Huw, thanks for the update!

Jamie

unread,
Jul 7, 2016, 6:41:19 AM7/7/16
to beast-users
Hi Huw,

is it possible to specify an initial species tree for StarBEAST2 as in the previous version? I had it working before in the original version of *BEAST, but now there seems to be an issue when I specify the constantPopIOModel.Species for the population model in the 'init' element for each gene tree. I followed the tutorial for this on the BEAST2 website for the original StarBEAST XML template and I tried to do the same after generating a new XML using the StarBEAST2 template like this:

<init spec="beast.evolution.speciation.RandomGeneTree" id="RandomGeneTree1" 
        initial="@Tree.t:gene1" speciesTree="@Tree.t:Species" taxonset="@TaxonSet.gene1">
    <populationModel id="constantPopIOModel.Species" spec="starbeast2.ConstantPopulationIO" populationMean="@popMean.Species">
        <parameter id="RealParameter" lower="0.0" name="populationShape" upper="0.0">2.0</parameter>
    </populationModel>
</init>

then I get the following error
Error 130 parsing the xml input file

nullInput 102: type mismatch for input populationModel

Error detected about here:
  <beast>
      <run id='mcmc' spec='MCMC'>
          <init id='RandomGeneTree1' spec='beast.evolution.speciation.RandomGeneTree'>

Thanks!
- Jamie

Huw A. Ogilvie

unread,
Jul 8, 2016, 1:45:08 AM7/8/16
to beast-users
Hi Jamie,

The population model specified for random gene trees is only for generating the initial, random gene tree - it is not used for any coalescent calculations in StarBEAST (or in *BEAST). So the population model line should be similar to Remco's "All about starting trees" blog post - no need to use the ConstantPopulationIO model here.

For an example based on the StarBEAST2 tutorial, see this XML: http://pastebin.ca/3656143

- Huw

Huw A. Ogilvie

unread,
Jul 8, 2016, 7:04:27 AM7/8/16
to beast-users
For future releases of StarBEAST2 (v0.12.0 and later), just add the newick string directly to the SBI element thus;

    <init id="SBI" spec="starbeast2.StarBeastInitializer" estimate="false" speciesTree="@Tree.t:Species" newick="((((idahoensis:0.0007836716489233961,monticola:0.0007836716489233961):0.0006605524930972726,talpoides:0.0014442241420206687):8.346112249150734047e-05,mazama:0.0015276852645121760):0.0070309128726644835,(((townsendii:0.0004630289068261340,bottae:0.0004630289068261340):0.0005895516085737318,umbrinus:0.0010525805153998658):0.0051097663079959802,heterodus:0.0061623468233958463):0.0023962513137808132):0;">
...
    </init>

and StarBEAST2 will automatically use that input to initialize the species tree. This should make setting up fixed species tree (or fixed species tree topology) inference much easier.

- Huw

Jamie

unread,
Jul 8, 2016, 7:42:47 AM7/8/16
to beast-users
Ah yes, that makes sense and also explains why it was still working when I left that part unchanged as in Remco's tutorial in the new StarBEAST2 XML :) Thanks for the info and making it easier with the Newick starting tree in the SBI element!
- Jamie 

zany...@gmail.com

unread,
Nov 6, 2025, 8:47:05 AM (12 days ago) Nov 6
to beast-users
Hi BEAST users,

I came across this thread while trying to fix the species tree topology in a StarBEAST2 analysis and hoped someone could provide some clarification around the preparation of the XML. 

I have a large dataset comprising 919 target-capture alignments for >200 species and have inferred a species tree topology using WASTRAL-hybrid. I want to infer a time-proportional species tree and use the WASTRAL tree as a fixed tree to render the StarBEAST2 analysis more computationally tractable. I have prepared a "test" XML with all species but just 10 alignments with the following changes:

<init id="SBI" spec="starbeast2.StarBeastInitializer" estimate="false" speciesTree="@Tree.t:Species" newick="my_newick_species_tree_here">
        <geneTree idref="Tree.t:Alignment_7"/>
        <geneTree idref="Tree.t:Alignment_4"/>
        <geneTree idref="Tree.t:Alignment_8"/>
        <geneTree idref="Tree.t:Alignment_3"/>
        <geneTree idref="Tree.t:Alignment_10"/>
        <geneTree idref="Tree.t:Alignment_1"/>
        <geneTree idref="Tree.t:Alignment_2"/>
        <geneTree idref="Tree.t:Alignment_6"/>
        <geneTree idref="Tree.t:Alignment_5"/>
        <geneTree idref="Tree.t:Alignment_9"/>
        <populationModel id="popModelBridge.Species" spec="starbeast2.PassthroughModel">
            <childModel id="constantPopIOModel.Species" spec="starbeast2.DummyModel"/>
        </populationModel>
    </init>

and then added the initial gene trees immediately under that following Remco Bouckaert's blog post "all about starting trees":

<init spec='beast.evolution.speciation.RandomGeneTree'
      id='randomGeneTree1' initial='@Tree.t:Alignment_1'
      speciesTree='@Tree.t:Species' taxa='@Alignment_1'>
  <populationModel id='popmodel' spec='ConstantPopulation' popSize="1.0"/>
</init>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree2' initial='@Tree.t:Alignment_2'
  speciesTree='@Tree.t:Species' taxa='@Alignment_2'  
  populationModel='@popmodel'/>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree3' initial='@Tree.t:Alignment_3'
  speciesTree='@Tree.t:Species' taxa='@Alignment_3'  
  populationModel='@popmodel'/>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree4' initial='@Tree.t:Alignment_4'
  speciesTree='@Tree.t:Species' taxa='@Alignment_4'  
  populationModel='@popmodel'/>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree5' initial='@Tree.t:Alignment_5'
  speciesTree='@Tree.t:Species' taxa='@Alignment_5'  
  populationModel='@popmodel'/>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree6' initial='@Tree.t:Alignment_6'
  speciesTree='@Tree.t:Species' taxa='@Alignment_6'  
  populationModel='@popmodel'/>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree7' initial='@Tree.t:Alignment_7'
  speciesTree='@Tree.t:Species' taxa='@Alignment_7'  
  populationModel='@popmodel'/>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree8' initial='@Tree.t:Alignment_8'
  speciesTree='@Tree.t:Species' taxa='@Alignment_8'  
  populationModel='@popmodel'/>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree9' initial='@Tree.t:Alignment_9'
  speciesTree='@Tree.t:Species' taxa='@Alignment_9'  
  populationModel='@popmodel'/>

<init spec='beast.evolution.speciation.RandomGeneTree'
  id='randomGeneTree10' initial='@Tree.t:Alignment_10'
  speciesTree='@Tree.t:Species' taxa='@Alignment_10'  
  populationModel='@popmodel'/>

The XML runs fine, but when I open the output species.tree file in FigTree, the topology is clearly changing as the MCMC is progressing.

Apologies if this is a no-brainer, I am rather new to StarBEAST2 and would appreciate any help!

Best regards,

Zaynab

P.S. I also followed Remco Bouckaert's "all about starting trees" tutorial for fixing the species tree for StarBEAST2 by removing the SBI element etc., but the topology also changed during the MCMC.
Reply all
Reply to author
Forward
0 new messages