Create a Birth-Death tree prior

create_bd_tree_prior(
  id = NA,
  birth_rate_distr = create_uniform_distr(),
  death_rate_distr = create_uniform_distr()
)

Arguments

id

the ID of the alignment

birth_rate_distr

the birth rate distribution, as created by a create_distr function

death_rate_distr

the death rate distribution, as created by a create_distr function

Value

a Birth-Death tree_prior

See also

An alignment ID can be extracted from its FASTA filename using get_alignment_id

Author

Richèl J.C. Bilderbeek

Examples

bd_tree_prior <- create_bd_tree_prior()

beast2_input_file <- get_beautier_tempfilename()
create_beast2_input_file(
  input_filename = get_fasta_filename(),
  beast2_input_file,
  tree_prior = bd_tree_prior
)
file.remove(beast2_input_file)
#> [1] TRUE

bd_tree_prior_exp <- create_bd_tree_prior(
  birth_rate_distr = create_exp_distr()
)

beast2_input_file <- get_beautier_tempfilename()
create_beast2_input_file(
  input_filename = get_fasta_filename(),
  beast2_input_file,
  tree_prior = bd_tree_prior_exp
)
file.remove(beast2_input_file)
#> [1] TRUE