For all examples, do load babette
:
library(babette)
All examples read the alignment from a FASTA file (usually my_fasta.fas
)
and create a BEAST2 input file called my_beast.xml
.
Using all default settings, only specify a DNA alignment.
posterior <- run_beast2(
"test_output_0.fas"
)
All other parameters are set to their defaults, as in BEAUti.
Using all default settings, only specify a DNA alignment.
[No screenshot, as this cannot be done in BEAUti yet]
posterior <- run_beast2(
"my_fasta.fas",
posterior_crown_age = 15
)
posterior <- run_beast2(
"my_alignment.fas",
site_models = create_jc69_site_model()
)
```{r example_4} posterior <- run_beast2( "my_alignment.fas", clock_models = create_rln_clock_model() )
## Example #5: Birth-Death tree prior
![Example #5: Birth-Death tree prior](bd_2_4.png)
```{r example_5}
posterior <- run_beast2(
"my_alignment.fas",
tree_priors = create_bd_tree_prior()
)
```{r example_6} posterior <- run_beast2( "my_alignment.fas", tree_priors = create_yule_tree_prior( birth_rate_distr = create_normal_distr() ) )
Thanks to Yacine Ben Chehida for this use case
## Example #7: HKY site model with a non-zero proportion of invariants
![Example #7: HKY site model with a non-zero proportion of invariants](hky_prop_invariant_0_5_2_4.png)
```{r example_7}
posterior <- run_beast2(
"my_alignment.fas",
site_models = create_hky_site_model(
gamma_site_model = create_gamma_site_model(prop_invariant = 0.5)
)
)
Thanks to Yacine Ben Chehida for this use case
```{r example_8} posterior <- run_beast2( "my_alignment.fas", clock_models = create_strict_clock_model( clock_rate_param = create_clock_rate_param(value = 0.5)) )
Thanks to Paul van Els and Yacine Ben Chehida for this use case.
## Example #9: Two alignments
![Example 9: Two alignments](anthus_2_4.png)
```{r example_9}
posterior <- run_beast2(
c("anthus_aco.fas", "anthus_nd2.fas")
)
Thanks to Paul van Els for this use case and supplying these FASTA files.
{r example_10}
babette::posterior <- run_beast2(
c("anthus_aco.fas", "anthus_nd2.fas"),
site_models = list(
create_hky_site_model(),
create_tn93_site_model()
)
)
Since v1.12
this it is supported to have two alignments with different site models, clock models and tree priors.
Thanks to Paul van Els for this use case.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.