Conduct.SOWH_1N: Conduct.SOWH_1N: function to conduct the SOWH_1N STAR test...

View source: R/Conduct.SOWH_1N.R

Conduct.SOWH_1NR Documentation

Conduct.SOWH_1N: function to conduct the SOWH_1N STAR test given a species network topology

Description

This function returns a list containing p-values of the SOWH_1 STAR test

Usage

Conduct.SOWH_1N(
  string.SpeciesNetwork_1,
  handle.InputGeneTrees,
  numeric.NumberOfReps,
  numeric.MaxReticulations,
  string.PathDir
)

Arguments

string.SpeciesNetwork_1

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

numeric.NumberOfReps

Number of bootstrap replicates to analyze

numeric.MaxReticulations

Numeric defining the maximum number of reticulations for PhyloNet search

string.PathDir

String defining the path to a parent directory used for conduct SOWH_1 STAR test

handle.GeneTrees

Phylo object containing a list of the input gene trees

Value

List Returns a list containing (1) vector.Null_BS_Delta_Stat, (2) numeric.pValue, and (3) numeric.Delta_Observed

Examples

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

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

##########################
# Simulate gene tree set #
##########################
handle.Simulated_GeneTreeSet <- Simulate.GeneTrees_From_SpeciesNetwork(string.SpeciesNetwork = string.SpeciesNetwork,
                                                                       string.PathDir = '~/Desktop/',
                                                                       numeric.NumberOfGeneTrees = 3)



######################################
# Conduct SOWH_1N STAR using network #
######################################
Conduct.SOWH_1N(string.SpeciesNetwork_1 = string.SpeciesNetwork_2, 
                handle.InputGeneTrees = handle.Simulated_GeneTreeSet, 
                numeric.NumberOfReps = 2, 
                numeric.MaxReticulations = 1,
                string.PathDir = '~/Desktop/')

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