Description Usage Arguments Details Value Author(s) References Examples
Simulate network with desired number of taxa and number of hybrid.
1 2 3 4 | SimulateNetwork(ntax.nonhybrid=100, ntax.hybrid=10, flow.proportion=0.5,
origin.type=c("clade", "individual"), birth = 1, death = 0.5, sample.f = 0.5,
tree.height = 1, allow.ghost=FALSE)
|
ntax.nonhybrid |
number of non hybrid taxa. |
ntax.hybrid |
number of hybrid taxa. |
flow.proportion |
the gene flow proportion from the parent. |
origin.type |
the type where the hybrids were formed. clade: hybrid formed and then speciate; individial: hybrid species formed and evolved without speciation. |
birth |
birth rate for the tree speciation. |
death |
death rate (extinction) of the tree. |
sample.f |
sampling frequency. |
tree.height |
the height of the tree. |
allow.ghost |
allows ghost lineage persists hybridization for a while and then goes extinct. Otherwise, hybridization event will be between coeval with extant descedants. |
This function generates tree with relevant hybridization information (the structure of gene flow information). The gene flow must happen on its stem edge, which starts at shortest from root and goes up to longest from root. Gene flow cannot go back in time. In general, gene flow can go forward in time via ghost lineages. If no ghost lineages, then there must be temporal overlap between the donor and recipient lineages. So the tipward end of the donor edge must be later than the rootward end of the recipient edge. When the non of hybris is 1 and clade sampling, this will do individual sampling instead.
a list that contains
phy |
a birth death tree with number of taxa of ntax.nonhybrid + ntax.hybrid |
flow |
The flow structure of the gene flow |
Brian O'Meara, Dwueng-Chwuan Jhwueng.
Jhwueng D.C. and O'Meara B.C. 2015. Trait evolution on phylogenetic networks. Submitted.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(TreeSim)
#set up the number for non hybrid species
non.hybrid <- 3
#set up the number for hybrid species
hybrid <- 1
#set up the gene flow porportion
flow<- 0.5
#set pu the hybridization type to original
origins<- "individual"
#start to simulate the network
network<-SimulateNetwork(ntax.nonhybrid=non.hybrid, ntax.hybrid=hybrid,
flow.proportion=flow, origin.type="individual", birth = 1, death = 0.5,
sample.f = 0.5, tree.height = 1, allow.ghost=FALSE)
#print out the result
(network)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.