Re: [R-sig-phylo] randomizing Pagel's lambda

2013-04-12 Thread Liam J. Revell
,method=lambda)$lambda # obs. lambda # lambda from randomized tips ff-function(x){ x$tip.label-sample(x$tip.label); x } ll-replicate(nn-1,phylosig(ff(tree),x,method=lambda)$lambda) p-mean(c(lambda,ll)=lambda) # p.value from randomization All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] Estimating ancestral states of a trait under selection

2013-04-19 Thread Liam J. Revell
to put priors on everything (or nothing, in which a pretty uninformative prior is used). If you decide this is what you want to do have difficulty figuring it out, please let me know. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] Strahler numbers for calculating branching complexity

2013-04-19 Thread Liam J. Revell
does this - I posted it to my blog here: http://blog.phytools.org/2013/04/computing-strahler-numbers-for-nodes-on.html. Check it out and let us know if this does what it is supposed to. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web

Re: [R-sig-phylo] Strahler numbers for calculating branching complexity

2013-04-20 Thread Liam J. Revell
Glad to hear it Alastair. I posted an answer to your second question (how to extract the set of most inclusive clades with Strahler number i) here: http://blog.phytools.org/2013/04/extracting-set-of-most-inclusive-clades.html. All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] Find common ancestor of multiple taxa

2013-05-09 Thread Liam J. Revell
This is exactly what findMRCA in phytools does, but I wrote it a while ago so I'm not sure how fast it is - 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] Extracting Independent Subclades

2013-05-21 Thread Liam J. Revell
Glenn - if this function does what you were hoping for, then I have also posted a version that works for non-binary trees. For more information, check out my blog: http://blog.phytools.org/2013/05/version-of-getcladesofsize-that-also.html. All the best, Liam Liam J. Revell, Assistant

Re: [R-sig-phylo] Node Pie Charts Plotting in R

2013-05-30 Thread Liam J. Revell
-on-ancestral-state.html, and http://blog.phytools.org/2013/03/marginal-ancestral-state-reconstruction.html). All the best, 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] Running chronopl on a multiphylo object

2013-06-04 Thread Liam J. Revell
Hi Alejandro. Do: newmulti-lapply(unclass(trees),chronopl,lambda=0.5) class(newmulti)-multiPhylo Good luck. - 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] using ace (ape) with missing data

2013-06-11 Thread Liam J. Revell
). Please make sure you have the latest version of phytools (at least the latest CRAN version, if not the most recent version here: http://www.phytools.org/nonstatic/) and let me know if you have any questions. All the best, Liam Liam J. Revell, Assistant Professor of Biology University

Re: [R-sig-phylo] Difficulty getting posterior probabilities into ape?

2013-06-19 Thread Liam J. Revell
I meant to say not being stored in tree$node.label - but what's the difference. The instructions still work. 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] Fwd: atomic vector for write.nexus

2013-06-27 Thread Liam J. Revell
(otherwise they are treated as additional trees to write). Let us know if specifying the argument file by name fixes your problem. - 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] assign numbers to nodes

2013-07-05 Thread Liam J. Revell
-tree$Nnode:1 To check, try: library(phytools) tree$node.label-tree$Nnode:1 plotTree(tree,setEnv=TRUE) nodelabels(tree$node.label) I think this is what you mean. - Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell

Re: [R-sig-phylo] question about measurement error in phylogenetic signal

