Re: [R-sig-phylo] Count the number of character/state changes in a tree

2015-03-03 Thread Liam J. Revell
at tips internal nodes it will not account for multiple changes along a single edge. Where do your states at internal nodes come from? All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev

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

2015-03-05 Thread Liam J. Revell
plotters such as plot.phylo or plotSimmap. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 3/5/2015 5:19 AM, Jonas Eberle wrote

Re: [R-sig-phylo] phytools - evaluating significance of pgls.Ives

2015-03-01 Thread Liam J. Revell
not aware of one in R at this time. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 3/1/2015 10:31 PM, Andrea Berardi wrote: Hi all, I'm just

Re: [R-sig-phylo] Standardized regression coefficients pgls

2015-02-24 Thread Liam J. Revell
that to analyze them obtain 'standardized coefficients' you will still need to analyze them phylogenetically, such as: library(nlme) w-diag(obj$C) fit-gls(y~x,data=as.data.frame(Xt),correlation=corBrownian(1,tree), weights=varFixed(~w)) Or something like that. All the best, Liam Liam J. Revell

Re: [R-sig-phylo] PGLS transformations

2015-04-13 Thread Liam J. Revell
contrasts. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 4/13/2015 1:13 PM, Sergio Ferreira Cardoso wrote: Hello, Thank you both for the help

Re: [R-sig-phylo] - input error with make.simmap and Question about ancestral reconstruction

2015-04-24 Thread Liam J. Revell
data are in a matrix. You can do something like x-X[,1] or (as may be the case for your data) seems names are in column 1 of your matrix, x-setNames(X[,2],X[,1]). All the best, Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] Plot phylogeny with increasing or decreasing node ages?

2015-04-26 Thread Liam J. Revell
Hi Nick. I'm not sure if this is what you mean, but have you tried the function ladderize from the ape package? All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http

Re: [R-sig-phylo] ancestor vs. change plots

2015-04-24 Thread Liam J. Revell
. Note that as this is an unpublished method it has not survived the rigors of peer review and thus should be treated cautiously. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu

Re: [R-sig-phylo] Question about graphical superimposition of stochastic character mappings

2015-05-06 Thread Liam J. Revell
the color scheme from the default. For multistate data, you can also use the function mergeMappedStates on the stochastically-mapped trees to merge states into (for instance) 'a' 'not-a'. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] PGLS transformations

2015-04-14 Thread Liam J. Revell
something wrong. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 4/13/2015 2:20 PM, Liam J. Revell wrote: I wouldn't go as far as to call

Re: [R-sig-phylo] Non normal PGLS results

2015-04-18 Thread Liam J. Revell
-of-residuals.html. Let us know if this is helpful. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 4/18/2015 1:15 PM, Sergio Ferreira Cardoso

Re: [R-sig-phylo] rotate nodes to match taxonomic order

2015-04-08 Thread Liam J. Revell
-closest-set-of-node-rotations.html. Let us know if this seems to do what you are attempting. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 4/8

[R-sig-phylo] Phylogenetic comparative methods in R course

2015-04-08 Thread Liam J. Revell
hesitate to email me if you have any questions. All the best, Liam -- Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org ___ R

Re: [R-sig-phylo] Converting species cladogram to dendrogram for heatmap with R

2015-06-04 Thread Liam J. Revell
Hi Anand. Have you tried eliminating spaces line breaks from your Newick string. When I do that I am able to read the tree with read.newick with no problem. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] Non Parametric PGLS

2015-06-18 Thread Liam J. Revell
, as 'size corrected' trait values); however you need to remember that they are still phylogenetically correlated. I hope that's clear enough. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] Phylogenetic size-correction

2015-06-15 Thread Liam J. Revell
Hi Sergio. You didn't specify what BM vf are, but if: BM-corBrownian(1,phy) ## and vf-diag(vcv(phy)) then, yes, this is correct. There is a function in phytools, phy.resid, that also does this calculation. All the best, Liam Liam J. Revell, Assistant Professor of Biology University

