Title: | Tracer from R |
---|---|
Description: | 'BEAST2' (<https://www.beast2.org>) is a widely used Bayesian phylogenetic tool, that uses DNA/RNA/protein data and many model priors to create a posterior of jointly estimated phylogenies and parameters. 'Tracer' (<https://github.com/beast-dev/tracer/>) is a GUI tool to parse and analyze the files generated by 'BEAST2'. This package provides a way to parse and analyze 'BEAST2' input files without active user input, but using R function calls instead. |
Authors: | Richèl J.C. Bilderbeek [aut, cre] , Joëlle Barido-Sottani [rev] (Joëlle reviewed the package for rOpenSci, see https://github.com/ropensci/onboarding/issues/209), David Winter [rev] (David reviewed the package for rOpenSci, see https://github.com/ropensci/onboarding/issues/209) |
Maintainer: | Richèl J.C. Bilderbeek <[email protected]> |
License: | GPL-3 |
Version: | 2.2.3 |
Built: | 2024-10-06 04:19:29 UTC |
Source: | https://github.com/ropensci/tracerer |
Calculate the auto-correlation time, alternative implementation
calc_act(trace, sample_interval)
calc_act(trace, sample_interval)
trace |
the values |
sample_interval |
the interval in timesteps between samples |
the auto_correlation time
The original Java version of the algorithm was from Remco Bouckaert, ported to R and adapted by Richèl J.C. Bilderbeek
Java code can be found here: https://github.com/CompEvol/beast2/blob/9f040ed0357c4b946ea276a481a4c654ad4fff36/src/beast/core/util/ESS.java#L161 # nolint URLs can be long
trace <- sin(seq(from = 0.0, to = 2.0 * pi, length.out = 100)) # 38.18202 calc_act(trace = trace, sample_interval = 1)
trace <- sin(seq(from = 0.0, to = 2.0 * pi, length.out = 100)) # 38.18202 calc_act(trace = trace, sample_interval = 1)
Calculate the auto correlation time from https://github.com/beast-dev/beast-mcmc/blob/800817772033c13061f026226e41128d21fd14f3/src/dr/inference/trace/TraceCorrelation.java#L159 # nolint
calc_act_cpp(sample, sample_interval)
calc_act_cpp(sample, sample_interval)
sample |
sample |
sample_interval |
sample interval |
the auto correlation time
Richèl J.C. Bilderbeek
Calculate the auto-correlation time using only R. Consider using calc_act instead, as it is orders of magnitude faster
calc_act_r(trace, sample_interval)
calc_act_r(trace, sample_interval)
trace |
the values |
sample_interval |
the interval in timesteps between samples |
the auto correlation time
The original Java version of the algorithm was from Remco Bouckaert, ported to R and adapted by Richèl J.C. Bilderbeek
Java code can be found here: https://github.com/CompEvol/beast2/blob/9f040ed0357c4b946ea276a481a4c654ad4fff36/src/beast/core/util/ESS.java#L161 # nolint URLs can be long
trace <- sin(seq(from = 0.0, to = 2.0 * pi, length.out = 100)) calc_act_r(trace = trace, sample_interval = 1) # 38.18202
trace <- sin(seq(from = 0.0, to = 2.0 * pi, length.out = 100)) calc_act_r(trace = trace, sample_interval = 1) # 38.18202
Calculates the Effective Sample Size
calc_ess(trace, sample_interval)
calc_ess(trace, sample_interval)
trace |
the values without burn-in |
sample_interval |
the interval in timesteps between samples |
the effective sample size
The original Java version of the algorithm was from Remco Bouckaert, ported to R and adapted by Richèl J.C. Bilderbeek
Java code can be found here: https://github.com/CompEvol/beast2/blob/9f040ed0357c4b946ea276a481a4c654ad4fff36/src/beast/core/util/ESS.java#L161 # nolint URLs can be long
filename <- get_tracerer_path("beast2_example_output.log") estimates <- parse_beast_tracelog_file(filename) calc_ess(estimates$posterior, sample_interval = 1000)
filename <- get_tracerer_path("beast2_example_output.log") estimates <- parse_beast_tracelog_file(filename) calc_ess(estimates$posterior, sample_interval = 1000)
Calculates the Effective Sample Sizes from a parsed BEAST2 log file
calc_esses(traces, sample_interval)
calc_esses(traces, sample_interval)
traces |
a dataframe with traces with removed burn-in |
sample_interval |
the interval in timesteps between samples |
the effective sample sizes
Richèl J.C. Bilderbeek
# Parse an example log file estimates <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) # Calculate the effective sample sizes of all parameter estimates calc_esses(estimates, sample_interval = 1000)
# Parse an example log file estimates <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) # Calculate the effective sample sizes of all parameter estimates calc_esses(estimates, sample_interval = 1000)
Calculate the geometric mean
calc_geom_mean(values)
calc_geom_mean(values)
values |
a numeric vector of values |
returns the geometric mean if all values are at least zero, else returns NA
Richèl J.C. Bilderbeek
Calculate the Highest Probability Density of an MCMC trace that has its burn-in removed
calc_hpd_interval(trace, proportion = 0.95)
calc_hpd_interval(trace, proportion = 0.95)
trace |
a numeric vector of parameter estimates obtained from an MCMC run. Must have its burn-in removed |
proportion |
the proportion of numbers within the interval. For example, use 0.95 for a 95 percentage interval |
a numeric vector, with at index 1 the lower boundary of the interval, and at index 2 the upper boundary of the interval
The original Java version of the algorithm was from J. Heled, ported to R and adapted by Richèl J.C. Bilderbeek
The function remove_burn_in
removes
a burn-in.
The Java code that inspired this function can be found here:
https://github.com/beast-dev/beast-mcmc/blob/98705c59db65e4f406a420bbade949aeecfe05d0/src/dr/stats/DiscreteStatistics.java#L317 # nolint URLs can be long
estimates <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) tree_height_trace <- remove_burn_in( estimates$TreeHeight, burn_in_fraction = 0.1 ) # Values will be 0.453 and 1.816 calc_hpd_interval(tree_height_trace, proportion = 0.95)
estimates <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) tree_height_trace <- remove_burn_in( estimates$TreeHeight, burn_in_fraction = 0.1 ) # Values will be 0.453 and 1.816 calc_hpd_interval(tree_height_trace, proportion = 0.95)
Calculate the mode of values If the distribution is bi or multimodal or uniform, NA is returned
calc_mode(values)
calc_mode(values)
values |
numeric vector to calculate the mode of |
the mode of the trace
Richèl J.C. Bilderbeek
# In a unimodal distribution, find the value that occurs most calc_mode(c(1, 2, 2)) calc_mode(c(1, 1, 2)) # For a uniform distribution, NA is returned tracerer:::calc_mode(c(1, 2))
# In a unimodal distribution, find the value that occurs most calc_mode(c(1, 2, 2)) calc_mode(c(1, 1, 2)) # For a uniform distribution, NA is returned tracerer:::calc_mode(c(1, 2))
Calculates the standard error of the mean
calc_std_error_of_mean_cpp(sample)
calc_std_error_of_mean_cpp(sample)
sample |
numeric vector of values |
the standard error of the mean
Richèl J.C. Bilderbeek
Calculate the standard error of the mean
calc_stderr_mean(trace)
calc_stderr_mean(trace)
trace |
the values |
the standard error of the mean
The original Java version of the algorithm was from Remco Bouckaert, ported to R and adapted by Richèl J.C. Bilderbeek
Java code can be found here: https://github.com/beast-dev/beast-mcmc/blob/800817772033c13061f026226e41128d21fd14f3/src/dr/inference/trace/TraceCorrelation.java#L159 # nolint URLs can be long
trace <- sin(seq(from = 0.0, to = 2.0 * pi, length.out = 100)) calc_stderr_mean(trace) # 0.4347425
trace <- sin(seq(from = 0.0, to = 2.0 * pi, length.out = 100)) calc_stderr_mean(trace) # 0.4347425
Calculates the Effective Sample Sizes of one estimated variable's trace.
calc_summary_stats(traces, sample_interval)
calc_summary_stats(traces, sample_interval)
traces |
one or more traces, supplies as either, (1) a numeric vector or, (2) a data frame of numeric values. |
sample_interval |
the interval (the number of state
transitions between samples) of the MCMC run that produced the trace.
Using a different |
the summary statistics of the traces. If one numeric
vector is supplied, a list is returned with the elements
listed below. If the traces are supplied as a data frame,
a data frame is returned with the elements listed
below as column names.
The elements are:
mean
: mean
stderr_mean
: standard error of the mean
stdev
: standard deviation
variance
: variance
mode
: mode
geom_mean
: geometric mean
hpd_interval_low
:
lower bound of 95% highest posterior density
hpd_interval_high
:
upper bound of 95% highest posterior density
act
: auto correlation time
ess
: effective sample size
This function assumes the burn-in is removed.
Use remove_burn_in
(on a vector) or
remove_burn_ins
(on a data frame) to remove
the burn-in.
Richèl J.C. Bilderbeek
Use calc_summary_stats_trace
to calculate the
summary statistics of one trace (stored as a numeric vector). Use
calc_summary_stats_traces
to calculate the
summary statistics of more traces (stored as a data frame).
estimates_all <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) estimates <- remove_burn_ins(estimates_all, burn_in_fraction = 0.1) # From a single variable's trace calc_summary_stats( estimates$posterior, sample_interval = 1000 ) # From all variables' traces calc_summary_stats( estimates, sample_interval = 1000 )
estimates_all <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) estimates <- remove_burn_ins(estimates_all, burn_in_fraction = 0.1) # From a single variable's trace calc_summary_stats( estimates$posterior, sample_interval = 1000 ) # From all variables' traces calc_summary_stats( estimates, sample_interval = 1000 )
Calculates the Effective Sample Sizes of one estimated variable's trace.
calc_summary_stats_trace(trace, sample_interval)
calc_summary_stats_trace(trace, sample_interval)
trace |
a numeric vector of values. Assumes the burn-in is removed. |
sample_interval |
the interval in timesteps between samples |
the effective sample sizes
Richèl J.C. Bilderbeek
Use remove_burn_in
to remove the burn-in
of a trace
estimates_all <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) estimates <- remove_burn_ins(estimates_all, burn_in_fraction = 0.1) calc_summary_stats_trace( estimates$posterior, sample_interval = 1000 )
estimates_all <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) estimates <- remove_burn_ins(estimates_all, burn_in_fraction = 0.1) calc_summary_stats_trace( estimates$posterior, sample_interval = 1000 )
Calculates the Effective Sample Sizes of the traces of multiple estimated variables.
calc_summary_stats_traces(traces, sample_interval)
calc_summary_stats_traces(traces, sample_interval)
traces |
a data frame with traces of estimated parameters. Assumes the burn-ins are removed. |
sample_interval |
the interval in timesteps between samples |
the effective sample sizes
Richèl J.C. Bilderbeek
Use remove_burn_ins
to remove the burn-ins
of all traces
estimates_all <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) estimates <- remove_burn_ins(estimates_all, burn_in_fraction = 0.1) calc_summary_stats_traces( estimates, sample_interval = 1000 )
estimates_all <- parse_beast_tracelog_file( get_tracerer_path("beast2_example_output.log") ) estimates <- remove_burn_ins(estimates_all, burn_in_fraction = 0.1) calc_summary_stats_traces( estimates, sample_interval = 1000 )
Check if the trace is a valid. Will stop if not
check_trace(trace)
check_trace(trace)
trace |
the values |
Richèl J.C. Bilderbeek
check_trace(seq(1, 2))
check_trace(seq(1, 2))
.trees
fileCount the number of trees in a .trees
file
count_trees_in_file(trees_filename)
count_trees_in_file(trees_filename)
trees_filename |
name of a BEAST2 posterior |
the number of trees
Richèl J.C. Bilderbeek
if the .trees
file is invalid,
use is_trees_file with verbose = TRUE
for the reason
Calculate the corrected sample standard deviation.
cs_std_dev(values)
cs_std_dev(values)
values |
numeric values |
the corrected sample standard deviation
Richèl J.C. Bilderbeek
Documentation of general function arguments. This function does nothing. It is intended to inherit function argument documentation.
default_params_doc( log_filename, sample_interval, state_filename, trace, tracelog_filename, trees_filename, trees_filenames, verbose )
default_params_doc( log_filename, sample_interval, state_filename, trace, tracelog_filename, trees_filename, trees_filenames, verbose )
log_filename |
deprecated name
of the BEAST2 tracelog |
sample_interval |
the interval in timesteps between samples |
state_filename |
name of the BEAST2 state |
trace |
the values |
tracelog_filename |
name of the BEAST2 tracelog |
trees_filename |
name of a BEAST2 posterior |
trees_filenames |
the names of one or more a BEAST2
posterior |
verbose |
set to TRUE for more output |
This is an internal function, so it should be marked with
@noRd
. This is not done, as this will disallow all
functions to find the documentation parameters
Richèl J.C. Bilderbeek
.xml.state
with
the unparsed BEAST2 MCMC operator acceptances
file with the operatorsExtract the JSON lines out of a .xml.state
with
the unparsed BEAST2 MCMC operator acceptances
file with the operators
extract_operators_lines(filename)
extract_operators_lines(filename)
filename |
name of the BEAST2 .xml.state output file |
the JSON lines of a .xml.state
file with
the unparsed BEAST2 MCMC operator acceptances
Richèl J.C. Bilderbeek
inst/extdata
folderGet the full path of a file in the inst/extdata
folder
get_tracerer_path(filename)
get_tracerer_path(filename)
filename |
the file's name, without the path |
the full path to the filename
Richèl J.C. Bilderbeek
for more files, use get_tracerer_paths
get_tracerer_path("beast2_example_output.log") get_tracerer_path("beast2_example_output.trees") get_tracerer_path("beast2_example_output.xml") get_tracerer_path("beast2_example_output.xml.state")
get_tracerer_path("beast2_example_output.log") get_tracerer_path("beast2_example_output.trees") get_tracerer_path("beast2_example_output.xml") get_tracerer_path("beast2_example_output.xml.state")
inst/extdata
folderGet the full paths of files in the inst/extdata
folder
get_tracerer_paths(filenames)
get_tracerer_paths(filenames)
filenames |
the files' names, without the path |
the filenames' full paths
Richèl J.C. Bilderbeek
for one file, use get_tracerer_path
get_tracerer_paths( c( "beast2_example_output.log", "beast2_example_output.trees", "beast2_example_output.xml", "beast2_example_output.xml.state" ) )
get_tracerer_paths( c( "beast2_example_output.log", "beast2_example_output.trees", "beast2_example_output.xml", "beast2_example_output.xml.state" ) )
Get a temporary filename, similar to tempfile, except that it always writes to a temporary folder named tracerer.
get_tracerer_tempfilename(pattern = "file", fileext = "")
get_tracerer_tempfilename(pattern = "file", fileext = "")
pattern |
a non-empty character vector giving the initial part of the name. |
fileext |
a non-empty character vector giving the file extension |
name for a temporary file
this function is added to make sure no temporary cache files are left undeleted
Determines if the input is a BEAST2 posterior
is_posterior(x)
is_posterior(x)
x |
the input |
TRUE if the input contains all information of a BEAST2 posterior. Returns FALSE otherwise.
Richèl J.C. Bilderbeek
trees_filename <- get_tracerer_path("beast2_example_output.trees") tracelog_filename <- get_tracerer_path("beast2_example_output.log") posterior <- parse_beast_posterior( trees_filename = trees_filename, tracelog_filename = tracelog_filename ) is_posterior(posterior)
trees_filename <- get_tracerer_path("beast2_example_output.trees") tracelog_filename <- get_tracerer_path("beast2_example_output.log") posterior <- parse_beast_posterior( trees_filename = trees_filename, tracelog_filename = tracelog_filename ) is_posterior(posterior)
.trees
fileMeasure if a file a valid BEAST2 .trees
file
is_trees_file(trees_filename, verbose = FALSE)
is_trees_file(trees_filename, verbose = FALSE)
trees_filename |
name of a BEAST2 posterior |
verbose |
set to TRUE for more output |
TRUE if trees_filename
is a valid .trees
file
Richèl J.C. Bilderbeek
Most of the work is done by read.nexus
# TRUE is_trees_file(get_tracerer_path("beast2_example_output.trees")) is_trees_file(get_tracerer_path("unplottable_anthus_aco.trees")) is_trees_file(get_tracerer_path("anthus_2_4_a.trees")) is_trees_file(get_tracerer_path("anthus_2_4_b.trees")) # FALSE is_trees_file(get_tracerer_path("mcbette_issue_8.trees"))
# TRUE is_trees_file(get_tracerer_path("beast2_example_output.trees")) is_trees_file(get_tracerer_path("unplottable_anthus_aco.trees")) is_trees_file(get_tracerer_path("anthus_2_4_a.trees")) is_trees_file(get_tracerer_path("anthus_2_4_b.trees")) # FALSE is_trees_file(get_tracerer_path("mcbette_issue_8.trees"))
Determines if the input is a BEAST2 posterior, as parsed by parse_beast_trees
is_trees_posterior(x)
is_trees_posterior(x)
x |
the input |
TRUE or FALSE
Richèl J.C. Bilderbeek
.log
output file.
Use parse_beast_tracelog_file insteadDeprecated function to parse a BEAST2 .log
output file.
Use parse_beast_tracelog_file instead
parse_beast_log(tracelog_filename, filename = "deprecated")
parse_beast_log(tracelog_filename, filename = "deprecated")
tracelog_filename |
name of the BEAST2 tracelog |
filename |
deprecated name of the BEAST2 .log output file |
data frame with the parameter estimates
Richèl J.C. Bilderbeek
# Deprecated parse_beast_log( tracelog_filename = get_tracerer_path("beast2_example_output.log") ) # Use the function 'parse_beast_tracelog_file' instead parse_beast_tracelog_file( tracelog_filename = get_tracerer_path("beast2_example_output.log") )
# Deprecated parse_beast_log( tracelog_filename = get_tracerer_path("beast2_example_output.log") ) # Use the function 'parse_beast_tracelog_file' instead parse_beast_tracelog_file( tracelog_filename = get_tracerer_path("beast2_example_output.log") )
Parse all BEAST2 output files
parse_beast_output_files(log_filename, trees_filenames, state_filename)
parse_beast_output_files(log_filename, trees_filenames, state_filename)
log_filename |
deprecated name
of the BEAST2 tracelog |
trees_filenames |
the names of one or more a BEAST2
posterior |
state_filename |
name of the BEAST2 state |
a list with the following elements:
itemestimates
: parameter estimates
item
[alignment_id]_trees
: the phylogenies in the
BEAST2 posterior. [alignment_id]
is the ID
of the alignment.
itemoperators
: the BEAST2 MCMC operator
acceptances
Richèl J.C. Bilderbeek
Use remove_burn_ins
to remove the burn-in from
out$estimates
trees_filenames <- get_tracerer_path("beast2_example_output.trees") log_filename <- get_tracerer_path("beast2_example_output.log") state_filename <- get_tracerer_path("beast2_example_output.xml.state") parse_beast_output_files( log_filename = log_filename, trees_filenames = trees_filenames, state_filename = state_filename )
trees_filenames <- get_tracerer_path("beast2_example_output.trees") log_filename <- get_tracerer_path("beast2_example_output.log") state_filename <- get_tracerer_path("beast2_example_output.xml.state") parse_beast_output_files( log_filename = log_filename, trees_filenames = trees_filenames, state_filename = state_filename )
Parses BEAST2 output files to a posterior
parse_beast_posterior( trees_filenames, tracelog_filename, log_filename = "deprecated" )
parse_beast_posterior( trees_filenames, tracelog_filename, log_filename = "deprecated" )
trees_filenames |
the names of one or more a BEAST2
posterior |
tracelog_filename |
name of the BEAST2 tracelog |
log_filename |
deprecated name
of the BEAST2 tracelog |
a list with the following elements:
itemestimates
: parameter estimates
item
[alignment_id]_trees
: the phylogenies in the
BEAST2 posterior. [alignment_id]
is the ID
of the alignment.
Richèl J.C. Bilderbeek
Use remove_burn_ins
to remove the burn-ins from
the posterior's estimates (posterior$estimates
)
trees_filenames <- get_tracerer_path("beast2_example_output.trees") tracelog_filename <- get_tracerer_path("beast2_example_output.log") posterior <- parse_beast_posterior( trees_filenames = trees_filenames, tracelog_filename = tracelog_filename )
trees_filenames <- get_tracerer_path("beast2_example_output.trees") tracelog_filename <- get_tracerer_path("beast2_example_output.log") posterior <- parse_beast_posterior( trees_filenames = trees_filenames, tracelog_filename = tracelog_filename )
.xml.state
output file to get only the operators
acceptancesParses a BEAST2 state .xml.state
output file to get only the operators
acceptances
parse_beast_state_operators( state_filename = get_tracerer_path("beast2_example_output.xml.state"), filename = "deprecated" )
parse_beast_state_operators( state_filename = get_tracerer_path("beast2_example_output.xml.state"), filename = "deprecated" )
state_filename |
name of the BEAST2 state |
filename |
deprecated name of the BEAST2 .xml.state output file,
use |
data frame with all the operators' success rates
Richèl J.C. Bilderbeek
parse_beast_state_operators( state_filename = get_tracerer_path("beast2_example_output.xml.state") )
parse_beast_state_operators( state_filename = get_tracerer_path("beast2_example_output.xml.state") )
.log
output fileParses a BEAST2 tracelog .log
output file
parse_beast_tracelog_file(tracelog_filename)
parse_beast_tracelog_file(tracelog_filename)
tracelog_filename |
name of the BEAST2 tracelog |
data frame with the parameter estimates
Richèl J.C. Bilderbeek
Use remove_burn_ins
to remove the burn-in from
the returned parameter estimates.
Use save_beast_estimates
to save the estimates
to a .log
file.
parse_beast_tracelog_file( tracelog_filename = get_tracerer_path("beast2_example_output.log") )
parse_beast_tracelog_file( tracelog_filename = get_tracerer_path("beast2_example_output.log") )
Parses a BEAST2 .trees output file
parse_beast_trees(filename)
parse_beast_trees(filename)
filename |
name of the BEAST2 .trees output file |
the phylogenies in the posterior
Richèl J.C. Bilderbeek
Use save_beast_trees
to save the phylogenies
to a .trees
file.
Use is_trees_file with verbose = TRUE
to find out
why a file is invalid
trees_filename <- get_tracerer_path("beast2_example_output.trees") parse_beast_trees(trees_filename)
trees_filename <- get_tracerer_path("beast2_example_output.trees") parse_beast_trees(trees_filename)
Removed the burn-in from a trace
remove_burn_in(trace, burn_in_fraction)
remove_burn_in(trace, burn_in_fraction)
trace |
the values |
burn_in_fraction |
the fraction that needs to be removed, must be [0,1> |
the values with the burn-in removed
Richèl J.C. Bilderbeek
# Create a trace from one to and including ten v <- seq(1, 10) # Remove the first ten percent of its values, # in this case removes the first value, which is one w <- remove_burn_in(trace = v, burn_in_fraction = 0.1)
# Create a trace from one to and including ten v <- seq(1, 10) # Remove the first ten percent of its values, # in this case removes the first value, which is one w <- remove_burn_in(trace = v, burn_in_fraction = 0.1)
Removed the burn-ins from a data frame
remove_burn_ins(traces, burn_in_fraction = 0.1)
remove_burn_ins(traces, burn_in_fraction = 0.1)
traces |
a data frame with traces |
burn_in_fraction |
the fraction that needs to be removed,
must be |
the data frame with the burn-in removed
Richèl J.C. Bilderbeek
.log
file.
There will be some differences: a BEAST2 .log
file also saves
the model as comments and formats the numbers in a way non-standard to RSave the BEAST2 estimates as a BEAST2 .log
file.
There will be some differences: a BEAST2 .log
file also saves
the model as comments and formats the numbers in a way non-standard to R
save_beast_estimates(estimates, filename)
save_beast_estimates(estimates, filename)
estimates |
a data frame of BEAST2 parameter estimates |
filename |
name of the |
nothing
Richèl J.C. Bilderbeek
Use parse_beast_log
to read a BEAST2 .log
file
.log
file.
There will be some differences: a BEAST2 .log
file also saves
the model as comments and formats the numbers in a way non-standard to RSave the BEAST2 trees as a BEAST2 .log
file.
There will be some differences: a BEAST2 .log
file also saves
the model as comments and formats the numbers in a way non-standard to R
save_beast_trees(trees, filename)
save_beast_trees(trees, filename)
trees |
BEAST2 posterior trees, of type |
filename |
name of the |
nothing
Richèl J.C. Bilderbeek
Use parse_beast_log
to read a BEAST2 .log
file