2013-07-07 Thread Liam J. Revell
of the SE. If you are using an arcsine transformation, as is common for proportion data, you need to be aware that your standard errors are on the original scale! (I don't know the formula for standard errors on the transformed scale.) - Liam Liam J. Revell, Assistant Professor of Biology

Re: [R-sig-phylo] Problem with phylogenetic CCA

2013-07-17 Thread Liam J. Revell
number to real when it's imaginary part disappears. I'll try and fix this final issue, but I can't do much about (1) (2). Thanks for the report! - 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] Problem with phylogenetic CCA

2013-07-17 Thread Liam J. Revell
Hi Agus. To follow up on (3), I just posted a version of new version of the function that strips the imaginary part of the canonical correlations if it is zero. (Details here: http://blog.phytools.org/2013/07/complex-numbers-in-r-and-new-version-of.html). All the best, Liam Liam J. Revell

Re: [R-sig-phylo] NEWBIE - ANOVA and PGLS for categorical data

2013-07-23 Thread Liam J. Revell
-of-residuals.html for more information. 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/23/2013 12:59 PM, Anna Rice wrote: Hello, I'm

Re: [R-sig-phylo] follow-up to tip coords question

2013-07-25 Thread Liam J. Revell
data coords-cbind(lat,lon) rownames(coords)-species phylo.to.map(tree,coords) I've also attached a example plot with a simulated tree your lat/long data as a .png. My function does not use plot.phylo may need to be adjusted to allow for longer tip labels. Cool problem! Liam Liam J. Revell

Re: [R-sig-phylo] findMRCA of phytools not working

2013-07-30 Thread Liam J. Revell
be. 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/30/2013 9:47 AM, Juan Antonio Balbuena wrote: Hello I am using the function findMRCA

Re: [R-sig-phylo] Question on ace ML reconstruction of discrete binary character

2013-07-30 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/30/2013 6:10 AM, Tom Wenseleers wrote: Dear all, Many thanks for all your advice so far. I

Re: [R-sig-phylo] zero length terminal branches in pgls

2013-07-31 Thread Liam J. Revell
approach is best or if you have other options other than collapsing or throwing out data. 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

Re: [R-sig-phylo] zero length terminal branches in pgls

2013-07-31 Thread Liam J. Revell
Joe is of course correct. However, if the tree is ultrametric than would it not be the case that one zero length terminal edge implies that there is zero branch length separating at least two terminal species? (I believe this is right.) All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] rooting multiple trees

2013-08-06 Thread Liam J. Revell
=outgroupname,resolve.root=TRUE) Let us know if that does not work. 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/6/2013 2:03 PM, SILVIA CALVO

Re: [R-sig-phylo] Drop terminal branches

2013-08-13 Thread Liam J. Revell
nodes lead to only one tip. Feedback welcome. 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/13/2013 10:43 AM, Nicholas Crouch wrote

Re: [R-sig-phylo] Rooting and rotating in ape

2013-08-19 Thread Liam J. Revell
' now has numbers as labels write.tree(temp,file=filename) 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/19/2013 10:43 PM, Naxerova, Kamila

Re: [R-sig-phylo] brownian motion, residuals and PCA

2013-08-21 Thread Liam J. Revell
to zero. So any judgement on how good or bad it will be to assume BM depends on the fitted parameter values for alpha. 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] branch lengths with taxonomic data

2013-08-22 Thread Liam J. Revell
as.phylo.formula data(carnivora) tree-as.phylo.formula(as.phylo(~SuperFamily/Family/Genus/Species, data=carnivora) plotTree(tree) Let us know if this solves your 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] branch lengths with taxonomic data

2013-08-22 Thread Liam J. Revell
Sorry - this is the correct source file. (I just neglected as.phylo.formula- from the start of the source file.) - 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] Substitute for functions on the laser package

2013-09-03 Thread Liam J. Revell
to install from source, then respond to the list I'm sure someone will help out post a package binary for you. - 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] Removing phylogenetic signal for gls model

2013-09-06 Thread Liam J. Revell
phylogenetic signal using one or multiple methods. For instance, you could use my function phylosig in the phytools 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

Re: [R-sig-phylo] How to build a mirror tree?

2013-09-09 Thread Liam J. Revell
. If you decide to use phytools, you should probably first install the latest (non-CRAN) version (http://www.phytools.org/nonstatic or http://www.phytools.org/nonstatic/bin for binaries). Let us know if this helps you get started. - Liam Liam J. Revell, Assistant Professor of Biology

Re: [R-sig-phylo] PGLS error

2013-09-16 Thread Liam J. Revell
a specific example, though, this is hard to assess.) - 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 9/15/2013 10:21 PM, Ties Coomber wrote: Hello, I have

Re: [R-sig-phylo] q matrix?

2013-09-18 Thread Liam J. Revell
) diag(Q)--rowSums(Q,na.rm=TRUE) - 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 9/18/2013 1:08 PM, Rafael Rubio de Casas wrote: Dear all

Re: [R-sig-phylo] trouble estimating lambda with fitDiscrete

2013-09-30 Thread Liam J. Revell
the lambda model in geiger =1.99 if you think this is a good idea - but the argument/value has changed from treeTransform=lambda to transform=lambda. Good luck. - Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] ATTN Liam Revell: please contact me off-list

