knitr::opts_chunk$set( collapse = TRUE, comment = "" ) beautier::remove_beautier_folder() beautier::check_empty_beautier_folder()
The purpose of beautier
is to create a valid BEAST2
XML input file
from its function argument. In this way, a scientific pipeline using
BEAST2
can be fully scripted, instead of using BEAUti
's GUI.
beautier
is part of the babette
package suite (website at https://github.com/ropensci/babette).
babette
allows to use BEAST2 (and its tools) from R.
For all examples, do load beautier
:
library(beautier)
Each example shows a picture of a BEAUti dialog to achieve the same.
BEAUti is part of the BEAST2 tool suite and it's a GUI to create BEAST2
input files. beautier
is an R package to supplement BEAUti, by providing
to do the same from an R script.
Each example reads the alignment from a FASTA file called anthus_aco_sub.fas
,
which is part of the files supplied with beautier
:
input_filename <- get_beautier_path("anthus_aco_sub.fas")
In this vignette, the generated BEAST2 XML is shown.
Use create_beast2_input_file
to save the resulting
XML directly to file instead.
Using all default settings, only specify a DNA alignment.
create_beast2_input(
input_filename
)
All other parameters are set to their defaults, as in BEAUti.
create_beast2_input( input_filename, site_model = create_jc69_site_model() )
create_beast2_input( input_filename, clock_model = create_rln_clock_model() )
create_beast2_input( input_filename, tree_prior = create_bd_tree_prior() )
create_beast2_input( input_filename, tree_prior = create_yule_tree_prior( birth_rate_distr = create_normal_distr() ) )
Thanks to Yacine Ben Chehida for this use case
create_beast2_input( input_filename, site_model = create_hky_site_model( gamma_site_model = create_gamma_site_model(prop_invariant = 0.5) ) )
Thanks to Yacine Ben Chehida for this use case
create_beast2_input( input_filename, clock_model = create_strict_clock_model( clock_rate_param = 0.5 ) )
Thanks to Paul van Els and Yacine Ben Chehida for this use case.
create_beast2_input( input_filename, mrca_prior = create_mrca_prior() )
With an MRCA prior, it is possible to specify a close-to-fixed crown age:
crown_age <- 15 create_beast2_input( input_filename, mrca_prior = create_mrca_prior( is_monophyletic = TRUE, mrca_distr = create_normal_distr( mean = crown_age, sigma = 0.001 ) ) )
beautier::remove_beautier_folder() beautier::check_empty_beautier_folder()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.