General function to create a site model.

create_site_model(name, id, gamma_site_model = create_gamma_site_model(), ...)

Arguments

name

the site model name. Valid names can be found in get_site_model_names

id

the IDs of the alignment (can be extracted from the FASTA filename using get_alignment_id)

gamma_site_model

a gamma site model, as created by create_gamma_site_model

...

specific site model parameters

Value

a site_model

See also

See create_gtr_site_model for more examples with a GTR site model. See create_hky_site_model for more examples with an HKY site model. See create_jc69_site_model for more examples with a JC69 site model. See create_tn93_site_model for more examples with a TN93 site model

Author

Richèl J.C. Bilderbeek

Examples

input_filename <- get_fasta_filename()

# GTR
output_filename <- get_beautier_tempfilename()
create_beast2_input_file(
  input_filename = input_filename,
  output_filename = output_filename,
  site_model = create_gtr_site_model()
)
file.remove(output_filename)
#> [1] TRUE

# HKY
output_filename <- get_beautier_tempfilename()
create_beast2_input_file(
  input_filename = input_filename,
  output_filename = output_filename,
  site_model = create_hky_site_model()
)
file.remove(output_filename)
#> [1] TRUE

# JC69
output_filename <- get_beautier_tempfilename()
create_beast2_input_file(
  input_filename = input_filename,
  output_filename = output_filename,
  site_model = create_jc69_site_model()
)
file.remove(output_filename)
#> [1] TRUE

# TN93
output_filename <- get_beautier_tempfilename()
create_beast2_input_file(
  input_filename = input_filename,
  output_filename = output_filename,
  site_model = create_tn93_site_model()
)
file.remove(output_filename)
#> [1] TRUE