This document intends to display a feature of the nLTT package: if a stem is added to a phylogeny, the begin of that stem is set as the most recent common ancestor.
Here I create a random phylogeny:
set.seed(42)
tree1 <- ape::rcoal(2)
tree1$edge.length <- tree1$edge.length / tree1$edge.length[1] # nolint ape variable nameI copy that same phylogeny and add a stem:
Here is how the stemless phylogeny looks like:
I set root.edge to TRUE, just show it is
absent.
Here is how the phylogeny with stem looks like:
When overlaying their nLTT plots, one can expect two things:
The nLTT package does the latter:
When looking at the nLTT plot, one can eyeball that the nLTT statistic (the surface between the two curves) is around about one quarter.
When calculating the nLTT statistic, one needs to explicitly set to take the stems into account:
## [1] 0.25
When ignoring the stems, the phylogenies are equal, thus have an nLTT statistic of zero:
## [1] 0
Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.
This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.