Re: [R-sig-phylo] Ancestral Reconstruction Using Internal Node Data

2015-06-16 Thread Liam J. Revell
will end up with an extra node! I am working on fixing this for rerootingMethod. Hopefully this is helpful. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http

Re: [R-sig-phylo] Missing States in ML Reconstruction of Discrete Ancestral States (phytools, ape)

2015-06-17 Thread Liam J. Revell
- but we will have observed only a subset of the four nucleotides at that site. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 6/17/2015 1:46

Re: [R-sig-phylo] Missing States in ML Reconstruction of Discrete Ancestral States (phytools, ape)

2015-06-17 Thread Liam J. Revell
for phytools. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 6/17/2015 3:06 PM, David Bapst wrote: Liam, Ah, I see, rerootingMethod(), unlike

Re: [R-sig-phylo] Missing States in ML Reconstruction of Discrete Ancestral States (phytools, ape)

2015-06-17 Thread Liam J. Revell
(other than zero). With make.simmap it is possible to fix Q at some arbitrary (valid) value. It will even give you the likelihood for that value, if I remember correctly. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] Non Parametric PGLS

2015-06-17 Thread Liam J. Revell
equally to phylogenetic regression. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 6/17/2015 12:40 PM, Sergio Ferreira Cardoso wrote: Hello

Re: [R-sig-phylo] Bug in reorder.phylo() (related to cleaning phylo objects)

2015-06-15 Thread Liam J. Revell
Hi David. I'm not sure about this, but changing to: tree-read.newick(text=write.tree(tree)) tree-collapse.singles(tree) may work. I believe that write.tree will write trees with singletons read.newick in phytools should be able to read them. All the best, Liam Liam J. Revell, Assistant

Re: [R-sig-phylo] an error running make.simmap

2015-07-03 Thread Liam J. Revell
, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 7/3/2015 8:19 AM, Rubén Torices Blanco wrote: Dear list members, I am trying to explore evolutionary

Re: [R-sig-phylo] doubt

2015-07-04 Thread Liam J. Revell
. If this is not the case you could try the following, in which node is the node number you want to attach the tip to: depth-max(nodeHeights(tree))-nodeheight(tree,node) tree-bind.tip(tree,tip.label,where=node,edge.length=depth) Let us know if this works. All the best, Lia Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] Problem with the map.overlap function (phytools)

2015-05-19 Thread Liam J. Revell
if this is helpful. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 5/19/2015 2:27 PM, Marina Strelin wrote: Hi! I'm trying to use the map.overlap

Re: [R-sig-phylo] Difficulties with Rooting

2015-08-21 Thread Liam J. Revell
in phytools or the faster midpoint in phangorn, which do midpoint rooting and will usually result in a bifurcation at the root of the tree. I hope this is of help. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] simulating rate shifts

2015-08-01 Thread Liam J. Revell
or at some point in the past, then this is the way to do that. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 8/1/2015 4:12 AM, Eric wrote: Hi

Re: [R-sig-phylo] simulating rate shifts

2015-07-31 Thread Liam J. Revell
. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 7/31/2015 10:57 AM, Emmanuel Paradis wrote: Hi Eric, See the function rTraitCont in ape

Re: [R-sig-phylo] boxplots next to phylogeny

2015-07-14 Thread Liam J. Revell
me know if this is helpful. http://blog.phytools.org/2015/07/plotting-tree-with-adjacent-boxplot.html All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http

Re: [R-sig-phylo] boxplots next to phylogeny

2015-07-15 Thread Liam J. Revell
the issue. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 7/15/2015 8:02 AM, Martin Bulla wrote: Dear Liam, Thank you very much for your helpful

Re: [R-sig-phylo] R Sig Phylo Question Large Phylogenies

2015-08-24 Thread Liam J. Revell
-string.html and it is about twice as fast as reading the tree into memory using read.tree, setting the node labels to NULL, and then re-writing the tree using write.tree. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] conflicting results in phylosig() using non-ultrametric and ultrametric tree

