Conduct.KH_2 | R Documentation |
This function returns a list containing p-values of the KH_2 STAR test for two input species tree topologies
Conduct.KH_2( handle.SpeciesTree1, handle.SpeciesTree2, handle.InputGeneTrees, numeric.NumberOfReps, string.PathDir )
handle.SpeciesTree1 |
Phylogenetic tree defining the first species topology |
handle.SpeciesTree2 |
Phylogenetic tree defining the second species topology |
numeric.NumberOfReps |
Number of bootstrap replicates to analyze |
string.PathDir |
String defining the path to a parent directory used for conduct KH_1 STAR test |
handle.GeneTrees |
Phylo object containing a list of the input gene trees |
List Returns a list containing (1) twosided pvalue, (2) upper p-values, (3) lower p-values, and (4) a vector of the bootstrapped test statistics delta
################ # Load depends # ################ library(SpeciesTopoTestR) library(ape) ################################# # Generate example species trees # ################################# handle.SpeciesTree1 <- read.tree(text = "(A:1.0,(B:0.5,(C:1.0,D:1.0):1.5):0.5);") handle.SpeciesTree1$edge.length <- handle.SpeciesTree1$edge.length*0.01 handle.SpeciesTree2 <- read.tree(text = "(C:1.0,(B:0.5,(A:1.0,D:1.0):1.5):0.5);") ################################################# # Simlate a set of gene trees for species tree1 # ################################################# handle.Simulated_GeneTrees <- Simulate.GeneTrees_From_SpeciesTree(handle.SpeciesTree = handle.SpeciesTree1, string.PathDir = '~/Desktop/', numeric.NumberOfGeneTrees = 100) ############################################################## # Conduct KH_2 STAR test for the two species tree topologies # ############################################################## Conduct.KH_2(handle.SpeciesTree1 = handle.SpeciesTree1, handle.SpeciesTree2 = handle.SpeciesTree2, handle.InputGeneTrees = handle.Simulated_GeneTrees, numeric.NumberOfReps = 100, string.PathDir = '~/Desktop/')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.