Dear Vincenzo,
For ML estimates the edge length are the expected number of substitutions per 
site, which depends on the product of rate and time. So you need either a rate 
estimate or calibration points to estimate the time. If you divide the edge 
length by the rate the edges should be proportional to time.
With pml_bb you can estimate ultrametric or tip dated trees with a strict 
molecular clock model.
Kind regards,
Klaus




Von meinem iPhone gesendet

> Am 04.03.2024 um 21:06 schrieb Vincenzo Ellis <vael...@udel.edu>:
> 
> Dear Liam,
> 
> Thank you for your answer. Yes, I have a hypothesized average clock rate
> and no explicit calibration points.
> 
> If I use ape::chronos() with default values it gives me a depth of 1 at the
> root. So I suppose to rescale the branch lengths I just need to multiply
> all of the branch lengths by a value (i.e., tree$edge.length * value), is
> that right?
> 
> Thanks again,
> 
> Vincenzo
> 
>> On Mon, Mar 4, 2024 at 11:43 AM Liam J. Revell <liam.rev...@umb.edu> wrote:
>> 
>> Dear Vincenzo.
>> 
>> If I understand your problem problem, you do not have any explicit
>> calibration points -- but you have a hypothesized average clock rate?
>> 
>> If so, then you can obtain an ultrametric tree from* ape::chronos* for
>> any value of the smoothing parameter (*lambda*) and then simply re-scale
>> it to have the desired total depth (based on your hypothesized clock rate).
>> 
>> To choose a "correct" value of *lambda* one can use cross-validation as
>> described in Sanderson (2002; doi:10.1093/oxfordjournals.molbev.a003974).
>> 
>> Others should feel welcome to weigh in if this is not right.
>> 
>> All the best, Liam
>> Liam J. Revell
>> Professor of Biology, University of Massachusetts Boston
>> Web: http://faculty.umb.edu/liam.revell/
>> Book: Phylogenetic Comparative Methods in R
>> <https://press.princeton.edu/books/phylogenetic-comparative-methods-in-r>
>> (*Princeton University Press*, 2022)
>> 
>> 
>> On 3/4/2024 11:09 AM, Vincenzo Ellis wrote:
>> 
>> [You don't often get email from vael...@udel.edu. Learn why this is 
>> important at https://aka.ms/LearnAboutSenderIdentification ]
>> 
>> CAUTION: EXTERNAL SENDER
>> 
>> Dear Emmanuel,
>> 
>> Thank you very much for your response. I cannot see how to provide the
>> substitution rate to the phangorn::pml_bb() function, but I was looking at
>> the ape::node.dating() function and it appears that I could provide the
>> substitution rate to the "mu" argument and then set the "node.dates"
>> argument to NA or zero for all tips (I'm not sure if NA or zero would be
>> preferable to force the tips to all be from a single time point). Do you
>> think that would work? I'm not sure how to make ape::node.dating() accept a
>> substitution rate rather than try to estimate one. Maybe an option could be
>> added to allow mu to equal a user-specified number rather than the output
>> of ape::estimate.mu()?
>> 
>> Another option might be to calculate an estimated age for every node
>> connecting sister taxa in the tree by converting the genetic distances
>> between sister pairs to divergence times using the substitution rate and
>> then use those as priors in ape::chronos(). I suppose I could also apply
>> that logic to date all of the nodes by using the mean pairwise distances
>> between taxa on either side of a node and converting that to divergence
>> times (although the R code for such a calculation would likely take me a
>> while to figure out). Would that be another option?
>> 
>> Thanks again,
>> 
>> Vincenzo
>> 
>> On Sat, Mar 2, 2024 at 5:44 AM Emmanuel Paradis <emmanuel.para...@ird.fr> 
>> <emmanuel.para...@ird.fr>
>> wrote:
>> 
>> 
>> Hi Vincenzo,
>> 
>> There's no direct way to do this with ape::chronos(). You may have a look
>> at the function phangorn::pml_bb() but I'm not sure it can estimate the
>> dates if the rate is provided in a model object given as main argument(?)
>> 
>> That said, I expect that estimating so many dates to be very challenging
>> (unless you have a lot of known dates for calibration). This implies that
>> you are certainly right to look for an approach where you don't need to
>> estimate the rates.
>> 
>> Best,
>> 
>> Emmanuel
>> 
>> ----- Le 27 Fév 24, à 22:40, Vincenzo Ellis vael...@udel.edu a écrit :
>> 
>> 
>> Dear R-sig-phylo members,
>> 
>> I've made a maximum likelihood tree in Raxml for several thousand taxa
>> using a single gene that has an estimated substitution rate of 0.006
>> substitutions/nucleotide/My. Is there a way to use chronos in ape to
>> 
>> apply
>> 
>> that substitution rate as a fixed clock rate and generate an ultrametric
>> time-scaled version of the tree?
>> 
>> Thank you,
>> 
>> Vincenzo
>> 
>>      [[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-sig-phylo mailing list - 
>> R-sig-phylo@r-project.orghttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylo&data=05%7C02%7Cliam.revell%40umb.edu%7C94e522b834f94ff6aa7c08dc3c659399%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638451654193183565%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=wV2IJEHNPpbc2a7Erg%2F14jVmDcIqLshVohWaKa6vG6U%3D&reserved=0
>>  <https://stat.ethz.ch/mailman/listinfo/r-sig-phylo>
>> Searchable archive at
>> 
>> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2F&data=05%7C02%7Cliam.revell%40umb.edu%7C94e522b834f94ff6aa7c08dc3c659399%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638451654193196126%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=d4fLpFetiQDBjHKTmdlDijgx%2F360Z2oPddHLdCqrrUQ%3D&reserved=0
>>  <http://www.mail-archive.com/r-sig-phylo@r-project.org/>
>> 
>>        [[alternative HTML version deleted]]
>> 
>> _______________________________________________
>> R-sig-phylo mailing list - 
>> R-sig-phylo@r-project.orghttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylo&data=05%7C02%7Cliam.revell%40umb.edu%7C94e522b834f94ff6aa7c08dc3c659399%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638451654193201324%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=XV4ICgm3xswIObonT8pYZcEHsQVSImxPcKHqefo8zuk%3D&reserved=0
>>  <https://stat.ethz.ch/mailman/listinfo/r-sig-phylo>
>> Searchable archive at 
>> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2F&data=05%7C02%7Cliam.revell%40umb.edu%7C94e522b834f94ff6aa7c08dc3c659399%7Cb97188711ee94425953c1ace1373eb38%7C0%7C0%7C638451654193205831%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=dbdnzYPubwMiyqGLncCCl8P5bPDQ%2Bn3QPUUEAt4sQZQ%3D&reserved=0
>>  <http://www.mail-archive.com/r-sig-phylo@r-project.org/>
>> 
>> 
> 
>    [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-phylo mailing list - R-sig-phylo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
> Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

_______________________________________________
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-phylo@r-project.org/

Reply via email to