2015-10-29 Thread Liam J. Revell
it might be reasonable to be wary of this - and perhaps consider multiple methods of time-scaling (e.g., estimate using a relaxed clock method, etc.). All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email:

Re: [R-sig-phylo] add.species.to.genus with pure birth branch lengths

2015-10-27 Thread Liam J. Revell
on the terminal edge leading to each genus. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 10/27/2015 7:06 PM, Karla Shikev wrote: Dear

Re: [R-sig-phylo] Pagel's lambda for single trait

2015-10-22 Thread Liam J. Revell
Hi Xinxin. In the current CRAN version of geiger treeTransform is not a valid argument of fitDiscrete, instead you probably want to do: fit<-fitDiscrete(tree,trait,transform="lambda") Then the fitted value of lambda will be: fit$opt$lambda All the best, Liam Liam J. Reve

Re: [R-sig-phylo] Error with rerootingMethod in phytools

2015-11-12 Thread Liam J. Revell
All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 11/12/2015 11:36 PM, Graeme Lloyd wrote: Hello All, I was wondering if anyone can help.

Re: [R-sig-phylo] Error with rerootingMethod in phytools

2015-11-13 Thread Liam J. Revell
This now should be fixed on GitHub. Use: devtools::install_github("liamrevell/phytools") to install. Thanks for pointing this out & let me know if you encounter any issues. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Bo

Re: [R-sig-phylo] Adding random branches to tree recursively

2015-11-01 Thread Liam J. Revell
ols from GitHub which can be done using the devtools package: library(devtools) install_github("liamrevell/phytools") All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@

Re: [R-sig-phylo] Plotting ancestral states from estimation on multiphylo object

2015-11-04 Thread Liam J. Revell
Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 11/4/2015 5:44 AM, Arbuckle, Kevin wrote: Hi folks, I am currently trying to estimate ancestral states

Re: [R-sig-phylo] ASR tree with highlighted state-changes

2015-11-07 Thread Liam J. Revell
the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 11/6/2015 10:38 PM, Todd Oakley wrote: Richard, Check out time tree Stochastic Character Mapping

Re: [R-sig-phylo] Adding random branches to tree recursively

2015-10-30 Thread Liam J. Revell
sition= runif(n=1)*tree$edge.length[which(tree$edge[,2]==node)]) and iterate it over the tips you want to add. - Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytoo

Re: [R-sig-phylo] simulate Ne changes on a given phylogeny

2015-10-17 Thread Liam J. Revell
Hi Jacob. Can I add the somewhat boring & probably obvious comment that under the neutral theory of molecular evolution the substitution rate is independent of the effective population size? All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Bo

Re: [R-sig-phylo] adding scale bar to plots produced using cophyloplot

2015-10-10 Thread Liam J. Revell
/scale-bar-for-cophylo-plotting.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 10/6/2015 10:40 AM, Julie Lee-Yaw wrote: Dear all

Re: [R-sig-phylo] Question on pCCA (phyl.cca)

2015-10-13 Thread Liam J. Revell
n the effects of different variables - but this will be true for all statistical models. (Imagine the worst case in which variables A & B were perfectly collinear, well then it becomes theoretically impossible to determine if A is affecting Z or B, no matter what we do.) All the best, Li

Re: [R-sig-phylo] Export Ancestral Mapping From Mesquite into Figtree

2015-07-07 Thread Liam J. Revell
; or in circular (fan) phylogram format. There is also a function to add a legend (add.simmap.legend) and many other helper functions for this modified phylo object class (drop.tip.simmap, reorderSimmap, ladderize.simmap, etc.). All the best, Liam Liam J. Revell, Assistant Professor of Biology University

Re: [R-sig-phylo] Handling polytomies in PGLS

2015-07-10 Thread Liam J. Revell
of freedom would be required to account for this uncertainty. I hope these comments are helpful. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org

Re: [R-sig-phylo] simulating a labile trait

2015-07-10 Thread Liam J. Revell
Hi Glenn. The phytools function fastBM does Brownian motion simulation with bounds. It is pretty straightforward to figure out, but let me know if you have difficult with the details. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web

