if (can_run_mcbette()) {
# Use an example FASTA file
fasta_filename <- system.file("extdata", "simple.fas", package = "mcbette")
# Create two inference models
inference_model_1 <- beautier::create_ns_inference_model(
site_model = beautier::create_jc69_site_model()
)
inference_model_2 <- beautier::create_ns_inference_model(
site_model = beautier::create_hky_site_model()
)
# Shorten the run, by doing a short (dirty, unreliable) MCMC
inference_model_1$mcmc <- beautier::create_test_ns_mcmc()
inference_model_2$mcmc <- beautier::create_test_ns_mcmc()
# Combine the inference models
inference_models <- list(inference_model_1, inference_model_2)
# Create the BEAST2 options, that will write the output
# to different (temporary) filanems
beast2_options_1 <- beastier::create_mcbette_beast2_options()
beast2_options_2 <- beastier::create_mcbette_beast2_options()
# Combine the two BEAST2 options sets,
# use reduplicated plural
beast2_optionses <- list(beast2_options_1, beast2_options_2)
# Compare the models
marg_liks <- est_marg_liks(
fasta_filename,
inference_models = inference_models,
beast2_optionses = beast2_optionses
)
# Interpret the results
interpret_marg_lik_estimates(marg_liks)
beastier::remove_beaustier_folders()
beastier::check_empty_beaustier_folders()
}
Run the code above in your browser using DataLab