Re: [R-sig-phylo] pgls_different_pacakges_different_results

2020-01-17 Thread Liam Revell
Dear Jeremie. I agree with Julien. If your tree is non-ultrametric or if you use different fitting methods ("REML" vs. "ML") then you could obtain different results. The other circumstance in which you might have a different result is if your estimated value of lambda is outside the default

[R-sig-phylo] Postdoc in R phylogenetics

2019-12-17 Thread Liam Revell
Dear colleagues. I am currently advertising a postdoc in my lab at the University of Massachusetts Boston & the deadline to apply has been extended until this Friday, Dec. 20th. The idea of this appointment is to work on applying phylogenetic analysis methods (phylogenetic inference or

[R-sig-phylo] Postdoc in computational phylogenetics

2019-11-25 Thread Liam Revell
Dear list members. I'm currently advertising a postdoctoral position in my lab at the University of Massachusetts Boston. The postdoc has a maximum duration of 2 years & is to work on the NSF project entitled 'ABI Development: Computational infrastructure for phylogenetic analysis in the R

Re: [R-sig-phylo] A test for valid phylo object (ape package) for package developers

2019-11-05 Thread Liam Revell
Hi Elizabeth. This does not do exactly what you want, but it is possible to use capture.output() to grab the printout of checkValidPhylo() and then grep() to see if it contains instances of "MODERATE" or "FATAL" errors. The following simple function does that. It returns 0 if neither MODERATE

Re: [R-sig-phylo] plotting time-calibrated trees

2019-09-30 Thread Liam Revell
Dear Saleh. You can do this using my package phytools or using ape::axisPhylo. I have an example using both options on my blog: http://blog.phytools.org/2018/02/another-technique-for-including-time.html. All the best, Liam Liam J. Revell Associate Professor, University of Massachusetts Boston

Re: [R-sig-phylo] phytools - fitMk producing unexpected optimizations under custom models

2019-09-18 Thread Liam Revell
Dear Ivan. phytools::fitMk does not do ancestral state reconstruction. What function did you use to obtain the estimates at internal nodes? If you want to constrain the states at particular nodes during ancestral state reconstruction this can be done in a fairly straightforward way. Here is a

Re: [R-sig-phylo] model averaging using brownie.lite

2019-09-05 Thread Liam Revell
transforming AIC into AICc? the > number of tips on the tree? > > Karla > > On Thu, Sep 5, 2019 at 10:27 AM Liam Revell wrote: > >> Dear Karla. >> >> You could try & create your own logLik method for the object class >> "brownie.lite"

Re: [R-sig-phylo] model averaging using brownie.lite

2019-09-05 Thread Liam Revell
Dear Karla. You could try & create your own logLik method for the object class "brownie.lite" as follows: ## method logLik.brownie.lite<-function(object,...){ lik<-setNames( c(object$logL1,object$logL.multiple), c("single-rate","multi-rate"))

[R-sig-phylo] Nantucket Phylogenetics DevelopeR Workshop

2019-08-08 Thread Liam Revell
. On the first 2.5 days of the workshop, course leaders Drs. April Wright, Josef Uyeda, Klaus Schliep, Claudia Solís-Lemus, & Liam Revell will provide an introduction to the primary data structures and methods of common phylogenetic R packages, the basics of computational algori

Re: [R-sig-phylo] model averaging for discrete character evolution

2019-08-07 Thread Liam Revell
Hi Jake. [Edit: I see just now that Brian has also responded to this inquiry. I have no doubt that his message is more insightful than mine - but I'll nonetheless send what I was writing anyway just in case it contributes anything useful to the discussion.] If you're simply interested in the

Re: [R-sig-phylo] Recursive addition along a tree

2019-08-04 Thread Liam Revell
Dear Mario. From your drawing it looks like each node & tip has a value, and then you update these values by reassigning each node a value equal to the sum of its value and that of all its descendants. Is this correct? If so, then assuming you have ordered your quantities in x such that they

Re: [R-sig-phylo] cophylo

2019-06-17 Thread Liam Revell
I also just pushed an update to phytools that now permits exact duplicate tip labels in a cophylo plot. You can get this update by running: library(devtools) install_github("liamrevell/phytools") with devtools installed. More details about the update can be seen on my blog:

Re: [R-sig-phylo] cophylo

2019-06-17 Thread Liam Revell
Yes. Just to echo Juan, there should be no problem in your case if you specify the desired matching in your association table, provided to cophylo via the argument assoc. In your case, for instance, you may have M._loti_1 and M._loti_2 in one tree, but just M._loti in the other, in which case

Re: [R-sig-phylo] using color function in phylomorphospace

2019-03-09 Thread Liam Revell
l=1:36) > Cécile > >> On Mar 8, 2019, at 8:42 PM, Liam Revell > <mailto:liam.rev...@umb.edu>> wrote: >> >> Dear Amanda. >> >> I'm a little confused by your code. If you want to use >> control=list(col.edge) you need to set col.edge to a ve

Re: [R-sig-phylo] using color function in phylomorphospace

2019-03-08 Thread Liam Revell
Dear Amanda. I'm a little confused by your code. If you want to use control=list(col.edge) you need to set col.edge to a vector of colors, but in your example col.edge is a numeric vector from 1 to 36. For your particular case, there is actually a much simpler way to set all the edges in a

Re: [R-sig-phylo] patristic distance doubts and meanings

2019-02-04 Thread Liam Revell
Dear Bruno. > To estimate species divergence time between pair of species, I'm using > the phylogeny in Smith & Brown 2018 which is rooted and contain > 353 185 seed plant species along with 85 679 nodes, branch lengths > are dated. I'm applying the R function phytools::fastDist for a list >

Re: [R-sig-phylo] Mesquite->ape node numbers and/or parsimony ancestral reconstruction

2019-01-31 Thread Liam Revell
ld the same as SCP would (in Mesquite at > least) for this kind of data? > > Best wishes > > Roland > > On Thu, Jan 31, 2019 at 8:03 PM Liam Revell wrote: > >> Dear Roland. >> >> I didn't really solve your problem of reading a Mesquite result into R;

Re: [R-sig-phylo] Mesquite->ape node numbers and/or parsimony ancestral reconstruction

2019-01-31 Thread Liam Revell
Dear Roland. I didn't really solve your problem of reading a Mesquite result into R; however I just posted about the relationship between unweighted & weighted square-change-parsimony & ML ancestral character estimation on my blog:

Re: [R-sig-phylo] Problem date consensus phylogeny

2019-01-25 Thread Liam Revell
Hi Alina. Since you mentioned some functions of phytools, I thought it might be helpful to describe what each function is actually doing: 1) The function ls.consensus computes a least-squares (LS) consensus tree. This is the LS tree on the average patristic distance matrix of the input trees,