Re: [R-sig-phylo] Dollo character using ace/make.simmap

2015-09-14 Thread Liam J. Revell
n't given this too much thought), would be to put a strong prior on the root to be 0 and the transition 0->1 to be low (but non-zero) using stochastic mapping. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.

Re: [R-sig-phylo] Distance between two species from a

2015-10-03 Thread Liam J. Revell
-birth tree plus one). All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 10/3/2015 2:53 PM, Jonathan Greenberg wrote: Thanks! Liam, what would

Re: [R-sig-phylo] read tree labels without single quotes

2015-11-27 Thread Liam J. Revell
. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 11/27/2015 6:27 AM, Fabian Roger wrote: hej I read a tree which labels contain underscores

[R-sig-phylo] Bug report in ape::root

2015-12-12 Thread Liam J. Revell
tant-ape-function.html. Sorry about this Emmanuel! All the best, Liam -- Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools

Re: [R-sig-phylo] Package phytools load failed

2016-01-09 Thread Liam J. Revell
Thank you William. I was just about to comment the same. It is also possible that a fresh install from GitHub will correctly install Biostrings: library(devtools) install_github("liamrevell/phytools") All the best, Liam Liam J. Revell, Associate Professor of Biology

Re: [R-sig-phylo] plot trees distribution

2016-01-05 Thread Liam J. Revell
densiTree (I believe) in phangorn. If you want to use plotSimmap, you can just substitute plotSimmap and use a named vector of colors - however you should still generate the colors with transparency using rgb. Let us know if this is what you had in mind. All the best, Liam Liam J. Revell, As

Re: [R-sig-phylo] identify duplicate topologies and add corresponding values

2016-05-30 Thread Liam J. Revell
A","B"))) obj ## data frame aggregate(obj$number,by=list(obj$tree),sum) - Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 5/30/2016 12:13 PM, John

Re: [R-sig-phylo] cophyloplot-tree

2016-02-03 Thread Liam J. Revell
oks right. Changing your font size will also help & may be necessary to get a good visualization if the tip labels are really long. Let us know if that works. Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.r

Re: [R-sig-phylo] Mirrored trees with connecting lines between taxa that are not in matching locations

2016-02-03 Thread Liam J. Revell
Hi Chris. There is a function in phytools to do this. You can find out more by searching my blog: http://blog.phytools.org/search?q=cophylo Let me know if you have any questions. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http

[R-sig-phylo] Workshop on phylogenetic comparative methods

2016-02-23 Thread Liam J. Revell
. - -- Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org ___ R-sig-phylo mailing list - R-sig-phylo@r-project.org

Re: [R-sig-phylo] Testing for relationship between one categorical and one continuous variable in a phylogenetic framework.

2016-04-09 Thread Liam J. Revell
package. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 4/8/2016 5:50 PM, Joe Felsenstein wrote: Sean -- ... or, if you want to do it *really

Re: [R-sig-phylo] Phylogenetics and Newick Expressions in R

2016-04-01 Thread Liam J. Revell
wick in phytools, but not for read.tree - but this may not be true of earlier versions of ape. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On

Re: [R-sig-phylo] Error in trees[[i]] : subscript out of bounds

2016-05-23 Thread Liam J. Revell
It looks like the NEXUS file might be badly conformed. You could try: obj<-scan(file="TimetreeOfLife2015.tre",n=1,skip=2,what="character") tree<-read.tree(text=obj) That seemed to work for me. - Liam Liam J. Revell, Associate Professor of Biology University of Mass

Re: [R-sig-phylo] Using bind.tree on simmaps

2016-05-19 Thread Liam J. Revell
. Let us know if it seems to work (or, conversely, if you encounter issues). All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 5/18/2016 1:35

Re: [R-sig-phylo] Simulating data under precursor models

2016-05-11 Thread Liam J. Revell
state for all simulations, to pick it randomly from a vector of possible states, or to pick it randomly with probabilities specified by the user. Let me know if you have any questions. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web

