Re: [R-sig-phylo] ape: error in pcoa

2021-04-26 Thread Juan Antonio Balbuena
input with: DH <- > [[the output from above]] with the attributes correctly set. > > Best, > > Emmanuel > > - Le 23 Avr 21, à 21:24, Juan Antonio Balbuena j.a.balbu...@uv.es a écrit > : > >> Hellow, >> >> I am running a set of simulations with dis

[R-sig-phylo] ape: error in pcoa

2021-04-23 Thread Juan Antonio Balbuena
Hellow, I am running a set of simulations with distance matrices used as input to pcoa (package ape). In one instance the matrix (DH) is H18 H20 H21 H18 0.000 0.3127452190 0.3127452190 H20 0.3127452 0.00 0.0001625185 H21 0.3127452 0.0001625185 0.00 when I run pcoa I get

Re: [R-sig-phylo] cophylo

2019-06-17 Thread Juan Antonio Balbuena
Hi I don't see why you cannot it with cophylo. All comes down to configuring assoc (matrix containing the tip labels in tr1 to match to the tip labels in tr2) correctly. All the best Juan A. Balbuena El 17/06/2019 a las 12:03, Sa El 17/06/2019 a las 12:03, Saleh Rahimlouye Barabi escribió:

[R-sig-phylo] Help needed with dist.multiPhylo package distory

2019-03-22 Thread Juan Antonio Balbuena
Solved! The trees included node support data and this was causing the problem. Thanks for your attention. Juan -- Dr. Juan A. Balbuena Cavanilles Institute of Biodiversity and Evolutionary Biology Symbiont Ecology and Evolution Lab University of Valencia http://www.uv.es/~balbuena

[R-sig-phylo] Help needed with dist.multiPhylo package distory

2019-03-22 Thread Juan Antonio Balbuena
Hi, I am getting an error using dist.multiPhylo of package distory that I am unable to decipher. I wish to compute the geodesic distance between 2 trees (t1 and t2) in nexus format (see copy below). I combine them in a list: L <- list(t1, t2) # then I invoke the function:

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

2018-12-12 Thread Juan Antonio Balbuena
You can try this: tree<- compute.brtime(tree, tree$Nnode:1) It will produce an ultrametric tree with its nodes well separated. I hope it helps All the best -- Dr. Juan A. Balbuena Cavanilles Institute of Biodiversity and Evolutionary Biology Symbiont Ecology and Evolution Lab University of

[R-sig-phylo] plot heatmap at nodes

2018-09-04 Thread Juan Antonio Balbuena
Hi You may like to try this T <- rtree(10)  #random tree with 10 terminals plot(T) nodelabels(pie=((1:8)*10/100)) #Just replace (1:8)*10 with the actual values I hope this helps Juan A. Balbuena -- Dr. Juan A. Balbuena Cavanilles Institute of Biodiversity and Evolutionary Biology Symbiont

Re: [R-sig-phylo] midpoint.root Error in phy$edge[, 2] : incorrect number of dimensions

2018-05-16 Thread Juan Antonio Balbuena
used functions may have been. All the best, Liam 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/ On 5/15/2018 10:49 AM, Juan Antonio Balbuena w

Re: [R-sig-phylo] midpoint.root Error in phy$edge[, 2] : incorrect number of dimensions

