Problems setting newick starting tree BEAST 2.1.0

1,533 views
Skip to first unread message

Frank Stokvis

unread,
Feb 12, 2015, 10:01:43 AM2/12/15
to beast...@googlegroups.com
Hi everyone,

I'm trying to input a RAxML-newick as starting tree using Remco's starting tree blog. Whatever I do, I keep getting error messages loading the xml in BEAUTi or BEAST 2.1.0 (as on CIPRES) such as:

Something went wrong loading the file: The element type "run" must be terminated by the matching end-tag "</run>"

or

This BEASTObject (NewickTree.t:starttree) has no input with name populationModel. Choose one of these inputs: IsLabelledNewick,taxa,newick,offset,threshold,singlechild,adjustTipHeights,scale,initial,trait,taxonset,nodetype,estimate

Error detected about here:
 <beast>
   <run id='mcmc'spec='MCMC'>
     <init id='NewickTree.t:starttree' spec='beast.util.TreeParser'>

The latter one when I remove the "/" following my newick tree. I am new to xml and spend some time getting this to work but I am at a loss right now.

Could someone please help me?

Cheers,

Frank
20150212_16S28SCOI_small_starttree.xml
20150211_16S28SCOI_small_original.xml

michaelm

unread,
Feb 13, 2015, 9:50:17 AM2/13/15
to beast...@googlegroups.com
Hi Frank,