Re: [R-sig-phylo] Simulating data under precursor models

2016-05-11 Thread Liam J. Revell
e states manually afterwards) All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 5/11/2016 1:37 PM, Michael Foisy wrote: P.S. -- I should add that I

Re: [R-sig-phylo] Associated r created graphs or external images with specific nodes on a phylogeny

2016-05-11 Thread Liam J. Revell
ample points(obj$xx[anc],obj$yy[anc],pch=19) This works for all different tree types in plot.phylo, plotTree, and plot.simmap, and also for plotted phylomorphospaces (using phytools::phylomorphospace), traitgrams (using phytools::phenogram), and contMap or densityMap still graphs. All the be

Re: [R-sig-phylo] [function like ratebystate, but for discrete characters?]

2016-05-03 Thread Liam J. Revell
l the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 5/3/2016 8:00 PM, Michael Foisy wrote: Hello, Quick question. I'm interested in whether th

[R-sig-phylo] Nantucket phylogeny developeR bootcamp

2016-07-11 Thread Liam J. Revell
-led by Drs. Klaus Schliep & April Wright, and supported by a grant from the National Science Foundation. All the best, -- Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu bl

Re: [R-sig-phylo] Adjust position of tip labels in plot.phylo

2016-06-29 Thread Liam J. Revell
t;0. We can also get the positions of the tips in the coordinates of our plotting device as follows: obj<-get("last_plot.phylo",envir=.PlotPhyloEnv) x<-obj$xx[1:obj$Ntip] y<-obj$yy[1:obj$Ntip] You can then use these coordinates to plot your labels any way you choose! -

Re: [R-sig-phylo] Measurement error for tips with only 1 measured specimen (OUwie)

2016-08-16 Thread Liam J. Revell
then be your input for OUwie or other model-fitting methods that take species mean standard errors. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 8

Re: [R-sig-phylo] Measurement error for tips with only 1 measured specimen (OUwie)

2016-08-16 Thread Liam J. Revell
sample sizes may have very poorly estimated variances. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 8/16/2016 10:46 PM, Santiago Claramunt

Re: [R-sig-phylo] mean phylogenetic distance for subsets of species from a tree

2017-02-02 Thread Liam J. Revell
) d<-sapply(assemblages,function(sp,D) mean(as.dist(D[sp,sp])),D=D) Does that work? All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 2/2/2017 3

[R-sig-phylo] PCM Workshop in Córdoba, Argentina, 1-4 August

2017-02-06 Thread Liam J. Revell
s o en español y deben ser enviadas por email a cord...@phytools.org antes del 1 abril de 2017. Preguntas adicionales pueden ser dirigidas al Dr. Liam Revell (liam.rev...@umb.edu) o a la Dra. Marina Strelin (marina.streli...@gmail.com). -- Liam J. Revell, Associate Professor of Biology Univ

Re: [R-sig-phylo] Painting clades in a fan tree with bars

2017-02-05 Thread Liam J. Revell
be able to use the method="plotSimmap" and colors arguments to color each subclade differently with plotTree.wBars. If you need a function to find the common ancestor (parent node) of each subclade, you can use the function ape::getMRCA or phytools::findMRCA. Let me know if you need more he

Re: [R-sig-phylo] How to incorporate duplicate species data

2017-01-27 Thread Liam J. Revell
take into account within-species sampling error, though this is not precisely what you have here (you do not know how uncertain each measure is, nor how uncertain are your estimates for other species), nor is this implemented in R. All the best, Liam Liam J. Revell, Associate Professor of Bio

Re: [R-sig-phylo] Measurement error for tips with only 1 measured specimen (OUwie)

2016-08-19 Thread Liam J. Revell
you can use this to double-check your code. You should be able to just take the value from this function, and divide it's square-root by a vector consisting of the square-roots of the sample sizes of each species to get your (pooled) species-specific standard errors. All the best, Liam Liam J. Revel

Re: [R-sig-phylo] Ultrametric tree not recognized

