Title: | Work with 'BEAST2' Packages |
---|---|
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. 'BEAST2' is commonly accompanied by 'BEAUti 2' (<https://www.beast2.org>), which, among others, allows one to install 'BEAST2' package. This package allows to work with 'BEAST2' packages from 'R'. |
Authors: | Richèl J.C. Bilderbeek [aut, cre] , Olivier Roy [ctb] |
Maintainer: | Richèl J.C. Bilderbeek <[email protected]> |
License: | GPL-3 |
Version: | 2.5.5 |
Built: | 2024-12-05 05:12:58 UTC |
Source: | https://github.com/ropensci/mauricer |
This function does nothing. It is intended to inherit is parameters' documentation.
default_params_doc(beast2_folder, has_internet, name, show_warnings, verbose)
default_params_doc(beast2_folder, has_internet, name, show_warnings, verbose)
beast2_folder |
the folder where the BEAST2 is installed. Note that this is not the folder where the BEAST2 executable is installed: the BEAST2 executable is in a subfolder. Use get_default_beast2_folder to get the default BEAST2 folder. Use get_default_beast2_bin_path to get the full path to the default BEAST2 executable. Use get_default_beast2_jar_path to get the full path to the default BEAST2 jar file. |
has_internet |
boolean to indicate if the user has access to the
internet. By default, this value equals the result
of |
name |
the package's name |
show_warnings |
set to TRUE to show warnings |
verbose |
set to TRUE for extra output, as can be used in debugging |
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
List all BEAST2 packages that are available and installed. Will stop if there is no internet connection
get_beast2_pkg_names( beast2_folder = beastier::get_default_beast2_folder(), has_internet = curl::has_internet(), verbose = FALSE )
get_beast2_pkg_names( beast2_folder = beastier::get_default_beast2_folder(), has_internet = curl::has_internet(), verbose = FALSE )
beast2_folder |
the folder where the BEAST2 is installed. Note that this is not the folder where the BEAST2 executable is installed: the BEAST2 executable is in a subfolder. Use get_default_beast2_folder to get the default BEAST2 folder. Use get_default_beast2_bin_path to get the full path to the default BEAST2 executable. Use get_default_beast2_jar_path to get the full path to the default BEAST2 jar file. |
has_internet |
boolean to indicate if the user has access to the
internet. By default, this value equals the result
of |
verbose |
set to TRUE for extra output, as can be used in debugging |
a data frame with columns
name package name, for example, bdmm
installed_version the installed version, for example, 2.6.2
.
installed_version
will be NA if the package is not installed
latest_version version number of the latest version, for example,
2.6.3
dependencies packages the package depends on, for example
BEASTLabs, GEO_SPHERE
. dependencies
will be empty if there
are no dependencies
description description of the package, for example
Nested sampling for model selection and posterior inference
Richèl J.C. Bilderbeek
if (beastier::is_beast2_installed() && curl::has_internet()) { get_beast2_pkg_names() }
if (beastier::is_beast2_installed() && curl::has_internet()) { get_beast2_pkg_names() }
mauricer
fileGet the full path of a file in the inst/extdata
folder.
If there is no mauricer
file, get_mrc_path will stop.
get_mrc_path(filename)
get_mrc_path(filename)
filename |
the file's name, without the path |
the full path of the filename, if and only if the file is present. Will stop otherwise.
Richèl J.C. Bilderbeek
for more files, use get_mrc_paths
get_mrc_path("anthus_aco_sub.fas")
get_mrc_path("anthus_aco_sub.fas")
mauricer
filesGet the full paths of files in the inst/extdata
folder
If there is a mauricer
file absent,
get_mrc_paths will stop.
get_mrc_paths(filenames)
get_mrc_paths(filenames)
filenames |
the files' names, without the path |
the filenames' full paths
Richèl J.C. Bilderbeek
for one file, use get_mrc_path
get_mrc_paths(c("anthus_aco_sub.fas", "anthus_nd2_sub.fas"))
get_mrc_paths(c("anthus_aco_sub.fas", "anthus_nd2_sub.fas"))
Install a BEAST2 package. If the package is already installed, (see is_beast2_pkg_installed), this function stops.
install_beast2_pkg( name, beast2_folder = beastier::get_default_beast2_folder(), verbose = FALSE, has_internet = curl::has_internet() )
install_beast2_pkg( name, beast2_folder = beastier::get_default_beast2_folder(), verbose = FALSE, has_internet = curl::has_internet() )
name |
the package's name |
beast2_folder |
the folder where the BEAST2 is installed. Note that this is not the folder where the BEAST2 executable is installed: the BEAST2 executable is in a subfolder. Use get_default_beast2_folder to get the default BEAST2 folder. Use get_default_beast2_bin_path to get the full path to the default BEAST2 executable. Use get_default_beast2_jar_path to get the full path to the default BEAST2 jar file. |
verbose |
set to TRUE for extra output, as can be used in debugging |
has_internet |
boolean to indicate if the user has access to the
internet. By default, this value equals the result
of |
nothing. It does install the BEAST2 package
Installing or uninstalling a BEAST2 package for a (singular) BEAST2 installation, does so for all BEAST2 installations
Richèl J.C. Bilderbeek
## Not run: install_beast2_pkg("NS") ## End(Not run)
## Not run: install_beast2_pkg("NS") ## End(Not run)
Determine if the BEAST2 NS package is installed.
is_beast2_ns_pkg_installed( show_warnings = FALSE, verbose = FALSE, beast2_folder = beastier::get_default_beast2_folder() )
is_beast2_ns_pkg_installed( show_warnings = FALSE, verbose = FALSE, beast2_folder = beastier::get_default_beast2_folder() )
show_warnings |
set to TRUE to show warnings |
verbose |
set to TRUE for extra output, as can be used in debugging |
beast2_folder |
the folder where the BEAST2 is installed. Note that this is not the folder where the BEAST2 executable is installed: the BEAST2 executable is in a subfolder. Use get_default_beast2_folder to get the default BEAST2 folder. Use get_default_beast2_bin_path to get the full path to the default BEAST2 executable. Use get_default_beast2_jar_path to get the full path to the default BEAST2 jar file. |
Unlike is_beast2_pkg_installed, this function does not need an internet connection. Instead, the function calls BEAST2 to read a BEAST2 XML file that uses NS.
TRUE if the BEAST2 NS package is installed, FALSE otherwise
Richèl J.C. Bilderbeek
## Not run: is_beast2_ns_pkg_installed() ## End(Not run)
## Not run: is_beast2_ns_pkg_installed() ## End(Not run)
Checks if a BEAST2 package is installed.
is_beast2_pkg_installed( name, beast2_folder = beastier::get_default_beast2_folder(), has_internet = curl::has_internet() )
is_beast2_pkg_installed( name, beast2_folder = beastier::get_default_beast2_folder(), has_internet = curl::has_internet() )
name |
the package's name |
beast2_folder |
the folder where the BEAST2 is installed. Note that this is not the folder where the BEAST2 executable is installed: the BEAST2 executable is in a subfolder. Use get_default_beast2_folder to get the default BEAST2 folder. Use get_default_beast2_bin_path to get the full path to the default BEAST2 executable. Use get_default_beast2_jar_path to get the full path to the default BEAST2 jar file. |
has_internet |
boolean to indicate if the user has access to the
internet. By default, this value equals the result
of |
To be able to check this, an internet connection is needed.
Without an internet connection, NULL
is returned.
TRUE
if the BEAST2 package is installed
FALSE
if the BEAST2 package is not installed
NULL
if there is no internet connection
Richèl J.C. Bilderbeek
Use is_beast2_ns_pkg_installed to see if the NS package is installed without an internet connection
## Not run: is_beast2_pkg_installed("Beasy") ## End(Not run)
## Not run: is_beast2_pkg_installed("Beasy") ## End(Not run)
Uninstall a BEAST2 package
uninstall_beast2_pkg( name, beast2_folder = beastier::get_default_beast2_folder(), verbose = FALSE, has_internet = curl::has_internet() )
uninstall_beast2_pkg( name, beast2_folder = beastier::get_default_beast2_folder(), verbose = FALSE, has_internet = curl::has_internet() )
name |
the package's name |
beast2_folder |
the folder where the BEAST2 is installed. Note that this is not the folder where the BEAST2 executable is installed: the BEAST2 executable is in a subfolder. Use get_default_beast2_folder to get the default BEAST2 folder. Use get_default_beast2_bin_path to get the full path to the default BEAST2 executable. Use get_default_beast2_jar_path to get the full path to the default BEAST2 jar file. |
verbose |
set to TRUE for extra output, as can be used in debugging |
has_internet |
boolean to indicate if the user has access to the
internet. By default, this value equals the result
of |
nothing. It does install the BEAST2 package
Installing or uninstalling a BEAST2 package for a (singular) BEAST2 installation, does so for all BEAST2 installations
Richèl J.C. Bilderbeek
## Not run: uninstall_beast2_pkg("Beasy") ## End(Not run)
## Not run: uninstall_beast2_pkg("Beasy") ## End(Not run)