Skip to contents

Create a BEAST2 input file from an inference model

Usage

create_beast2_input_file_from_model(
  input_filename,
  output_filename,
  inference_model = create_inference_model()
)

Arguments

input_filename

A FASTA filename. Use get_fasta_filename to obtain a testing FASTA filename.

output_filename

Name of the XML parameter file created by this function. BEAST2 uses this file as input.

inference_model

a Bayesian phylogenetic inference model. An inference model is the complete model setup in which a site model, clock model, tree prior and more are specified. Use create_inference_model to create an inference model. Use check_inference_model to check if an inference model is valid. Use rename_inference_model_filenames to rename the files in an inference model.

Value

nothing

See also

use create_beast2_input_from_model to get the BEAST2 input file as text

See create_site_model for examples with different site models. See create_clock_model for examples with clock models. See create_tree_prior for examples with different tree priors. See create_mcmc for examples with a different MCMC setup. Use create_beast2_input_file to do the same with the elements of an inference model.

Author

Richèl J.C. Bilderbeek

Examples

if (is_on_ci()) {
  check_empty_beautier_folder()

  output_filename <- get_beautier_tempfilename()
  create_beast2_input_file_from_model(
    input_filename = get_fasta_filename(),
    output_filename = output_filename,
    inference_model = create_inference_model()
  )
  file.remove(output_filename)

  remove_beautier_folder()
  check_empty_beautier_folder()
}