2013-10-03 Thread Liam J. Revell
messages (and I appreciate the irony of doing so as I recommend that no one else should - my apologies to all for 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

Re: [R-sig-phylo] coalescent trees

2013-10-22 Thread Liam J. Revell
: http://www.phytools.org/mpma/phybase/. I also wrote a tutorial (again, for my class) available here: http://www.phytools.org/mpma/Exercise_8.1/. Perhaps this will be of some help. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

[R-sig-phylo] New phytools version on CRAN

2013-10-25 Thread Liam J. Revell
if said problems did not exist in prior releases!). 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] Adding a list of species in a phylogenetic tree

2013-10-31 Thread Liam J. Revell
to automate this if you have to iterate across many samples. Let me know if you need help with 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

Re: [R-sig-phylo] ancestral estimation under OU model

2013-11-08 Thread Liam J. Revell
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 11/8/2013 6:52 PM, Oscar Inostroza wrote: Hi All Currently ancestral state reconstruction for continuous

Re: [R-sig-phylo] match two tree edges

2013-11-11 Thread Liam J. Revell
something like this: ii-sapply(B$edge[,2],function(x,y) which(y==x),y=A$edge[,2]) plot(B,no.margin=TRUE) edgelabels(A$edge.length[ii]) If your node numbers *do not* match, then this gets a little more complicated - but the same general logic can be used. All the best, Liam Liam J. Revell

Re: [R-sig-phylo] match two tree edges

2013-11-11 Thread Liam J. Revell
(ee) 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 11/11/2013 7:06 PM, Jingchun Li wrote: Thanks Liam. Unfortunately for now, the second

Re: [R-sig-phylo] combined CI across trees

2013-11-27 Thread Liam J. Revell
(and will definitely be more conservative) than treating the tree as 'known', if that is the alternative. 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] Ancestral state reconstruction

2013-12-06 Thread Liam J. Revell
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 12/6/2013 9:17 AM, Szymek Drobniak wrote: Hello all, I'm trying to reconstruct ancestral states in a 3-state trait

Re: [R-sig-phylo] Ancestral state reconstruction

2013-12-06 Thread Liam J. Revell
approaches should give the same probabilities at internal nodes. However, a word of caution. With such a very large tree, it's possible that different implementations of the same method may give different results simply for having failed to converge to the MLEs. All the best, Liam Liam J. Revell

Re: [R-sig-phylo] plotting support value

2013-12-16 Thread Liam J. Revell
) it will even search for the path to the executable for you. You can get Rphylip here: http://www.phytools.org/Rphylip/ it is also on gitHub (http://github.com/liamrevell/Rphylip). All the best, Liam -- Liam J. Revell web: http://faculty.umb.edu/liam.revell/ blog: http://blog.phytools.org On 12/16/2013

Re: [R-sig-phylo] R help generating a heat map

2013-12-23 Thread Liam J. Revell
the set of all bi- and multifurcating topologies. It's not immediately obvious how you could do that, but I'll think about it. 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

Re: [R-sig-phylo] The Curious Behavior of is.binary.tree

2014-01-15 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 1/15/2014 3:34 PM, David Bapst wrote: Hi Emmanuel and the rest of the list, In some code, I use

Re: [R-sig-phylo] Probably silly question about maps

2014-01-18 Thread Liam J. Revell
You might try investigating text to add labels to the plot and and legend for a legend. Good luck! - 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 1/13

Re: [R-sig-phylo] Meaning of output from phytools findMRCA ?

2014-01-28 Thread Liam J. Revell
problem, you'll need to send me your data code. 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 1/28/2014 5:46 AM, Gabriel Yedid wrote: Hi all

Re: [R-sig-phylo] Midpoint rooting routine?

