ropensci / babette

babette is an R package to work with BEAST2
https://docs.ropensci.org/babette
GNU General Public License v3.0
44 stars 6 forks source link

FAQ: How to get the names of the temporary files? #97

Closed richelbilderbeek closed 3 years ago

richelbilderbeek commented 3 years ago

I have been asked by a colleague to show a plot of a phylogeny with posterior support for branches added.

I have been told that the posterior support is in the .trees file that BEAST2 returns. I know that this gets cleaned up during the babette workflow. Is there a way to extract posterior branch support in babbette or to save the model's .tree file?

p.s. thanks to your package, we have been making some great progress and have had some great results. Your package has really helped to try out different models and test different datasets. Great work making this.

richelbilderbeek commented 3 years ago
# Q: I have been told that the posterior support is in the .trees file 
# that BEAST2 returns. 
# I know that this gets cleaned up during the babette workflow. 
# Is there a way to extract posterior branch support in babbette 
# or to save the model's .tree file?

# A: They are not actively cleaned up; they are put at
# temporary locations instead. You can find these locations here:
inference_model$mcmc$tracelog$filename
inference_model$mcmc$treelog$filename

# Or in a full code example:

# Simple short inference
inference_model <- create_test_inference_model()

# Here they are:
inference_model$mcmc$tracelog$filename
inference_model$mcmc$treelog$filename

# Default BEAST2 options
beast2_options <- create_beast2_options()

bbt_run_from_model(
  fasta_filename = get_babette_path("anthus_aco.fas"),
  inference_model = inference_model,
  beast2_options = beast2_options
)
richelbilderbeek commented 3 years ago

Added!