Closed jjmccollum closed 1 year ago
Hi Joey,
What seems to be happening is that because the trees in nexus format do not contain information about the youngest (= most recent) tip or the root height, DensiTree assumes the youngest tip is the baseline and puts every other node relative to the youngest tip based on branch length information (which is contained in the nexus file).
Usually, older tips, like fossils or ancient languages, have their tip date sampled, and the most recent tip is at a fixed date, causing no trouble in visualising the trees, but when the youngest tip is sampled the whole tree appears to be moving around. In summary, this is a visualisation issue in DensiTree (and other post-processing tools that rely on the nexus file only, like TreeAnnotator), not a BEAST or BDSKY issue.
A way around this could be to add a taxon that is younger than the sampled tips, or fixate the youngest tip at a fixed date. Make sure date ranges for sampled tips do not allow younger dates than the fixated tip.
Hope this is suitable for your situation.
@rbouckaert Thanks for the clarification! I modified the siamang
tip date to be fixed at 100, making it the youngest, and that seems to have fixed the DensiTree. Here is an updated plot for a distribution of trees generated from the updated XML file:
Your suggestion of adding a youngest tip at a fixed date makes sense, but is there a way to do this without letting the extra tip affect the rest of the model? If not, then it may be best to follow your second suggestion of fixing the youngest tip at a constant date.
It looks like this explains the issue I was seeing, so I will go ahead and close the issue. Thanks again!
@jjmccollum Adding a dummy tip may impact tree prior parameters, and thus potentially age estimates, but how much depends on how long the branch into the dummy tip becomes, how many other taxa there are and how much signal there is in the data. So, if fixating an existing tip is a viable option, that would certainly be preferable.
I am working with a rooted phylogeny (really, a manuscript tradition) whose shape can (ideally) be governed by several constraints:
I have tentatively chosen to work with the birth-death skyline (BDSKY) tree prior, as it presumably should accommodate all three constraints. I can get the following minimal working example to work:
In the above example (augmented from https://github.com/CompEvol/beast2/blob/master/examples/testTipDates.xml), I have constrained the
origin
parameter to have a height between 100 and 200 (with a uniform prior in this range), I have treated thehuman
,chimp
, andbonobo
taxa as having ranges of possible dates (with uniformMRCAPrior
s in these ranges for the tips and proposals made according toTipDatesRandomWalker
operators), and I have treated the remaining taxa as having fixed dates (without priors or operators). As far as I can tell, BEAST is correctly reading the tip priors in terms of dates and theorigin
priors in terms of height, but if this is incorrect, feel free to let me know, and I can update the example above.The problem is that when I plot the output distribution of trees as a DensiTree, the tips with fixed dates as well as the ones with variable dates appear to have their dates estimated:
Are there known issues like this when the BDSKY prior and tip date distributions are used in conjunction? (A potentially related issue is described in https://github.com/CompEvol/beast2/issues/981, but it was never resolved.) Or is the scattering of dates for fixed-date tips just an illusion resulting from the latest tip date being converted to height 0 in different trees? And in this latter case, is there a way to ensure that the DensiTree plot is aligned on a grid according to date rather than height? Ideally, the
gorilla
,orangutan
, andsiamang
tips would be dated in all sampled trees to 76, 77, and 84, respectively.