How to use beast on sequence data with time?
0
0
Entering edit mode
9 months ago
Belanov • 0

I'm working on sequencing data with each data sampling time recorded, and I'm trying to use beast for generating a "time-scaled phylogeny". I'm only familiar with "traditional" phylogenetics without time-scale involved. I've complete a first run and the result seems weird.

I'm using GUI version of beauti and set most options as default to generate a xml file and run beast. The following is tail of the xml file.

 </tree>
<parameter id="birthRate.t:aligned-filtered" spec="parameter.RealParameter" name="stateNode">1.0</parameter>
<parameter id="clockRate.c:aligned-filtered" spec="parameter.RealParameter" name="stateNode">1.0</parameter>
</state>
<init id="RandomTree.t:aligned-filtered" spec="beast.evolution.tree.RandomTree" estimate="false" initial="@Tree.t:aligned-filtered" taxa="@aligned-filtered">
<populationModel id="ConstantPopulation0.t:aligned-filtered" spec="ConstantPopulation">
<parameter id="randomPopSize.t:aligned-filtered" spec="parameter.RealParameter" name="popSize">1.0</parameter>
</populationModel>
</init>
<distribution id="posterior" spec="util.CompoundDistribution">
<distribution id="prior" spec="util.CompoundDistribution">
<distribution id="YuleModel.t:aligned-filtered" spec="beast.evolution.speciation.YuleModel" birthDiffRate="@birthRate.t:aligned-filtered" tree="@Tree.t:aligned-filtered"/>
<prior id="YuleBirthRatePrior.t:aligned-filtered" name="distribution" x="@birthRate.t:aligned-filtered">
<Uniform id="Uniform.1" name="distr" upper="Infinity"/>
</prior>
<prior id="ClockPrior.c:aligned-filtered" name="distribution" x="@clockRate.c:aligned-filtered">
<Uniform id="Uniform.0" name="distr" upper="Infinity"/>
</prior>
</distribution>
<distribution id="likelihood" spec="util.CompoundDistribution" useThreads="true">
<distribution id="treeLikelihood.aligned-filtered" spec="ThreadedTreeLikelihood" data="@aligned-filtered" tree="@Tree.t:aligned-filtered" useAmbiguities="true">
<siteModel id="SiteModel.s:aligned-filtered" spec="SiteModel">
<parameter id="mutationRate.s:aligned-filtered" spec="parameter.RealParameter" estimate="false" name="mutationRate">1.0</parameter>
<parameter id="gammaShape.s:aligned-filtered" spec="parameter.RealParameter" estimate="false" name="shape">1.0</parameter>
<parameter id="proportionInvariant.s:aligned-filtered" spec="parameter.RealParameter" estimate="false" lower="0.0" name="proportionInvariant" upper="1.0">0.0</parameter>
<substModel id="JC69.s:aligned-filtered" spec="JukesCantor"/>
</siteModel>
<branchRateModel id="StrictClock.c:aligned-filtered" spec="beast.evolution.branchratemodel.StrictClockModel" clock.rate="@clockRate.c:aligned-filtered"/>
</distribution>
</distribution>
</distribution>
<operator id="YuleBirthRateScaler.t:aligned-filtered" spec="ScaleOperator" parameter="@birthRate.t:aligned-filtered" scaleFactor="0.75" weight="3.0"/>
<operator id="YuleModelTreeScaler.t:aligned-filtered" spec="ScaleOperator" scaleFactor="0.5" tree="@Tree.t:aligned-filtered" weight="3.0"/>
<operator id="YuleModelTreeRootScaler.t:aligned-filtered" spec="ScaleOperator" rootOnly="true" scaleFactor="0.5" tree="@Tree.t:aligned-filtered" weight="3.0"/>
<operator id="YuleModelUniformOperator.t:aligned-filtered" spec="Uniform" tree="@Tree.t:aligned-filtered" weight="30.0"/>
<operator id="YuleModelSubtreeSlide.t:aligned-filtered" spec="SubtreeSlide" tree="@Tree.t:aligned-filtered" weight="15.0"/>
<operator id="YuleModelNarrow.t:aligned-filtered" spec="Exchange" tree="@Tree.t:aligned-filtered" weight="15.0"/>
<operator id="YuleModelWide.t:aligned-filtered" spec="Exchange" isNarrow="false" tree="@Tree.t:aligned-filtered" weight="3.0"/>
<operator id="YuleModelWilsonBalding.t:aligned-filtered" spec="WilsonBalding" tree="@Tree.t:aligned-filtered" weight="3.0"/>
<operator id="StrictClockRateScaler.c:aligned-filtered" spec="ScaleOperator" parameter="@clockRate.c:aligned-filtered" scaleFactor="0.75" weight="3.0"/>
<operator id="strictClockUpDownOperator.c:aligned-filtered" spec="UpDownOperator" scaleFactor="0.75" weight="3.0">
<up idref="clockRate.c:aligned-filtered"/>
<down idref="Tree.t:aligned-filtered"/>
</operator>
<logger id="tracelog" spec="Logger" fileName="aligned-filtered.log" logEvery="1000" model="@posterior" sanitiseHeaders="true" sort="smart">
<log idref="posterior"/>
<log idref="likelihood"/>
<log idref="prior"/>
<log idref="treeLikelihood.aligned-filtered"/>
<log id="TreeHeight.t:aligned-filtered" spec="beast.evolution.tree.TreeHeightLogger" tree="@Tree.t:aligned-filtered"/>
<log idref="YuleModel.t:aligned-filtered"/>
<log idref="birthRate.t:aligned-filtered"/>
<log idref="clockRate.c:aligned-filtered"/>
</logger>
<logger id="screenlog" spec="Logger" logEvery="1000">
<log idref="posterior"/>
<log idref="likelihood"/>
<log idref="prior"/>
</logger>
<logger id="treelog.t:aligned-filtered" spec="Logger" fileName="\$(tree).trees" logEvery="1000" mode="tree">
</logger>
<operatorschedule id="OperatorSchedule" spec="OperatorSchedule"/>
</run>
</beast>


