Hi Scott.

I'm not sure why you want to do this, but based on your description it sounds like you could just generate two separate trees and then paste them together across a deep basal split.

The following is an example of doing this, although I'm sure you could also come up with your own using different functions than those that I have chosen:

require(phytools); require(geiger) # load packages
ntaxa1<-50; ntaxa2<-50 # number of taxa in each clade
total.height<-10 # total tree height (may need to be adjusted)
# simulate subtree 1
tr1<-birthdeath.tree(b=1,d=0,taxa.stop=ntaxa1)
tr1$tip.label<-1:ntaxa1; tr1$root.edge<-0
# simulate subtree 2
tr2<-birthdeath.tree(b=1,d=0,taxa.stop=ntaxa2)
tr2$tip.label<-1:ntaxa2+ntaxa1; tr2$root.edge<-0
# compute tree heights, so that the whole thing can be ultrametric
height1<-max(nodeHeights(tr1))
height2<-max(nodeHeights(tr2))
# create the basal split
tr3<-list(Nnode=1,edge=matrix(c(3,1,3,2),2,2,byrow=T),edge.length=c(total.height-height1,total.height-height2),tip.label=c("tr1","tr2"))
class(tr3)<-"phylo"
# attach the two subtrees one by one
tr3$tip.label[tr3$tip.label=="tr1"]<-"NA"
tr3<-paste.tree(tr3,tr1)
tr3$tip.label[tr3$tip.label=="tr2"]<-"NA"
tr3<-paste.tree(tr3,tr2)
# plot the full tree
plot(tr3)

I hope this is kind of what you are going for.

All the best, Liam

--
Liam J. Revell
University of Massachusetts Boston
web: http://faculty.umb.edu/liam.revell/
email: liam.rev...@umb.edu
blog: http://phytools.blogspot.com

On 10/13/2011 5:32 PM, Scott Chamberlain wrote:
Hello,

I want to simulate two types of phylogenies: one normally done with, for
example, rcoal in ape; and the second type with an outgroup on a long
branch.  The first is easy with rcoal.

I'm not sure how to make the second kind of tree.  An example of this second
kind is a tree with say all animals, and then an outgroup with all plant
species, so that you have many animal species that have relatively short
branches among them, and then the distance between plants and animals is
relatively long.

Is there a way to simulate this second kind of tree with any available R
functions?

Thanks!
Scott Chamberlain
Rice University

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to