Discussion:
[R-sig-phylo] Problem with negative ages in OUwie.boot?
Rafael S Marcondes
2018-05-02 18:08:56 UTC
Permalink
Hi all,

I need some help with a warning message I've been getting when running
parametric bootstrapping in OUwie.
OUwie.boot(nboot=1, simmap.tree=F...)
Beginning parametric bootstrap -- performing 1 replicates
Warning: Some dates are negative? rootAge may be incorrectly defined or you
are using a time-scaling method that warps the tree, like aba or zbla.
Initializing...
Finished. Begin thorough search...
Finished. Summarizing results.

Initially I didn't give it much thought, but my bootstrapping results are
quite unexpected, and I'm starting to think that may be related to that
warning.

I don't get that warning when I run OUwie() with the same
tree/dataset/settings, and I've been able to trace it to the function
dateNodes in the package paleotree, but haven't been able to go any further
than that.

Thanks in advance for any help!



*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)

Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA

Twitter: @brown_birds <https://twitter.com/brown_birds>

[[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
Rafael S Marcondes
2018-05-02 18:22:04 UTC
Permalink
Here's a little more info that may be relevant: the tree is not supposed to
have negative dates. Although when I do is.ultrametric(tr) I get FALSE, I
have always been just ascribing that to lack of precision, in part because
it has never been a problem with OUwie().


*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)

Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
Post by Rafael S Marcondes
Hi all,
I need some help with a warning message I've been getting when running
parametric bootstrapping in OUwie.
OUwie.boot(nboot=1, simmap.tree=F...)
Beginning parametric bootstrap -- performing 1 replicates
Warning: Some dates are negative? rootAge may be incorrectly defined or
you are using a time-scaling method that warps the tree, like aba or zbla.
Initializing...
Finished. Begin thorough search...
Finished. Summarizing results.
Initially I didn't give it much thought, but my bootstrapping results are
quite unexpected, and I'm starting to think that may be related to that
warning.
I don't get that warning when I run OUwie() with the same
tree/dataset/settings, and I've been able to trace it to the function
dateNodes in the package paleotree, but haven't been able to go any further
than that.
Thanks in advance for any help!
*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
[[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
Eliot Miller
2018-05-02 18:26:27 UTC
Permalink
What does: min(tree$edge.length) say?

Eliot
Post by Rafael S Marcondes
Here's a little more info that may be relevant: the tree is not supposed to
have negative dates. Although when I do is.ultrametric(tr) I get FALSE, I
have always been just ascribing that to lack of precision, in part because
it has never been a problem with OUwie().
*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
Post by Rafael S Marcondes
Hi all,
I need some help with a warning message I've been getting when running
parametric bootstrapping in OUwie.
OUwie.boot(nboot=1, simmap.tree=F...)
Beginning parametric bootstrap -- performing 1 replicates
Warning: Some dates are negative? rootAge may be incorrectly defined or
you are using a time-scaling method that warps the tree, like aba or
zbla.
Post by Rafael S Marcondes
Initializing...
Finished. Begin thorough search...
Finished. Summarizing results.
Initially I didn't give it much thought, but my bootstrapping results are
quite unexpected, and I'm starting to think that may be related to that
warning.
I don't get that warning when I run OUwie() with the same
tree/dataset/settings, and I've been able to trace it to the function
dateNodes in the package paleotree, but haven't been able to go any
further
Post by Rafael S Marcondes
than that.
Thanks in advance for any help!
*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-
[[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
David Bapst
2018-05-02 18:35:24 UTC
Permalink
Rafael,

That error message is from paleotree's dateNodes function, which is
called as part of OUwie's approach to getting node dates. I think I
see what Elliot is trying to get at, but this might be quicker:

node.depth.edgelength(tree)

That should tell us how far each node, including the tips, are from the root.

Cheers,
-Dave
Post by Eliot Miller
What does: min(tree$edge.length) say?
Eliot
Post by Rafael S Marcondes
Here's a little more info that may be relevant: the tree is not supposed to
have negative dates. Although when I do is.ultrametric(tr) I get FALSE, I
have always been just ascribing that to lack of precision, in part because
it has never been a problem with OUwie().
*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
Post by Rafael S Marcondes
Hi all,
I need some help with a warning message I've been getting when running
parametric bootstrapping in OUwie.
OUwie.boot(nboot=1, simmap.tree=F...)
Beginning parametric bootstrap -- performing 1 replicates
Warning: Some dates are negative? rootAge may be incorrectly defined or
you are using a time-scaling method that warps the tree, like aba or
zbla.
Post by Rafael S Marcondes
Initializing...
Finished. Begin thorough search...
Finished. Summarizing results.
Initially I didn't give it much thought, but my bootstrapping results are
quite unexpected, and I'm starting to think that may be related to that
warning.
I don't get that warning when I run OUwie() with the same
tree/dataset/settings, and I've been able to trace it to the function
dateNodes in the package paleotree, but haven't been able to go any
further
Post by Rafael S Marcondes
than that.
Thanks in advance for any help!
*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
--
David W. Bapst, PhD
Postdoc, Ecology & Evolutionary Biology, Univ of Tenn Knoxville
Lecturer, Geology & Geophysics, Texas A & M University
https://github.com/dwbapst/paleotree
Google Calender: https://goo.gl/EpiM4J

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
David Bapst
2018-05-02 18:53:12 UTC
Permalink
Hi Rafael,

I found the source of the error, I think, and filed an issue at github
on the OUwie repo. There are issues with how the code in OUwie handles
non-ultrametric trees if a root.age isn't given by the user, causing
problems for the paleotree function dateNodes, and your tree is
apparently non-ultrametric enough to run afoul of these issues.

https://github.com/thej022214/OUwie/issues/3

Given that your tree appears to be non-ultrametric enough to cause
branching.times to throw some nonsensical node ages, if it is supposed
to be ultrametric. I recommend checking it carefully to figure out why
the tips seem to not quite be at the same distance from the root.

Cheers,
-Dave.
Post by David Bapst
Rafael,
That error message is from paleotree's dateNodes function, which is
called as part of OUwie's approach to getting node dates. I think I
node.depth.edgelength(tree)
That should tell us how far each node, including the tips, are from the root.
Cheers,
-Dave
Post by Eliot Miller
What does: min(tree$edge.length) say?
Eliot
Post by Rafael S Marcondes
Here's a little more info that may be relevant: the tree is not supposed to
have negative dates. Although when I do is.ultrametric(tr) I get FALSE, I
have always been just ascribing that to lack of precision, in part because
it has never been a problem with OUwie().
*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
Post by Rafael S Marcondes
Hi all,
I need some help with a warning message I've been getting when running
parametric bootstrapping in OUwie.
OUwie.boot(nboot=1, simmap.tree=F...)
Beginning parametric bootstrap -- performing 1 replicates
Warning: Some dates are negative? rootAge may be incorrectly defined or
you are using a time-scaling method that warps the tree, like aba or
zbla.
Post by Rafael S Marcondes
Initializing...
Finished. Begin thorough search...
Finished. Summarizing results.
Initially I didn't give it much thought, but my bootstrapping results are
quite unexpected, and I'm starting to think that may be related to that
warning.
I don't get that warning when I run OUwie() with the same
tree/dataset/settings, and I've been able to trace it to the function
dateNodes in the package paleotree, but haven't been able to go any
further
Post by Rafael S Marcondes
than that.
Thanks in advance for any help!
*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)
Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
--
David W. Bapst, PhD
Postdoc, Ecology & Evolutionary Biology, Univ of Tenn Knoxville
Lecturer, Geology & Geophysics, Texas A & M University
https://github.com/dwbapst/paleotree
Google Calender: https://goo.gl/EpiM4J
--
David W. Bapst, PhD
Postdoc, Ecology & Evolutionary Biology, Univ of Tenn Knoxville
Lecturer, Geology & Geophysics, Texas A & M University
https://github.com/dwbapst/paleotree
Google Calender: https://goo.gl/EpiM4J

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
Brian O'Meara
2018-05-02 19:30:28 UTC
Permalink
Post by David Bapst
Given that your tree appears to be non-ultrametric enough to cause
branching.times to throw some nonsensical node ages, if it is supposed
to be ultrametric. I recommend checking it carefully to figure out why
the tips seem to not quite be at the same distance from the root.
Sometimes this happens with tree import from a file -- it could be a
newick tree with branch lengths precise to the hundredths but a lot of the
R ultrametric tests by default use higher precision (1e-08, iirc).

Best,
Brian

[[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
David Bapst
2018-05-03 19:34:10 UTC
Permalink
Hmm. I hope that isn't the case - branching.times() is used pretty
widely in ape-dependent packages for getting node ages from dated
ultrametric trees, and if such minimally non-ultrametric trees can
cause branching.times throw negative node ages, then I'm really
concerned what impact that might have elsewhere in the R-phylo
universe.
-Dave
Post by David Bapst
Given that your tree appears to be non-ultrametric enough to cause
branching.times to throw some nonsensical node ages, if it is supposed
to be ultrametric. I recommend checking it carefully to figure out why
the tips seem to not quite be at the same distance from the root.
Sometimes this happens with tree import from a file -- it could be a newick
tree with branch lengths precise to the hundredths but a lot of the R
ultrametric tests by default use higher precision (1e-08, iirc).
Best,
Brian
--
David W. Bapst, PhD
Postdoc, Ecology & Evolutionary Biology, Univ of Tenn Knoxville
Lecturer, Geology & Geophysics, Texas A & M University
https://github.com/dwbapst/paleotree
Google Calender: https://goo.gl/EpiM4J

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
Liam J. Revell
2018-05-03 20:09:11 UTC
Permalink
I haven't been closing following this thread, so I'm not sure that this
is relevant - but phytools has a function called 'force.ultrametric' (I
believe) that does precisely what its name suggests it might.

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de Biología
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/
Post by David Bapst
Hmm. I hope that isn't the case - branching.times() is used pretty
widely in ape-dependent packages for getting node ages from dated
ultrametric trees, and if such minimally non-ultrametric trees can
cause branching.times throw negative node ages, then I'm really
concerned what impact that might have elsewhere in the R-phylo
universe.
-Dave
Post by David Bapst
Given that your tree appears to be non-ultrametric enough to cause
branching.times to throw some nonsensical node ages, if it is supposed
to be ultrametric. I recommend checking it carefully to figure out why
the tips seem to not quite be at the same distance from the root.
Sometimes this happens with tree import from a file -- it could be a newick
tree with branch lengths precise to the hundredths but a lot of the R
ultrametric tests by default use higher precision (1e-08, iirc).
Best,
Brian
_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
Theodore Garland
2018-05-03 20:21:38 UTC
Permalink
I'll just add that it is always a really good idea to view the trees you
(think you) are using, not just rely on the variance-covariance matrices
derived from them and used in PGLS analyses, etc. Several times when I was
compiling trees and data from the literature authors sent me tree files
(e.g., Nexus) that did not match what they showed in a paper or described
in the methods. Sometimes this was because the default display in Mesquite
is NOT "branches proportional to lengths," but I am sure potentially
misleading displays occur in some other programs as well.

If one does force a tree to become ultrametric, then make sure you provide
that tree and the original in the Online Supplemental Material or whatever,
and clearly say what you did.

Cheers,
Ted




Theodore Garland, Jr., Distinguished Professor

Department of Evolution, Ecology, and Organismal Biology (EEOB)

University of California, Riverside

Riverside, CA 92521

Office Phone: (951) 827-3524

Facsimile: (951) 827-4286 (not confidential)

Email: ***@ucr.edu

http://www.biology.ucr.edu/people/faculty/Garland.html

http://scholar.google.com/citations?hl=en&user=iSSbrhwAAAAJ


Director, UCR Institute for the Development of
<http://idea.ucr.edu/>Educational
Applications <http://idea.ucr.edu/>


Editor in Chief, *Physiological and Biochemical Zoology
<http://www.press.uchicago.edu/ucp/journals/journal/pbz.html>*


Fail Lab: Episode One


http://youtu.be/c0msBWyTzU0
I haven't been closing following this thread, so I'm not sure that this is
relevant - but phytools has a function called 'force.ultrametric' (I
believe) that does precisely what its name suggests it might.
Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de Biología
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/
Post by David Bapst
Hmm. I hope that isn't the case - branching.times() is used pretty
widely in ape-dependent packages for getting node ages from dated
ultrametric trees, and if such minimally non-ultrametric trees can
cause branching.times throw negative node ages, then I'm really
concerned what impact that might have elsewhere in the R-phylo
universe.
-Dave
Post by David Bapst
Given that your tree appears to be non-ultrametric enough to cause
branching.times to throw some nonsensical node ages, if it is supposed
to be ultrametric. I recommend checking it carefully to figure out why
the tips seem to not quite be at the same distance from the root.
Sometimes this happens with tree import from a file -- it could be a newick
tree with branch lengths precise to the hundredths but a lot of the R
ultrametric tests by default use higher precision (1e-08, iirc).
Best,
Brian
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-
[[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
Liam J. Revell
2018-05-03 21:08:48 UTC
Permalink
Just to clarify, force.ultrametric is not a formal rate-smoothing method
or anything like that. It is intended only for use to resolve numerical
precision issues such as the one raised in this thread.

Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de Biología
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/
Post by Theodore Garland
I'll just add that it is always a really good idea to view the trees you
(think you) are using, not just rely on the variance-covariance matrices
derived from them and used in PGLS analyses, etc.  Several times when I
was compiling trees and data from the literature authors sent me tree
files (e.g., Nexus) that did not match what they showed in a paper or
described in the methods.  Sometimes this was because the
default display in Mesquite is NOT "branches proportional to lengths,"
but I am sure potentially misleading displays occur in some other
programs as well.
If one does force a tree to become ultrametric, then make sure you
provide that tree and the original in the Online Supplemental Material
or whatever, and clearly say what you did.
Cheers,
Ted
Theodore Garland, Jr., Distinguished Professor
Department of Evolution, Ecology, and Organismal Biology (EEOB)
University of California, Riverside
Riverside, CA 92521
Office Phone: (951) 827-3524 <tel:%28951%29%20827-3524>
Facsimile: (951) 827-4286 <tel:%28951%29%20827-4286> (not confidential)
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwAAAAJ
Director, UCR Institute for the Development of
<http://idea.ucr.edu/>Educational Applications <http://idea.ucr.edu/>
Editor in Chief, /Physiological and Biochemical Zoology
<http://www.press.uchicago.edu/ucp/journals/journal/pbz.html>/
Fail Lab: Episode One

I haven't been closing following this thread, so I'm not sure that
this is relevant - but phytools has a function called
'force.ultrametric' (I believe) that does precisely what its name
suggests it might.
Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de Biología
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/
<http://faculty.umb.edu/liam.revell/>
Hmm. I hope that isn't the case - branching.times() is used pretty
widely in ape-dependent packages for getting node ages from dated
ultrametric trees, and if such minimally non-ultrametric trees can
cause branching.times throw negative node ages, then I'm really
concerned what impact that might have elsewhere in the R-phylo
universe.
-Dave
On Wed, May 2, 2018 at 2:53 PM, David Bapst
Given that your tree appears to be non-ultrametric
enough to cause
branching.times to throw some nonsensical node ages, if
it is supposed
to be ultrametric. I recommend checking it carefully to
figure out why
the tips seem to not quite be at the same distance from
the root.
  Sometimes this happens with tree import from a file -- it
could be a newick
tree with branch lengths precise to the hundredths but a lot
of the R
ultrametric tests by default use higher precision (1e-08, iirc).
Best,
Brian
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
<https://stat.ethz.ch/mailman/listinfo/r-sig-phylo>
Searchable archive at
_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
Eliot Miller
2018-05-04 13:22:23 UTC
Permalink
I suggest calling min(tree$edge.length) on any tree you plan to use for
comparative methods, including the one you're having trouble with Rafael.
If you get a negative value, then something is really funny and you need to
solve it. If you get a zero then various comparative methods will throw
errors, but it's not the end of the world--there are workarounds. If
neither of these things is true, and the tree is still returning FALSE to
is.ultrametric, then assuming the tree is supposed to be ultrametric, it's
almost certainly a tolerance thing (which you can check directly by
tweaking the tol method in the is.ultrametric function). In that case, I've
had good experiences using the phangorn/phytools approach to force the tree
ultrametric.

Eliot
Post by Liam J. Revell
Just to clarify, force.ultrametric is not a formal rate-smoothing method
or anything like that. It is intended only for use to resolve numerical
precision issues such as the one raised in this thread.
Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de Biología
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/
Post by Theodore Garland
I'll just add that it is always a really good idea to view the trees you
(think you) are using, not just rely on the variance-covariance matrices
derived from them and used in PGLS analyses, etc. Several times when I was
compiling trees and data from the literature authors sent me tree files
(e.g., Nexus) that did not match what they showed in a paper or described
in the methods. Sometimes this was because the default display in Mesquite
is NOT "branches proportional to lengths," but I am sure potentially
misleading displays occur in some other programs as well.
If one does force a tree to become ultrametric, then make sure you
provide that tree and the original in the Online Supplemental Material or
whatever, and clearly say what you did.
Cheers,
Ted
Theodore Garland, Jr., Distinguished Professor
Department of Evolution, Ecology, and Organismal Biology (EEOB)
University of California, Riverside
Riverside, CA 92521
Office Phone: (951) 827-3524 <tel:%28951%29%20827-3524>
Facsimile: (951) 827-4286 <tel:%28951%29%20827-4286> (not confidential)
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwAAAAJ
Director, UCR Institute for the Development of <http://idea.ucr.edu/
Post by Theodore Garland
Educational Applications <http://idea.ucr.edu/>
Editor in Chief, /Physiological and Biochemical Zoology <
http://www.press.uchicago.edu/ucp/journals/journal/pbz.html>/
Fail Lab: Episode One
http://youtu.be/c0msBWyTzU0_
I haven't been closing following this thread, so I'm not sure that
this is relevant - but phytools has a function called
'force.ultrametric' (I believe) that does precisely what its name
suggests it might.
Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de Biología
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/
<http://faculty.umb.edu/liam.revell/>
Hmm. I hope that isn't the case - branching.times() is used pretty
widely in ape-dependent packages for getting node ages from dated
ultrametric trees, and if such minimally non-ultrametric trees can
cause branching.times throw negative node ages, then I'm really
concerned what impact that might have elsewhere in the R-phylo
universe.
-Dave
On Wed, May 2, 2018 at 2:53 PM, David Bapst
Given that your tree appears to be non-ultrametric
enough to cause
branching.times to throw some nonsensical node ages, if
it is supposed
to be ultrametric. I recommend checking it carefully to
figure out why
the tips seem to not quite be at the same distance from
the root.
Sometimes this happens with tree import from a file -- it
could be a newick
tree with branch lengths precise to the hundredths but a lot
of the R
ultrametric tests by default use higher precision (1e-08, iirc).
Best,
Brian
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
<https://stat.ethz.ch/mailman/listinfo/r-sig-phylo>
Searchable archive at
[[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list - R-sig-***@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
Searchable archive at http://www.mail-archive.com/r-sig-***@r-project.org/
Rafael S Marcondes
2018-05-04 13:32:00 UTC
Permalink
Hi Elliot et al,

Thanks for all the helpful answers, and sorry for my delay in getting back.
min(tree$edge.length) returns a nonzero positive number, but running
force.ultrametric on the tr did not cause that warning message to go away...


*--*
*Rafael Sobral Marcondes*
PhD Candidate (Systematics, Ecology and Evolution/Ornithology)

Museum of Natural Science <http://sites01.lsu.edu/wp/mns/>
Louisiana State University
119 Foster Hall
Baton Rouge, LA 70803, USA
Post by Eliot Miller
I suggest calling min(tree$edge.length) on any tree you plan to use for
comparative methods, including the one you're having trouble with Rafael.
If you get a negative value, then something is really funny and you need to
solve it. If you get a zero then various comparative methods will throw
errors, but it's not the end of the world--there are workarounds. If
neither of these things is true, and the tree is still returning FALSE to
is.ultrametric, then assuming the tree is supposed to be ultrametric, it's
almost certainly a tolerance thing (which you can check directly by
tweaking the tol method in the is.ultrametric function). In that case, I've
had good experiences using the phangorn/phytools approach to force the tree
ultrametric.
Eliot
Post by Liam J. Revell
Just to clarify, force.ultrametric is not a formal rate-smoothing method
or anything like that. It is intended only for use to resolve numerical
precision issues such as the one raised in this thread.
Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de Biología
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/
Post by Theodore Garland
I'll just add that it is always a really good idea to view the trees you
(think you) are using, not just rely on the variance-covariance matrices
derived from them and used in PGLS analyses, etc. Several times when I was
compiling trees and data from the literature authors sent me tree files
(e.g., Nexus) that did not match what they showed in a paper or described
in the methods. Sometimes this was because the default display in Mesquite
is NOT "branches proportional to lengths," but I am sure potentially
misleading displays occur in some other programs as well.
If one does force a tree to become ultrametric, then make sure you
provide that tree and the original in the Online Supplemental Material or
whatever, and clearly say what you did.
Cheers,
Ted
Theodore Garland, Jr., Distinguished Professor
Department of Evolution, Ecology, and Organismal Biology (EEOB)
University of California, Riverside
Riverside, CA 92521
Office Phone: (951) 827-3524 <tel:%28951%29%20827-3524>
Facsimile: (951) 827-4286 <tel:%28951%29%20827-4286> (not confidential)
http://www.biology.ucr.edu/people/faculty/Garland.html
http://scholar.google.com/citations?hl=en&user=iSSbrhwAAAAJ
Director, UCR Institute for the Development of <http://idea.ucr.edu/>Educational
Applications <http://idea.ucr.edu/>
Editor in Chief, /Physiological and Biochemical Zoology <
http://www.press.uchicago.edu/ucp/journals/journal/pbz.html>/
Fail Lab: Episode One
http://youtu.be/c0msBWyTzU0_
I haven't been closing following this thread, so I'm not sure that
this is relevant - but phytools has a function called
'force.ultrametric' (I believe) that does precisely what its name
suggests it might.
Liam J. Revell, Associate Professor of Biology
University of Massachusetts Boston
& Profesor Asociado, Programa de Biología
Universidad del Rosario
web: http://faculty.umb.edu/liam.revell/
<http://faculty.umb.edu/liam.revell/>
Hmm. I hope that isn't the case - branching.times() is used pretty
widely in ape-dependent packages for getting node ages from dated
ultrametric trees, and if such minimally non-ultrametric trees can
cause branching.times throw negative node ages, then I'm really
concerned what impact that might have elsewhere in the R-phylo
universe.
-Dave
On Wed, May 2, 2018 at 2:53 PM, David Bapst
Given that your tree appears to be non-ultrametric
enough to cause
branching.times to throw some nonsensical node ages, if
it is supposed
to be ultrametric. I recommend checking it carefully to
figure out why
the tips seem to not quite be at the same distance from
the root.
Sometimes this happens with tree import from a file -- it
could be a newick
tree with branch lengths precise to the hundredths but a lot
of the R
ultrametric tests by default use higher precision (1e-08, iirc).
Best,
Brian
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo
<https://stat.ethz.ch/mailman/listinfo/r-sig-phylo>
Searchable archive at
[[alternative HTML version deleted]]

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