Re: [R-sig-phylo] Error after ladderizing a tree

2011-03-03 Thread Klaus Schliep
Hi Alastair, first here is a simple solution to your other problem: library(ape) library(phangorn) i - 1 #set.seed(i) r.tree - rtree(20) #set.seed(i) sim.data - simSeq(r.tree, l = 200, rootseq=rep('a',200), type=DNA,rate=0.5) sim.tree - NJ(dist.hamming(sim.data)) sim.tree -

Re: [R-sig-phylo] K for discrete unordered traits

2011-03-03 Thread Anna Kostikova
Hi David, I believe if you replace these 2 lines in the code, the function won't give error message: OBS - parsimony(phy,obs,cost=cost1) by OBS - parsimony(phy,obs,method=sankoff,cost=cost1) NULL.MODEL[i,]-parsimony(phy,null, cost=cost1) by

[R-sig-phylo] Problems with transferring trees back into ape from Mesquite

2011-03-03 Thread David Bapst
Hello all, I recently decided to manually edit a very large supertree (1700 taxa) in Mesquite (I had to collapse a few nodes into polytomies, something I can only seem to do in Mesquite). I read it out of R as a Newick file, than into Mesquite, where I did my little edits and then saved the tree

Re: [R-sig-phylo] Problems with transferring trees back into ape from Mesquite

2011-03-03 Thread Luke Harmon
In my lab we've been messing with the new phylobase package, which has a different nexus reader than ape. The package will create a different tree object, but I think there is also a converter in there to get to ape format. Might be worth a try.

Re: [R-sig-phylo] Comparing the topology of two trees

2011-03-03 Thread John Cumbers
Hi Alastair, See these functions below, dist.topo is in library(Ape) Cheers, John # check for similarity # do the two trees produced by MrBayes and raxML have the same topology? all.equal(tree1, tree2, use.edge.length = FALSE) # result = TRUE or FALSE. # calculate the distance between

Re: [R-sig-phylo] Comparing the topology of two trees

2011-03-03 Thread Scott Chamberlain
There is also SH.test (Shimodaira-Hasegawa test) in package phangorn And the Icong index by de Vienne which only compares topology (See this website: http://www.ese.u-psud.fr/utilisateurs/devienne/index.html) -Scott On Thursday, March 3, 2011 at 11:37 AM, John Cumbers wrote: Hi Alastair,

[R-sig-phylo] Pruning a tree

2011-03-03 Thread Eugen Egorov
Hi all, I have a huge tree and a list with species. Now I want to prune the tree, so only species appearing in the list are left in the tree. I tried the geiger package to compare tree species with those in the list, but that didn't work out, because I recieved a tree with 0 tips and 1 node

[R-sig-phylo] Problem with prop.clades()

2011-03-03 Thread Keith Barker
Hi, folks: I've previously used prop.clades() to generate bootstrap proportions for plotting on a consensus or ML tree. However, recently I went back and used the same series of commands and gotten nonsensical proportions. The commands are: read.trees(file=MLtree.txt)-MLtree #this is a

Re: [R-sig-phylo] Problems with transferring trees back into ape from Mesquite

2011-03-03 Thread Liam J. Revell
To collapse nodes you could use the function di2multi() in ape which collapses all internodes with a length below tol (specified by the user). If your tree doesn't have branch lengths, you could just set all the edge lengths of the edges you want to keep to 1, and all the other ones to 0, and

Re: [R-sig-phylo] Problems with transferring trees back into ape from Mesquite

2011-03-03 Thread Klaus Schliep
Hi David, there are a few superfluous brackets in your tree (161) and (185) around single tips. If you remove them read.tree works fine. These also explains un-collapsed double node branches, you produced them with adding the brackets. Cheers, Klaus PS: There is a function collapse.singles in

[R-sig-phylo] erroneous results with rTraitCont simulations of the OU process

2011-03-03 Thread Carl Boettiger
Dear list, The simulation of OU processes using rTraitCont seems to return erroneous results for non-small values of alpha: Consider this example: require(geiger) require(TreeSim) tree - sim.bd.taxa(100,1,1,0)[[1]] x - rTraitCont(tree, model=OU, sigma=1, alpha=10, theta=0, root.value=0)

Re: [R-sig-phylo] Comparing the topology of two trees

2011-03-03 Thread Emmanuel Paradis
Hi all, To complete this discussion, the package distory computes Billera et al.'s geodesic distance between two trees. Cheers, Emmanuel Scott Chamberlain wrote on 04/03/2011 00:44: There is also SH.test (Shimodaira-Hasegawa test) in package phangorn And the Icong index by de Vienne which

[R-sig-phylo] Comparing the topology of two trees: Summary of responses

2011-03-03 Thread Alastair Potts
Hi All, Thanks very much to everyone for their suggestions! I thought I should summarise the suggestions for one and all: - treedist() and RF.dist() [phangorn] - SteelPenny (1993) - SH.test() [phangorn] - Shimodaira, H.Hasegawa, M. (1999) - dist.topo() [ape] - PennyHendy (1985),