2016-08-16 Thread Liam J. Revell
.ultrametric(tree) ## should pass Let us know if this works. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 8/16/2016 6:41 AM, Martin Dohrmann w

Re: [R-sig-phylo] Plotting uncertainty in continuous ASR

2017-02-28 Thread Liam J. Revell
Hi Kevin. I was thinking the same thing & this is already in phytools on GitHub: http://blog.phytools.org/2017/02/function-to-add-error-bars-to-contmap.html. Thanks for the suggestion. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston

Re: [R-sig-phylo] Plotting uncertainty in continuous ASR

2017-02-27 Thread Liam J. Revell
Hi Kevin. I now show one way to do this here: http://blog.phytools.org/2017/02/more-on-adding-error-bars-to-contmap.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu

Re: [R-sig-phylo] Plotting uncertainty in continuous ASR

2017-02-27 Thread Liam J. Revell
Hi Dave. Yes. It is not perfect, but I have shown how to do this here: http://blog.phytools.org/2017/02/more-on-adding-error-bars-to-contmap.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell

Re: [R-sig-phylo] Query about Phylogenetics in R

2016-08-31 Thread Liam J. Revell
ot;,fsize=0.8) dev.off() All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 8/31/2016 8:03 AM, Brian O'Meara wrote: A similar solution is to c

Re: [R-sig-phylo] fitDiscrete question - super large likelihood and AIC values

2016-09-11 Thread Liam J. Revell
Hi Lei. It looks like you have something peculiar going on with your tree or data. If you share it then I'd be happy to try to investigate further; however without the data it will be hard to figure this one out. All the best, Liam Liam J. Revell, Associate Professor of Biology University

Re: [R-sig-phylo] Anyone knows how to concatenate aligned genes sequences so as to create whole genome alignments?

2016-09-12 Thread Liam J. Revell
ents into a single matrix. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 9/12/2016 6:20 AM, Joseph W. Brown wrote: We have a non-R tool that ca

Re: [R-sig-phylo] fitDiscrete question - super large likelihood and AIC values

2016-09-10 Thread Liam J. Revell
: http://blog.phytools.org/2015/09/the-difference-between-different.html. You can also fit an Mk model using diversitree or phangorn. (Look for details on my blog.) All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] Collapse a clade by tip labels while maintaining phylogenetic position

2016-09-12 Thread Liam J. Revell
I'm sure this is possible, but I really don't understand the question. Maybe you could draw what you have in mind on a piece of paper and post a picture of the paper All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] Collapse a clade by tip labels while maintaining phylogenetic position

2016-09-15 Thread Liam J. Revell
I'm sure Florian's solution works, though I haven't tried it. Here is another one that may work that I just posted to my blog: http://blog.phytools.org/2016/09/collapsing-clades-of-foo-huh.html All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts

Re: [R-sig-phylo] plot.cophylo: how to change the colour of host-parasite associations

2016-09-12 Thread Liam J. Revell
y(devtools) install_github("liamrevell/phytools") library(phytools) All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 9/12/2016 9

Re: [R-sig-phylo] phylogenetic signal-Blomberg's K

2016-09-26 Thread Liam J. Revell
Regarding question (1) here is a solution that I posted earlier: http://blog.phytools.org/2014/12/testing-hypothesis-that-phylogenetic.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] evolve discrete characters on non-ultrametric tree?

2016-09-26 Thread Liam J. Revell
Hi John. There is no problem simulating discrete characters on non-ultrametric trees. You can use sim.char in geiger, sim.history in phytools, or a number of other functions, in fact. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web

Re: [R-sig-phylo] simmap correlation statistics in R?

2016-09-17 Thread Liam J. Revell
around to it. I will try but you may be able to figure it out yourself using Map.Overlap. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 9

Re: [R-sig-phylo] Use of a Phylocom tree for PGLS

2016-09-17 Thread Liam J. Revell
I also should have mentioned that phylogenetic signal is expected to be more sensitive to error in the phylogeny; however this error is in one direction in that errors will tend to cause phylogenetic signal to be underestimated. Liam J. Revell, Associate Professor of Biology University

