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

View source: R/Conduct.SH_1N.R

Conduct.SH_1NR Documentation

Conduct.SH_1N: function to conduct the SH_1N STAR test given a set of input (all plausible, including the ML) species topologies (can include networks)

Description

This function returns a list containing p-values of the Conduct.SH_1N STAR test for a set of input topologies (can include networks)

Usage

Conduct.SH_1N(
  list.SpeciesTopologiesNetworks,
  handle.InputGeneTrees,
  numeric.NumberOfReps,
  string.PathDir
)

Arguments

list.SpeciesTopologiesNetworks

List of class (not multiPhylo) containing the strings defining all plausible topologies to be tested ( can include networks). Topologies are defined in strings (not phylogenetic objects)

numeric.NumberOfReps

Number of bootstrap replicates to analyze

string.PathDir

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

handle.GeneTrees

Phylo object containing a list of the input gene trees

Value

List Returns a list containing (1) matrix.Change_Delta_BS_Results, (2) vector.Pvalues, and (3) vector.Observed_Delta_ML.

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);"
list.SpeciesNetworks <- list()
list.SpeciesNetworks[[1]] <- string.SpeciesNetwork
list.SpeciesNetworks[[2]] <- string.SpeciesNetwork_2

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



#####################################
# Conduct SH_1N STAR using networks #
#####################################
Conduct.SH_1N(list.SpeciesTopologiesNetworks = list.SpeciesNetworks, 
              handle.InputGeneTrees = handle.Simulated_GeneTreeSet, 
              numeric.NumberOfReps = 2, 
              string.PathDir = '~/Desktop/')

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