[R-sig-phylo] Branch lengths in phytools::plot.cophylo

2018-12-12 Thread Juan Antonio Balbuena

You can try this:

tree<- compute.brtime(tree, tree$Nnode:1)

It will produce an ultrametric tree with its nodes well separated.

I hope it helps

All the best

--

Dr. Juan A. Balbuena
Cavanilles Institute of Biodiversity and Evolutionary Biology
Symbiont Ecology and Evolution Lab
University of Valencia http://www.uv.es/~balbuena 

P.O. Box 22085 http://www.uv.es/cophylpaco 


46071 Valencia, Spain
e-mail: j.a.balbu...@uv.es tel. +34 963 543 
658    fax +34 963 543 733


*NOTE!*For shipments by EXPRESS COURIER use the following street address:
C/ Catedrático José Beltrán 2, 46980 Paterna (Valencia), Spain.


___
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] ape chronos function returning pLL of -1E100

2018-12-12 Thread John S Denton
I'm trying to use chronos (ape version 5.2) to scale a tree of ~800 tips, with 
branch lengths derived from a RAxML analysis. I'm using 4 outgroup 
calibrations. When I run the analysis using


t.og <- chronos(tree, lambda = 1, model = "relaxed", quiet = FALSE,
calibration = dd.out)


I get the following returned, in almost 5 seconds:


Setting initial dates...
Fitting in progress... get a first set of estimates
 Penalised log-lik = -1e+100
Optimising rates... dates... -1e+100

Done.


a look at attributes (attr(t.og, "message")) gives a "relative convergence 
(4)." The pLL, however, is -Inf. I have tried setting chronos.control to 
different values, with no success. It looks like it may be an issue with the 
optimization function inside chronos.


Are there additional constraints/code I can apply to make it optimize without 
(apparently) simply running to the boundary?


Thanks,


~John

[[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/


Re: [R-sig-phylo] ape chronos function returning pLL of -1E100

2018-12-12 Thread John S Denton
As an update to my question--when I try to calibrate the tree itself using the 
default single root calibration and default 1/1 min/max ages, the function 
appears to run fine. When I add in my calibration table, the function exits 
with the -Inf LL.


The tree is rooted. There are no duplicated nodes with conflicting ages, and R 
does not give errors about the formatting of the calibration table.


~John


From: R-sig-phylo  on behalf of John S 
Denton 
Sent: Wednesday, December 12, 2018 1:20:20 PM
To: r-sig-phylo@r-project.org
Subject: [R-sig-phylo] ape chronos function returning pLL of -1E100

I'm trying to use chronos (ape version 5.2) to scale a tree of ~800 tips, with 
branch lengths derived from a RAxML analysis. I'm using 4 outgroup 
calibrations. When I run the analysis using


t.og <- chronos(tree, lambda = 1, model = "relaxed", quiet = FALSE,
calibration = dd.out)


I get the following returned, in almost 5 seconds:


Setting initial dates...
Fitting in progress... get a first set of estimates
 Penalised log-lik = -1e+100
Optimising rates... dates... -1e+100

Done.


a look at attributes (attr(t.og, "message")) gives a "relative convergence 
(4)." The pLL, however, is -Inf. I have tried setting chronos.control to 
different values, with no success. It looks like it may be an issue with the 
optimization function inside chronos.


Are there additional constraints/code I can apply to make it optimize without 
(apparently) simply running to the boundary?


Thanks,


~John

[[alternative HTML version deleted]]

___
R-sig-phylo mailing list - R-sig-phylo@r-project.org
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-phylodata=01%7C01%7Cjdenton%40amnh.org%7C74f64ad9321e496dcbf208d6605e850e%7Cbe0003e8c6b9496883aeb34586974b76%7C0sdata=LEcC13%2BvcHJ3NY8su7oRd03U53SfnJGehwaTUYKblLw%3Dreserved=0
Searchable archive at 
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fr-sig-phylo%40r-project.org%2Fdata=01%7C01%7Cjdenton%40amnh.org%7C74f64ad9321e496dcbf208d6605e850e%7Cbe0003e8c6b9496883aeb34586974b76%7C0sdata=lkx0ZcpMnQgumw2CvwMrFzKztku1bMgK%2Fi8IXmdwuWU%3Dreserved=0

[[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/


Re: [R-sig-phylo] Branch lengths in phytools::plot.cophylo

2018-12-12 Thread Liam Revell
I didn't see the email that this addresses, but I will add a couple of 
comments to Juan's suggestion:

(1) phytools::cophylo does not require the input trees to have branch 
lengths. If they do not, arbitrary branch lengths for plotting are 
computed using ape::compute.brlen.

(2) The code suggested by Juan does indeed assign branch lengths to the 
tree; however, it has effect of assigning different depths for 
equivalently nested relationships. If you don't like the spacing of 
compute.brlen, it is possible to change it using the argument 'power.' 
0http://faculty.umb.edu/liam.revell/, http://www.phytools.org

On 12/12/2018 12:07 PM, Juan Antonio Balbuena wrote:
> You can try this:
> 
> tree<- compute.brtime(tree, tree$Nnode:1)
> 
> It will produce an ultrametric tree with its nodes well separated.
> 
> I hope it helps
> 
> All the best
> 
___
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/


Re: [R-sig-phylo] OU for non-ultrametric trees

2018-12-12 Thread David Bapst
Danielle,

Apologies for the late comment on this, but what do you mean by non-rooted?
Do you mean the tree is rooted, but has a three-way split with the outgroup
at the root node? You shouldn't do OU on a tree you can't assign a root to.

I'm also just a bit curious what gave you the sense that OU was
inappropriate for non-ultrametric trees. To my knowledge, this was only an
issue in one case, as highlighted by Slater (2014), that one particularly
(popular) algorithm for fitting evolutionary models doesn't work for OU on
non-ultrametric trees. I don't think this is as much of a concern in 2018,
as I think most/all packages that were doing such have fixed their code so
an alternative algorithm is used when a non-ultrametric tree is given (as
with a tree containing fossil taxa).

Cheers,
-Dave


On Thu, Dec 6, 2018 at 6:35 AM Danielle Miller 
wrote:

> Hi all,
>
> I have a non-rooted non-ultrametric tree and a corresponding set of a
> single trait values for each one of the tips.
> I’m interested whether it follows a BM model or an OU.
>
> Reading previous comments in the archive, I understood that running an OU
> process is inadequate in a case of non-ultrametric trees, however I did not
> fully understand why.
> As I use ouch package, what are the consequences of running an unrooted
> tree? And a non-ultrametric one?
>
> What would be the best way assessing this issue? Diversitree should be
> more reliable?
>
> I will appreciate any explanation and help,
> Danielle Miller
> ___
> 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/
>


-- 
David W. Bapst, PhD
Asst Research Professor, Geology & Geophysics, Texas A & M University
Postdoc, Ecology & Evolutionary Biology, Univ of Tenn Knoxville
https://github.com/dwbapst/paleotree

[[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/