Re: [R-sig-phylo] Use of a Phylocom tree for PGLS

2016-09-17 Thread Liam J. Revell
. Biol. 60 (3): 245-260. http://dx.doi.org/10.1093/sysbio/syq098 Many other forms of comparative analysis appear to be much more sensitive to error in the phylogeny, or have not yet been studied. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts

Re: [R-sig-phylo] mulRF distance

2016-09-17 Thread Liam J. Revell
: http://blog.phytools.org/search?q=averageTree. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org On 9/17/2016 12:02 PM, Ondřej Mikula wrote

Re: [R-sig-phylo] Draw multiple ASR pies on nodes

2016-10-27 Thread Liam J. Revell
, but it might look something like this: plotTree(tree) nodelabels(pie=p1,adj=c(0.5,1),cex=0.5) nodelabels(pie=p2,adj=c(0.5,0.5),cex=0.5) nodelabels(pie=p3,adj=c(0.5,0),cex=0.5) All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http

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

2016-10-17 Thread Liam J. Revell
Just to follow up on this, here is an example using plotTree.barplot with xlim set using args.barplot: http://blog.phytools.org/2016/07/more-on-showing-barplot-next-to-plotted.html. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] Adding a custom legend underneath a phylo plot with coloured tips

2016-11-18 Thread Liam J. Revell
., http://blog.phytools.org/2015/06/customizing-your-contmap-style.html, also vertical: http://blog.phytools.org/2016/08/vertical-legend-in-contmap-style-plots.html). All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] Adding a custom legend underneath a phylo plot with coloured tips

2016-10-27 Thread Liam J. Revell
be able to find worked examples on my blog: http://blog.phytools.org/search?q=add.simmap.legend. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http://blog.phytools.org

Re: [R-sig-phylo] Counting independent evolutionary origin of trait evolution

2016-10-31 Thread Liam J. Revell
plotting the *entire* posterior sample of changes onto the trees: http://blog.phytools.org/2016/10/mapping-sampled-changes-on-tree-from.html. You could also do the latter for any particular stochastic map history. All the best, Liam Liam J. Revell, Associate Professor of Biology University

Re: [R-sig-phylo] Newick tree merging at the wrong level?

2016-11-02 Thread Liam J. Revell
Excellent. I have added those function to phytools on GitHub, so they can be installed using devtools as follows: library(devtools) install_github("liamrevell/phytools") Glad it was of help. - Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston

Re: [R-sig-phylo] Newick tree merging at the wrong level?

2016-11-02 Thread Liam J. Revell
://blog.phytools.org/2016/11/modified-version-of-grafens-branch.html. Let me know if this is helpful. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu blog: http

Re: [R-sig-phylo] Newick tree merging at the wrong level?

2016-11-01 Thread Liam J. Revell
d>Ntip(tree)) } nn<-1:(Ntip(tree)+tree$Nnode) h<-sapply(nn,ndn,tree=tree) edge.length<-vector() for(i in 1:nrow(tree$edge)) edge.length[i]<-diff(h[tree$edge[i,2:1]]) tree$edge.length<-edge.length plot(tree) All the best, Liam Liam J. Revell, Associate Professor of Biology University o

Re: [R-sig-phylo] Plotting character data next to tree in R

2017-01-13 Thread Liam J. Revell
Hi Katharine. You can try to search my blog for examples of the function add.simmap.legend. That might do what you want. All the best, Liam Liam J. Revell, Associate Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email: liam.rev...@umb.edu

Re: [R-sig-phylo] get branch lengths from distances to root

2016-11-30 Thread Liam J. Revell
ge[i,1]] If it the nodes are labeled in a different fashion, then it would be slightly more complicated (for instance, involving the identifying MRCAs or matching nodes), but similar. How are your node & leaf heights organized? All the best, Liam Liam J. Revell, Associate Professor of Biology

<    1   2   3   4   5   >