Simulate.GeneTrees_From_SpeciesNetwork: Simulate.GeneTrees_From_SpeciesNetwork: function to simulate...

View source: R/Simulate.GeneTrees_From_SpeciesNetwork.R

Simulate.GeneTrees_From_SpeciesNetworkR Documentation

Simulate.GeneTrees_From_SpeciesNetwork: function to simulate a set of gene trees given a species network using PhyloNet under the MSC

Description

This function returns a list of simulated gene trees that have been generated for a given input species network

Usage

Simulate.GeneTrees_From_SpeciesNetwork(
  string.SpeciesNetwork,
  numeric.NumberOfGeneTrees,
  string.PathDir
)

Arguments

string.SpeciesNetwork

String of the species network in Rich newick format (can be read by dendroscope)

numeric.NumberOfGeneTrees

Numeric number of gene trees to simulate

string.PathDir

String of the path to a parent directory that will be used for simulating gene trees

Value

handle.SimulatedGeneTrees List of simulated gene trees

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);"

####################################################
# 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)

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