Simulate.GeneTrees_From_SpeciesTree3: Simulate.GeneTrees_From_SpeciesTree3: function to simulate a...

View source: R/Simulate.GeneTrees_From_SpeciesTree3.R

Simulate.GeneTrees_From_SpeciesTree3R Documentation

Simulate.GeneTrees_From_SpeciesTree3: function to simulate a set of gene trees given a species tree using HYBRID-LAMBDA under the MSC

Description

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

Usage

Simulate.GeneTrees_From_SpeciesTree3(
  handle.SpeciesTree,
  numeric.NumberOfGeneTrees,
  string.PathDir
)

Arguments

handle.SpeciesTree

Phylo object of the input species tree

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 tree #
#################################
handle.SpeciesTree <- read.tree(text = "(A:1.0,(B:0.5,(C:1.0,D:1.0):1.5):0.5);")

#####################################################
# Simlate a set of gene trees for this species tree #
#####################################################
Simulate.GeneTrees_From_SpeciesTree(handle.SpeciesTree = handle.SpeciesTree,
                                    string.PathDir = '~/Desktop/',
                                    numeric.NumberOfGeneTrees = 10)

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