add_species_trees: Add two reconstructed species trees to a file that already...

Description Usage Arguments Value Author(s) Examples

Description

Add two reconstructed species trees to a file that already has an incipient species tree. These two species trees are sampled from the incipient species tree. One sampling method selects the youngest subspecies to represent each good species. The other tree has the oldest subspecies selected to represent the good species. These two tree may differ.

Usage

1

Arguments

filename

Parameter filename

Value

Nothing, modifies the parameter file

Author(s)

Richel Bilderbeek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 # Create a parameter file
  filename <- "add_species_trees_example.RDa"
  save_parameters_to_file(
    rng_seed = 42,
    sirg = 0.5,
    siri = 0.5,
    scr = 0.5,
    erg = 0.5,
    eri = 0.5,
    age = 5,
    mutation_rate = 0.1,
    n_alignments = 1,
    sequence_length = 10,
    nspp = 10,
    n_beast_runs = 1,
    filename = filename
  )

  # Simulate an incipient species tree
  add_pbd_output(filename)

  # No species tree added yet
  testit::assert(!has_species_trees(read_file(filename)))

  # Add the species trees
  add_species_trees(filename = filename)

  # Now species tree is added
  testit::assert(has_species_trees(read_file(filename)))

richelbilderbeek/wiritttes documentation built on May 27, 2019, 8:14 a.m.