Here are some questions:

1.The height of tip node (distance to root) seams both relevant to date of sample and number of mutation. In my result, The height of nodes in some large clade is identical, even there time of sampling is different, is this a normal phenomena or I need to change some options to get a reasonable result? Following is the tree shape

2.which tree should I use? Is the last tree in xxx.trees considered the "best"? Or some operations is needed afterwards?

3.This is a problem not so relevant to beast. If I'm interested in some site, and I want to mark on edges on which mutations on this site occurred, what should I do? There is a "reference genome" in the tree, In my mind I should translate coordinate on reference genome to coordinate on multiple alignment, are there simple methods or I need to write scripts to do this?

phylogenetics • 481 views
0
Entering edit mode

For questions pertaining to beast, I highly recommend going to their google group here and seeing if your question has already been answered or if needed, you can open up a new topic.

Regarding your questions, I can try to answer your questions but take them with a grain of salt since I am not an expert here.

1: It is not clear what you could consider normal. Are you looking for something that would make biological sense? If so, that is highly dependent on your samples, which are not described in your post.

2: Maybe not the best try, but you can use TreeAnnotator to generate a single representative tree using your trees file.

3: Maybe try coloring your branches by their rates using something like figtree or ggtree?

0
Entering edit mode

Thanks very much for reply, for the first question I want to know how to interpret edge length. I'm not experience in this field and I'm try to guess the mechanism (maybe I should start from reading some reference). In my mind there are possible two design and both OK for me, one is each edge length is assigned such that the depth of each node is strictly equal to sample time in input minus “inferred” root time, another is only based on how many mutations (supposed to be) assume on that edge. But the tree shape seems reflects non of them.