2014-01-30 Thread Liam J. Revell
(I haven't tested that). If it works, please let me know I will add to 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 1/30/2014 1

Re: [R-sig-phylo] Easiest way to get the stem age of a clade?

2014-02-12 Thread Liam J. Revell
in an ultrametric tree, just do: H-max(H)-H and then repeat the same. 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 2/13/2014 12:16 AM, Simon Greenhill

Re: [R-sig-phylo] utilise more data by making polytomies

2014-02-25 Thread Liam J. Revell
Something similar to this is in phytools (http://blog.phytools.org/2013/11/new-function-to-add-species-to-genus-in.html), though not yet on CRAN. Let me know if this is what you're thinking of. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston

[R-sig-phylo] U. los Andes Bogota phylogenetics in R workshop

2014-03-03 Thread Liam J. Revell
, 2014. Las aplicaciones pueden ser escritas en inglés o español; sin embargo todos los estudiantes deben tener un nivel básico de inglés científico. Preguntas pueden ser dirigidas a liam.rev...@umb.edu. -- Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web

[R-sig-phylo] TAship for Bogota phylogenetics course

2014-03-04 Thread Liam J. Revell
the opportunity to travel all expenses paid to Bogotá with our group will be sufficient incentive to consider applying for this position. I have never been, but I'm told that Bogotá is a terrific city to visit, and I think the course will be a lot of fun. All the best, Liam -- Liam J. Revell, Assistant

Re: [R-sig-phylo] Cannot read nexus tree from iTOL in R with read.nexus or read.tree

2014-03-19 Thread Liam J. Revell
Oops. I forgot one step - collapsing singleton nodes using collapse.singles in ape: library(phytools) ## text is your tree string tree-read.newick(text=text) tree-collapse.singles(tree) write.tree(phy=tree,file=Gudrun.tre) write.nexus(tree,file=Gudrun.nex) All the best, Liam Liam J. Revell

Re: [R-sig-phylo] OU rescale of a tree

2014-04-08 Thread Liam J. Revell
a tree and vector (in which the vector names attribute corresponds to the tip labels of the tree) as input. - 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] pairwise comparisons of 100s of gene tree topologies

2014-04-14 Thread Liam J. Revell
) to see how to do that, or you could refer to my very basic tutorial here: http://www.phytools.org/mpma/Exercise_7.1/ Good luck. 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] generate liability/threshold plot from ancThresh

2014-05-02 Thread Liam J. Revell
, use stats function density with the column of interest from par as input. Is that helpful? I hope a little bit. 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

[R-sig-phylo] Postdoc in phylogenetic comparative methods

2014-05-06 Thread Liam J. Revell
be sent by May 29, 2014 for full consideration. UMass Boston provides equal employment opportunities (EEO) to all employees and applicants for employment. -- Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu/liam.revell/ email

Re: [R-sig-phylo] Phylogenetic signal, variation in rates and sample size

2014-05-06 Thread Liam J. Revell
will nearly always be smaller than the rate on the original tree. - 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/5/2014 6:15 AM, imran khaliq wrote: Dear

Re: [R-sig-phylo] plot bars across tips of a circular phylogeny

2014-05-14 Thread Liam J. Revell
be straightforward to modify this so that tip labels are included, or so that a stochastic map (instead of a standard tree) was plotted. Let me know if this does what you want it to, or if you have any problems. All the best, Liam Liam J. Revell, Assistant Professor of Biology University

Re: [R-sig-phylo] edge colors in ape's plot.phylo

2014-05-15 Thread Liam J. Revell
Dear Rosemary. This appears to be a problem of older ape versions. If you update to the latest version of ape (3-1.1) I believe that you will find this is fixed. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http://faculty.umb.edu

Re: [R-sig-phylo] plot trees after different branch transformations

2014-05-16 Thread Liam J. Revell
It looks like transform.phylo has been deprecated. Use rescale.phylo. 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/16/2014 2:20 PM

Re: [R-sig-phylo] Distances from nods to the root.

2014-05-20 Thread Liam J. Revell
(tree$tip.label)) For all nodes including tip nodes you can modify to: library(phytools) h-setNames(sapply(1:(tree$Nnode+length(tree$tip.label)),nodeheight, tree=tree),c(tree$tip.label,1:tree$Nnode+ length(tree$tip.label))) All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] trait simulation function

2014-05-28 Thread Liam J. Revell
Hi Gabriela. You can use the function sim.corrs in the phytools package. For more details see the help page here: http://www.phytools.org/static.help/sim.corrs.html. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] incorrect tip labels with tiplabels() function

2014-06-01 Thread Liam J. Revell
Hi Jonathan. Can you share your R workspace R history so that we can replicate your error? 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 -- Sent from

Re: [R-sig-phylo] Phytools rerootingMethod(): error in 'colnames, -'

2014-06-04 Thread Liam J. Revell
in islandRecon$marginal.anc should correspond to node numbers in your original tree. 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/4/2014 11:37

Re: [R-sig-phylo] How to use which.edge {ape}

2014-06-04 Thread Liam J. Revell
,] ## should be the edges tipward of the mrca of group ## visualize this: plotSimmap(paintBranches(tree,tree$edge[ii,2],state=2), colors=setNames(c(blue,red),1:2),lwd=3,node.numbers=T) All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] edge color in phylomorphospace3d

