save_parameters_to_file: Creates a valid parameter file

Description Usage Arguments Value Author(s) Examples

Description

Creates a valid parameter file

Usage

1
2
3
save_parameters_to_file(rng_seed, sirg, siri, scr, erg, eri, age, mutation_rate,
  n_alignments, sequence_length, nspp, n_beast_runs, filename,
  fixed_crown_age = FALSE)

Arguments

rng_seed

the random number generator seed

sirg

the species initiation rate of the good species

siri

the speciation-initiation rate of the incipient species

scr

the rate at which incipient species become good

erg

the rate at which good species get extinct

eri

the rate at which incipient species get extinct

age

crown age of the phylogeny

mutation_rate

the probability per nucleotide to mutate at a DNA replication

n_alignments

the number of alignments simulated per species tree

sequence_length

the simulated DNA sequence length in nucleotides

nspp

the number of states in the MCMC chain that BEAST2 will run

n_beast_runs

the number of BEAST2 runs per DNA alignments

filename

the name of the parameter file that will be created by this function

fixed_crown_age

the crown age is fixed (for TRUE) or estimated with lambda and mu (for FALSE)

Value

Nothing, it will create a file with filename 'filename'

Author(s)

Richel Bilderbeek

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
filename <- "save_parameters_to_file_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
)
testit::assert(is_valid_file(filename) == TRUE)

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