I'm not sure what caused your first error message, but I know about the second one. In your XML, you did not remove the populationModel specification, which you should when using a user-defined starting tree. If you have a look at Remco's example (http://blog.beast2.org/tag/starting-tree/), you'll see that he has removed the populationModel part:

1
2
3
<init spec='beast.util.TreeParser' id='NewickTree.t:XYZ26'
  initial="@Tree.t:XYZ26" taxa='@XYZ26' IsLabelledNewick="true"
  newick="((your,(tree,goes)),here)"/>

So, the part saying "<populationModel id ... /populationModel> </init>" should be removed and replaced only by "/>" after the newick tree string. When I change the starting tree specification in your XML in this way, BEAST seems to read the tree correctly. However, a second problem stops BEAST from running. The starting tree that you specified is not ultrametric (as it should be if all your taxa are sampled at the same time), and it does not fit your taxonomic constraints (e.g. what's supposed to be the outgroup does not appear as the outgroup). There's some information in the BEAST2 book (http://www.beast2.org/book.html) on page 152 about the requirements for a starting tree.
It's not always easy to obtain a starting tree that fits all the requirements. If you start with a RAxML tree, it might help to first set the outgroup correctly and then run PATHd8 (http://www2.math.su.se/PATHd8/), which is very fast and easy to use and adjust node ages according to constraints that you specify to provide an ultrametric tree. However, this will not help if your RAxML tree violates taxonomic constraints other than the outgroup placement. In that case, you should probably rerun RAxML with the -g option, specifying the taxonomic constraint (see the RAxML manual for this).
Another option to obtain a starting tree could be to run a quick and dirty BEAST analysis with the same taxa, but a simpler model (Jukes-Cantor, strict clock, empirical frequencies) and possibly a reduced markerset (e.g. only one gene). You should then use the same constraints on divergence times and and taxonomy as in the full analysis, and try a random starting tree for this analysis.
Hope this helps,
Michael

Frank Stokvis

unread,
Feb 16, 2015, 7:39:02 AM2/16/15
to beast...@googlegroups.com
Thanks Michael!

Using a starting tree from the .trees file of a previous run indeed works without BEAGLE (windows 7) after removing everything between square brackets: In Excel replace [*] with nothing (leave field empty). On CIPRES however, the analysis crashes with or without BEAGLE:

Random number seed: 1424080240041

Error 110 parsing the xml input file

validate and intialize error: Label '1' in Newick beast.tree could not be identified. Perhaps taxa or taxonset is not specified?: ((((((((((( >>>1 <<< ...


Error detected about here:
<beast>
<run id='mcmc' spec='MCMC'>
<init id='NewickTree.t:starttree1' spec='beast.util.TreeParser'>

I guess something goes wrong because CIPRES has it's own script for specifying a seed value.

Cheers,

Frank

 

michaelm

unread,
Feb 16, 2015, 7:53:42 AM2/16/15
to beast...@googlegroups.com
Hi Frank,

this probably does not have to do with seed values. Are you sure the exact same XML file runs on your computer, but not on Cipres? It rather looks to me like your starting tree only includes numbers as taxon identifiers, not the taxon names. In the .trees file from your previous analysis, there should be a "Translate" block (you should see this if you open the .trees file it in a text editor) that tells FigTree how to translate numbers into taxon names. So if you only copy one tree string from that file, this information is going to be lost. What you can do instead to extract one tree with taxon names from the .trees file is to open the .trees file in FigTree then click File>Export Trees, and check "Save as currently displayed" but not "Save all trees". This will write a new file that should have taxon names, not only numbers, in the tree string.
Cheers,
Michael

Frank Stokvis

unread,
Feb 17, 2015, 8:46:57 AM2/17/15
to beast...@googlegroups.com
Hi Michael,

Yes, I've uploaded and ran it several times with the same outcome.

Nevertheless, I've tried your approach using FigTree to fill in the taxon labels on the previously produced BEAST tree (.tre attached), exporting it as a nexus (.nex attached) and copying the tree for the starting tree analysis. CIPRES is running the xml (attached) now (still without BEAGLE though because that keeps producing infinite likelihood values)!

Thanks Michael!

Op maandag 16 februari 2015 13:53:42 UTC+1 schreef michaelm:
20150211_16S28SCOI_small_HKY_starttree.tre
20150216_16S28SCOI_small_starttree.nex
20150217_16S28SCOI_small_starttree_cipres.xml

Johanna Dechert

unread,
Jul 9, 2020, 3:01:39 PM7/9/20
to beast-users
Hi Michael,

I get the same error message:

Error 110 parsing the xml input file

validate and intialize error: Label ''NC_026220.1'' in Newick beast.tree could not be identified. Perhaps taxa or taxonset is not specified?

My file has taxon names, though. I really don´t see what the problem is here because Beast2 ran before with a similar starting tree and the same taxon names.
Do you happen to have any idea what this is about? (I uploaded the tree and the xml file)

Thank you so much in advance,
Johanna
StartingTree.new
Beast2_input.xml.xml

michaelm

unread,
Jul 9, 2020, 4:14:28 PM7/9/20
to beast-users
Hi Johanna,

The issue is simply that the taxon named NC_026220.1 has single quotes around the name in the starting tree (line 248 of your file) but not in the sequence part of it (line 32). Just remove the single quotes around the name on line 248, then BEAST should be able to run with this file.

Cheers,
Michael

Miller, Mark

unread,
Jul 9, 2020, 6:18:00 PM7/9/20
to beast...@googlegroups.com

I think maybe it doesn’t like the ‘ ‘ surrounding the tax name in the tree.

The other tax labels in the tree don’t have that

east.util.TreeParser" IsLabelledNewick="true" estimate="false" initial="@Tree.t:Subset1" newick="((H5-104590:0.005337,(H2-132601:0.0019529999999999999,(((H1-130807:0.0018789999999999996,G11-108286:0.001665999999999999):9.699999999999986E-5,(G3-103591:0.0015240000000000002,(H9-104854:0.0026759999999999996,(((G5-131788:0.0015500000000000002,H11-131668:0.0012929999999999999):3.709999999999998E-4,((Tillansiavir1_minDepth5:5.1E-4,H12-105263:2.970000000000004E-4):1.8099999999999974E-4,(H8-131739:6.200000000000042E-5,G4-131619:4.2999999999999636E-5):6.919999999999999E-4):5.929999999999998E-4):8.069999999999996E-4,((((TillansiaP07_minDepth5:1.0000000000001327E-6,TillansiaP06_minDepth5:5.699999999999976E-5):9.99999999999994E-5,(Tillansia192_minDepth5:5.7000000000000627E-5,TillansiaB1684_minDepth5:8.600000000000014E-5):2.799999999999938E-5):1.000000000001E-6,TillansiaB1687_minDepth5:1.280000000000005E-4):1.4199999999999977E-4,(KY293680:0.0020499999999999997,(G2-109235:8.600000000000014E-5,H10-105083:4.000000000000002E-4):1.0000000000001327E-6):1.5800000000000015E-4):8.199999999999995E-4):8.76E-4):1.6000000000000042E-4):3.009999999999992E-4):1.8000000000000654E-5,(H7-102490:0.001978999999999999,G6-130781:0.0012259999999999997):8.400000000000074E-5):0.0010930000000000002):0.002574):4.34E-4,(((F11-109072:0.004432,F12-103854:0.002785000000000001):9.560000000000003E-4,(G8-108215-2:0.0016870000000000001,(G7-130188:0.0021809999999999998,((('NC_026220.1':1.1300000000000025E-4,H4-107787:7.099999999999988E-5):

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/beast-users/0008273a-c307-40fb-a418-f8485896077fo%40googlegroups.com.

Johanna Dechert

unread,
Jul 12, 2020, 3:46:27 PM7/12/20
to beast-users
Hi Michael,

thank you so much. It works just fine now. Sometimes I am blind for the most obvious things...Sorry.

Have a great time an stay healthy!
Johanna

Johanna Dechert

unread,
Jul 12, 2020, 3:49:36 PM7/12/20
to beast-users
Thank you very much for helping me out. It works now!

Have a nice day and stay healthy.
Johanna

To unsubscribe from this group and stop receiving emails from it, send an email to beast...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages