Conduct.KH_1N: Conduct.KH_1N: function to conduct the KH_1N STAR test given...

View source: R/Conduct.KH_1N.R

Conduct.KH_1NR Documentation

Conduct.KH_1N: function to conduct the KH_1N STAR test given two distinct species topologies (includes one or more network topologies) and a set of input gene trees

Description

This function returns a list containing p-values of the KH_1 STAR test for two input species tree topologies

Usage

Conduct.KH_1N(
  string.SpeciesNetwork1,
  string.SpeciesNetwork2,
  handle.InputGeneTrees,
  numeric.NumberOfReps,
  string.PathDir
)

Arguments

string.SpeciesNetwork1

Strint defining the first species topology (can be network or bifurcating)

string.SpeciesNetwork2

Strint defining the first species topology (can be network or bifurcating)

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

Value

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

Examples



################
# Load depends #
################
library(SpeciesTopoTestR)
library(ape)

####################################
# Generate example species network #
####################################
string.SpeciesNetwork <- "(((((C:1.0,D:1.0):1)#H1:0::0.25,A:1.0):2,B:1.0):2,#H1:0::0.75);"
string.SpeciesNetwork_2 <- "((A:1,B:1):1,(C:1,D:1):1);"


####################################################
# Simlate a set of gene trees for this species tree #
#####################################################
handle.SimulatedGeneTrees <- Simulate.GeneTrees_From_SpeciesNetwork(string.SpeciesNetwork = string.SpeciesNetwork,
                                                                    string.PathDir = '~/Desktop/',
                                                                    numeric.NumberOfGeneTrees = 10)


handle.KH_1N_Results <- Conduct.KH_1N(string.SpeciesNetwork1 = string.SpeciesNetwork, 
                                      string.SpeciesNetwork2 = string.SpeciesNetwork_2, 
                                      handle.InputGeneTrees = handle.SimulatedGeneTrees, 
                                      numeric.NumberOfReps = 3, 
                                      string.PathDir = '~/Desktop/')



radamsRHA/SpeciesTopoTestR documentation built on Sept. 5, 2022, 7:37 p.m.