2018-05-15 Thread Juan Antonio Balbuena
y.umb.edu/liam.revell/ On 5/15/2018 10:29 AM, Juan Antonio Balbuena wrote: Hi all This is really odd. I am using a piece of ode that used to work just fine with the very same file shown below. I changed computer and now get this error: library(ape) TreeH <- read.tree("Pf_tree_short.nwk&qu

[R-sig-phylo] midpoint.root Error in phy$edge[, 2] : incorrect number of dimensions

2018-05-15 Thread Juan Antonio Balbuena
Hi all This is really odd. I am using a piece of ode that used to work just fine with the very same file shown below. I changed computer and now get this error: library(ape) TreeH <- read.tree("Pf_tree_short.nwk") TreeH <- midpoint.root(TreeH) Error in phy$edge[, 2] : incorrect number of

Re: [R-sig-phylo] plot.cophylo: some edges missing

2018-03-13 Thread Juan Antonio Balbuena
du/liam.revell/ On 3/13/2018 11:27 AM, Juan Antonio Balbuena wrote: Hi, Yes!! It worked! Thank you so much! BTW, is there a way to supress the tip labels? show.tip.label=FALSE does not work. All the best Juan El 13/03/2018 a las 17:12, Liam J. Revell escribió: Hola Juan. I'm guessing you ar

Re: [R-sig-phylo] plot.cophylo: some edges missing

2018-03-13 Thread Juan Antonio Balbuena
iamrevell/phytools") Let us know if the problem persists. Saludos, Liam 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/ On 3/13/2018 11:09 AM, Jua

[R-sig-phylo] plot.cophylo: some edges missing

2018-03-13 Thread Juan Antonio Balbuena
Hi all I am using cophylo in phytools to draw a large tanglegram (phylogenies with 29 and 129 terminals, and 129 associations between them). The problem is that only a fraction of the edges of the larger tree (to the right) are plotted. This is the syntax used obj <- cophylo(euglossini29,

[R-sig-phylo] A possible alternate MRCA function to APE\'s getMRCA

2017-06-09 Thread Juan Antonio Balbuena
Package phytools includes a function, findMRCA, that is supposed to work very efficiently with large trees. you may wish to compare it with your function. Cheers Juan -- Dr. Juan A. Balbuena

Re: [R-sig-phylo] Rooting trees in R

2017-05-24 Thread Juan Antonio Balbuena
As a general reference text to handle phylogentic data and sequences in R, you may have a look at Paradis (2011) Analysis of Phylogenetics and Evolution in R, 2nd edition. Springer. Best wishes Juan A. Balbuena --

Re: [R-sig-phylo] ace() Warning message:, In sqrt(1/out$hessian) : NaNs produced

2017-05-18 Thread Juan Antonio Balbuena
Best, Emmanuel Le 11/05/2017 à 15:54, Juan Antonio Balbuena a écrit : Hi all I am playing around with synthetic cophylogenetic data. In one example, which represents a very extreme case of high agreement

[R-sig-phylo] ace() Warning message:, In sqrt(1/out$hessian) : NaNs produced

2017-05-11 Thread Juan Antonio Balbuena
Hi all I am playing around with synthetic cophylogenetic data. In one example, which represents a very extreme case of high agreement between the host and parasite phylogenies (the data was generated with 51 cospeciation, 2 sorting and 1 duplication events), I get

[R-sig-phylo] simulate additive trees based on ultrametric trees

2017-02-23 Thread Juan Antonio Balbuena
Hi all I am using core-gen (Keller-Schmidt et al. 2011 https://www.bioinf.uni-leipzig.de/Publications/PREPRINTS/11-013.pdf) to simulate host and parasite phylogenies. For each instance, a get a pair of ultrametric trees reflecting the coevolutionary history

Re: [R-sig-phylo] Enigmatic error with drop.tip

2017-01-24 Thread Juan Antonio Balbuena
if( length( setdiff(treeP$tip.label, colnames(hp))) < ( length( treeP$tip.label ) -2 ) ) Cheers, Klaus On Fri, Jan 20, 2017 at 7:26 AM, Juan Antonio Balbuena <j.a

[R-sig-phylo] Enigmatic error with drop.tip

2017-01-20 Thread Juan Antonio Balbuena
Hello all I am working with a cophylogenetic problem where I have a host tree, a parasite tree and a binary matrix HP encapsulating the host-parasite associations . After trimming the matrix according to a given criterion, I require to prune the trees

[R-sig-phylo] chronoMPL/APE

2017-01-17 Thread Juan Antonio Balbuena
The "strange" shape of your tree seems to result from negative branch lengths. If your goal is to just obtain an ultrametric tree under no specific assumptions, use compute.brtime (yourtree, method="coalescent", force.positive=TRUE). Where 'yourtree'

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

2016-11-30 Thread Juan Antonio Balbuena
Hi all This is a simple question: I have a set of ultrametric trees with information on their topology but without branch lengths. On a separate file, I have the distances of each node and leaf to the root. Can someone instruct me on how to to compute the

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

2016-09-12 Thread Juan Antonio Balbuena
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:35 AM, Juan Antonio Balbuena wrote: Hi I wonder wh

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

2016-09-12 Thread Juan Antonio Balbuena
Hi I wonder whether there is a way to change the colours of the host-parasite associations in plot.cophylo in phytools. I tried: t1 <- rtree(10) t2 <- rtree(10) obj <- cophylo(t1,t2) plot.cophylo(obj, link.col= "red") But the links appear in black.

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

2015-11-02 Thread Juan Antonio Balbuena
mb.edu blog: http://blog.phytools.org On 10/30/2015 1:03 PM, Juan Antonio Balbuena wrote: Hello I need to add branches to a tree at different, predefined tips. For instance: th <-

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

2015-10-30 Thread Juan Antonio Balbuena
Hello I need to add branches to a tree at different, predefined tips. For instance: th <- rtree(10) I have an object HP_sim$nameH with the taxa names: > HP_sim$nameH  [1] "H1" "H2" "H3" "H4" "H5" "H6" "H7" "H8" "H9" "H10" then

Re: [R-sig-phylo] tip order in phylogeny - How does it work?

2014-10-09 Thread Juan Antonio Balbuena
/postdocs/ Calendar: http://www.brianomeara.info/calendars/omeara On Wed, Oct 8, 2014 at 4:45 AM, Juan Antonio Balbuena j.a.balbuena at uv.es wrote: Hello I am working on a simulation that requires adding a number of random tips to multiple phylogenies: treeP - read.nexus(file= my file.tre

[R-sig-phylo] tip order in phylogeny - How does it work?

2014-10-08 Thread Juan Antonio Balbuena
Hello I am working on a simulation that requires adding a number of random tips to multiple phylogenies: treeP - read.nexus(file= "my file.tre") # 5K trees used to build a consensus tree (treeP is thus a multiPhylo object) NT = 30 # number of taxa in phylogeny

Re: [R-sig-phylo] cophyloplot: how to marks links differently

2014-05-29 Thread Juan Antonio Balbuena
28/05/2014 11:20, Emmanuel Paradis escribió: These options can be vectors with several values (and they are recycled if needed), so you should be able to specify different values for each link. If not, there is a problem. E. Wed, 28 May 2014 11:15:35 +0200 Juan Antonio Balbuena j.a.balbu

[R-sig-phylo] help with dist.multiPhylo needed

2014-01-23 Thread Juan Antonio Balbuena
Hello I would like to compute geodesic distances from random trees for comparison and hypothesis testing with those produced from a given set of trees. I am using dist.multiPhylo() in the 'distory' package, but it seems to be too compute-intensive. To illustrate my

Re: [R-sig-phylo] help with dist.multiPhylo needed

2014-01-23 Thread Juan Antonio Balbuena
a multiPhylo object the function works fine, but not for a list or vector of characters. On Thu, Jan 23, 2014 at 4:49 PM, Juan Antonio Balbuena j.a.balbu...@uv.es wrote: Hello Thank you very m

[R-sig-phylo] most efficient way to read trees from huge text file

2013-10-10 Thread Juan Antonio Balbuena
Hello, I need to handle in R 10M trees produced with the program evolver of PAML. With a smaller number of trees one could create a multi-phylo object with ape as tree.m - read.tree(filename.tre) but this is impractical in this case because it takes all the RAM memory. I've tried something like

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

2013-07-30 Thread Juan Antonio Balbuena
Gset Gcha No node labels. Any help will be much appreciated. Juan Antonio Balbuena -- Dr. Juan A. Balbuena Marine Zoology Unit Cavanilles Institute

[R-sig-phylo] assign numbers to nodes

2013-07-05 Thread Juan Antonio Balbuena
Hello Sorry for this apparently simple question, but could not find the right answer on the internet. For a given phylo object in ape consisting of n tips, how can I assign unique node numbers from 1 to 2n-1, such that if a node i is ancestral to a node k, i

[R-sig-phylo] compute HKY85 distances in R

2012-05-22 Thread Juan Antonio Balbuena
Hello I would like to know whether it is possible to compute HKY85 genetic distances using R. The model is not included in the dist.dna function of ape and I was wondering whether it is available in another package. Thank you very much for your attention. Juan Antonio Balbuena

[R-sig-phylo] randomizing clades within a node

2012-01-13 Thread Juan Antonio Balbuena
Hello I would very much appreciate if someone can help me with this one. I wish to compare two additive trees that are identical for some but not all the clades. So I use rtree of the ape package with, say, 10 tips to generate tree "A". Then I wish to