2014-06-10 Thread Liam J. Revell
Thanks Jonas. I had just added this to phytools. Not yet on CRAN but more details (including how to use it) can be seen here: http://blog.phytools.org/2014/06/coloring-edges-in-phylomorphospace3d.html. All the best, Liam Liam J. Revell, Assistant Professor of Biology University

Re: [R-sig-phylo] questions about plotting a tree

2014-07-25 Thread Liam J. Revell
See comments below. I hope the instructions are helpful. 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/25/2014 1:27 PM, Eliot Miller wrote: My first

Re: [R-sig-phylo] Colouring node pies according to a discrete character.

2014-08-12 Thread Liam J. Revell
know if this is what you had in mind. 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/12/2014 9:23 AM, Ferguson-Gow, Henry wrote: Dear list

Re: [R-sig-phylo] Can't load a tree with multitomies into 'ape'

2014-08-15 Thread Liam J. Revell
-read.tree(text=x[length(x)]) 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/15/2014 9:56 AM, Anna Bastian wrote: Dear list members, I am

Re: [R-sig-phylo] caper model comparison with different branch length transformations

2014-08-20 Thread Liam J. Revell
(list(likelihood.ratio=LR,p=P)) } ## run likelihood-ratio test lrtest(fitBM,fitLambda) For small trees, we may want to generate a null distribution for the LR using simulation under the null rather than the parametric distribution. All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] Trying to read a tree with numerical node labels, but without edge length

2014-08-29 Thread Liam J. Revell
(text=obj) } which is even simpler. - 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/29/2014 5:25 PM, Liam J. Revell wrote: Hi Daniel. I think

Re: [R-sig-phylo] problem with write.nexus.data

2014-09-17 Thread Liam J. Revell
the error. 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 9/17/2014 10:46 PM, Nicholas Crouch wrote: Hi, I am having a problem

Re: [R-sig-phylo] Random sampling of branch lengths

2014-09-25 Thread Liam J. Revell
(i.e., Yule) process 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 9/26/2014 12:51 AM, Emmanuel Paradis wrote: Hi, compute.brtime() can

Re: [R-sig-phylo] problem dropping extinct taxa from large tree

2014-09-30 Thread Liam J. Revell
Hi Gabriel. You could try the following, which worked for me with a simulated tree containing 9898 tips, 7898 of which were extinct: library(phytools) obj-drop.tip(tree,getExtinct(tree)) obj All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston

Re: [R-sig-phylo] how to add phylogenetic tree to an existing plot

2014-10-17 Thread Liam J. Revell
/pdfs/Revell_2014.MPCM-chapter.pdf) as a guide. 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 10/17/2014 6:48 AM, Ondřej Mikula wrote

Re: [R-sig-phylo] Extracting sister groups

2014-10-23 Thread Liam J. Revell
(specifically, descendants on either side of the node will be all in state 0 or 1). This should be straightforward to code, but I do not have time to demonstrate right now. I will try to do it this evening. Let us know if you first figure it out yourself. - Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] fitDiscrete across multiple datasets

2014-10-27 Thread Liam J. Revell
instead change the code in minor ways and use fitDiscrete, which is slower but should be more robust. The demo is fairly explicit, but let us know if it works or if I have made any errors. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston

Re: [R-sig-phylo] fitDiscrete across multiple datasets

2014-10-27 Thread Liam J. Revell
run fitTransform separately on each column of X and sum the log-likelihoods. I don't know whether either of these things (or the main exercise) are a good idea, but they are all certainly possible. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts

Re: [R-sig-phylo] dropping all but one species in each genus

2014-11-03 Thread Liam J. Revell
You could try something like the following: tips-tree$tip.label genera-unique(sapply(strsplit(tips,_),function(x) x[1])) ii-sapply(genera,function(x,y) grep(x,y)[1],y=tips) tree-drop.tip(tree,setdiff(tree$tip.label,tips[ii])) Let us know if this works. All the best, Liam Liam J. Revell

Re: [R-sig-phylo] dropping all but one species in each genus

2014-11-03 Thread Liam J. Revell
,function(x,y) x[x=Ntip(y)][1],y=tree)] tt-drop.tip(tree,setdiff(tree$tip.label,tips)) Let us know if this works. 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] Replacement of Phybase - species tree from gene trees

2014-11-05 Thread Liam J. Revell
For a exercises in a class I teach, I previously posted source (with NAMESPACE file), Windows Mac OS binaries here: http://www.phytools.org/phybase. Maybe this will help. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] Rescaling trees

2014-11-05 Thread Liam J. Revell
if this works. 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 11/5/2014 12:21 PM, Lara Budic wrote: Hi Julien, thank you for your