Re: [R-sig-phylo] make.simmap -- strange posterior probability for root using ARD model?

2018-12-21 Thread Liam Revell
Dear Jesse. The most logical explanation is that in the fitted ARD model the rate of transition away from the rare state is >> than the fitted transition rates to it (or even that the ML value of these rates is zero). Conditioning on this fitted model make it highly probably that the root is

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

Re: [R-sig-phylo] Add terminal branches to tree

2017-06-19 Thread Liam Revell
The function add.species.to.genus may do what you want. It adds a single species to the group defined by the MRCA of members of a genus, according to multiple criteria (randomly and so on). It can add only one species at a time, so you will need to write a for loop or something to iterate over

Re: [R-sig-phylo] need finite 'xlim' values error with plot.phylo

2017-06-13 Thread Liam Revell
This is a bug that is related to how the function optimizes xlim to permit space for the tip labels. By not showing tip labels, there is no optimization, and thus no error. This doesn�t seem to create an issue for plotTree in phytools, which has many of the same options (and some additional

Re: [R-sig-phylo] Truncate x-axis in phydataplot barplots

2016-10-17 Thread Liam Revell
Hi Marian. You should be able to do it with the phytools function plotTree.barplot using the argument args.barplot, supplied as a list containing the arguments you want to pass to barplot. Not sure if this is on CRAN yet so you might have to install from GitHub. Let me know if you need

Re: [R-sig-phylo] Unable to reorder any phylo object with reorder.phylo

2016-08-11 Thread Liam Revell
Hi Zach. What is your objective here? reorder.phylo reorders the edges in the �phylo� object, but does not usually change the order in which the tips are plotted. For that, you should look at ape::rotate or phytools::rotateNodes (I believe), ape::ladderize, or the argument tips in

Re: [R-sig-phylo] multipage pdf of a huge tree

2015-03-04 Thread Liam Revell
Hi Jonas. One option is to use the function splitPlotTree in phytools. By default it plots the split tree in two columns, but there is an option to split it into two windows. Then each plotted tree could be saved as a PDF. I will also investigate this to see if there is a better possibility.