Re: [R-sig-phylo] Replacement of Phybase - species tree from gene trees

2014-11-06 Thread Liam J. Revell
Sorry, that should have been: http://www.phytools.org/mpma/phybase All the best, 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 11/6/2014 5:09 AM, Vojtěch

Re: [R-sig-phylo] PGLS with discrete binary independent variable?

2014-11-13 Thread Liam J. Revell
. There are different views on whether or not this is a good idea; or if, perhaps, fitting a model with a more explicit biological basis (such as an OU model with two regimes) would be more sensible. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] Ape Plot issues

2014-12-19 Thread Liam J. Revell
=LETTERS) plot(tree,show.node.label=TRUE) ## no node labels plotted tree$node.label-letters[1:25] plot(tree,show.node.label=TRUE) ## labels exist so are plotted Let us know if this clarifies your issue or if you still do not have node labels. All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] Fwd: atomic vector for write.nexus

2015-01-01 Thread Liam J. Revell
=filename.nex) ## does not work? If so, I was able to get this to run on test datasets without a problem. 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] bimodal distribution in transition rates, make.simmap, mcmc

2015-02-06 Thread Liam J. Revell
probability density for q01 and q10 (in this case). 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 1/28/2015 8:42 AM, Maria Ghazali wrote: Hi

Re: [R-sig-phylo] phytools read.newick fails to read edge lengths

2015-02-17 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 2/17/2015 3:19 PM, Yampolsky, Lev wrote: Dear Colleagues, I need to remove singleton nodes from a tree

Re: [R-sig-phylo] bimodal distribution in transition rates, make.simmap, mcmc

2015-01-27 Thread Liam J. Revell
for the transition matrix. This could tell you if the result you have found is being influenced by the prior (although the mean of the prior in make.simmap is 'hyper-parameterized' by the ML value of Q, so this seems somewhat unlikely). All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] Problem with the use of list of trees in aov.phylo () command.

2015-03-17 Thread Liam J. Revell
(trees,aov.phylo,formula=y~x,nsim=100) Then to pull out the 'phylogenetic p-values' only in a vector you could do: Pr.phy-sapply(fits,function(x) attr(x,summary)$Pr(phy)[1]) All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] determine multistate characters in nexus data matrix

2015-03-20 Thread Liam J. Revell
then the following highly similar code does the same thing: N-apply(as.matrix(X),2,function(x) length(unique(x))) Let us know if you found another solution or if this does not work. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

Re: [R-sig-phylo] Rooting on a node with resolve.root = TRUE

2015-03-19 Thread Liam J. Revell
to root an unrooted tree at the root node (i.e., the node with node number Ntip(tree)+1). 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/19

Re: [R-sig-phylo] dangerous tree

2015-03-09 Thread Liam J. Revell
spots, I obtain an ultrametric tree from read.tree or read.newick. This may be beside the point if the issue is that this text string when read using read.tree crashes R rather than producing a more sensible error. This I too experienced. All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] make.simmap with all rates different

2015-03-12 Thread Liam J. Revell
check your current package version using: packageVersion(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 3/10/2015 12:57 PM

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

2015-03-05 Thread Liam J. Revell
positions replot the tree until it is the way you want it. 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 2:24 PM, Jacob Berv wrote: Hi

Re: [R-sig-phylo] Ancestral state problem (length of phylogenetic and phenotypic data don't match)

2015-03-13 Thread Liam J. Revell
Can I add the suggestion that you do: ace.ER-ace(setNames(MCTree[,2],MCTree[,1]),phy=tree, type=discrete,model=“ER”) otherwise it will 'work', but ace will not notice if the row order of MCTree is not the same as tree$tip.label. All the best, Liam Liam J. Revell, Assistant Professor

Re: [R-sig-phylo] assign multiple discrete states to single tip

2015-03-25 Thread Liam J. Revell
first pass through state AB, etc. This kind of constraint is fairly straightforward to implement in ape's ace function. Let us know I will see if I can give you any more concrete suggestions. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston

Re: [R-sig-phylo] Convert tree to taxonomy

2015-03-30 Thread Liam J. Revell
simplified) example here: http://blog.phytools.org/2015/03/converting-phylogeny-with-node-labels.html. Let us know if this is more or less what you are looking for. Good luck. All the best, Liam Liam J. Revell, Assistant Professor of Biology University of Massachusetts Boston web: http

<    1   2   3   4   5   >