Type: | Package |
Title: | Work with 'BEAST2' Packages |
Version: | 2.5.4 |
Maintainer: | Richèl J.C. Bilderbeek <rjcbilderbeek@gmail.com> |
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'. |
License: | GPL-3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
Imports: | stringr, beastier (≥ 2.5) |
Suggests: | beautier (≥ 2.6.11), curl, knitr, rmarkdown, testthat (≥ 2.1.0), tracerer |
VignetteBuilder: | knitr |
URL: | https://docs.ropensci.org/mauricer/ (website) https://github.com/ropensci/mauricer |
BugReports: | https://github.com/ropensci/mauricer/issues |
SystemRequirements: | BEAST2 (https://www.beast2.org/) |
NeedsCompilation: | no |
Packaged: | 2024-06-10 15:47:03 UTC; richel |
Author: | Richèl J.C. Bilderbeek
|
Repository: | CRAN |
Date/Publication: | 2024-06-11 12:10:02 UTC |
mauricer: Install BEAST2 packages.
Description
'BEAST2' (<http://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.
Details
'BEAST2' is commonly accompanied by 'BEAUti 2' (<http://www.beast2.org>), which, among others, allows one to install 'BEAST2' package. This package allows to install 'BEAST2' packages from 'R'.
* get_beast2_pkg_names: get the names of all BEAST2 packages * install_beast2_pkg: install a BEAST2 package * is_beast2_pkg_installed: determine if a BEAST2 package is installed * uninstall_beast2_pkg: uninstall a BEAST2 package
Author(s)
Richèl J.C. Bilderbeek
See Also
mauricer is part of the babette
package suite:
-
babette
: work with BEAST2 -
beautier: create BEAST2 input files
-
beastier: run BEAST2
-
mauricer: install BEAST2 packages
-
tracerer: parse and analyse BEAST2 output
This function does nothing. It is intended to inherit is parameters' documentation.
Description
This function does nothing. It is intended to inherit is parameters' documentation.
Usage
default_params_doc(beast2_folder, has_internet, name, show_warnings, verbose)
Arguments
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 |
Note
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
Author(s)
Richèl J.C. Bilderbeek
Get all BEAST2 package names
Description
List all BEAST2 packages that are available and installed. Will stop if there is no internet connection
Usage
get_beast2_pkg_names(
beast2_folder = beastier::get_default_beast2_folder(),
has_internet = curl::has_internet(),
verbose = FALSE
)
Arguments
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 |
Value
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 installedlatest_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 dependenciesdescription description of the package, for example
Nested sampling for model selection and posterior inference
Author(s)
Richèl J.C. Bilderbeek
Examples
if (beastier::is_beast2_installed() && curl::has_internet()) {
get_beast2_pkg_names()
}
Get the full path of a mauricer
file
Description
Get the full path of a file in the inst/extdata
folder.
If there is no mauricer
file, get_mrc_path will stop.
Usage
get_mrc_path(filename)
Arguments
filename |
the file's name, without the path |
Value
the full path of the filename, if and only if the file is present. Will stop otherwise.
Author(s)
Richèl J.C. Bilderbeek
See Also
for more files, use get_mrc_paths
Examples
get_mrc_path("anthus_aco_sub.fas")
Get the full path of one or more mauricer
files
Description
Get the full paths of files in the inst/extdata
folder
If there is a mauricer
file absent,
get_mrc_paths will stop.
Usage
get_mrc_paths(filenames)
Arguments
filenames |
the files' names, without the path |
Value
the filenames' full paths
Author(s)
Richèl J.C. Bilderbeek
See Also
for one file, use get_mrc_path
Examples
get_mrc_paths(c("anthus_aco_sub.fas", "anthus_nd2_sub.fas"))
Install a BEAST2 package
Description
Install a BEAST2 package. If the package is already installed, (see is_beast2_pkg_installed), this function stops.
Usage
install_beast2_pkg(
name,
beast2_folder = beastier::get_default_beast2_folder(),
verbose = FALSE,
has_internet = curl::has_internet()
)
Arguments
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 |
Value
nothing. It does install the BEAST2 package
Note
Installing or uninstalling a BEAST2 package for a (singular) BEAST2 installation, does so for all BEAST2 installations
Author(s)
Richèl J.C. Bilderbeek
Examples
## Not run:
install_beast2_pkg("NS")
## End(Not run)
Is the BEAST2 NS package installed?
Description
Determine if the BEAST2 NS package is installed.
Usage
is_beast2_ns_pkg_installed(
show_warnings = FALSE,
verbose = FALSE,
beast2_folder = beastier::get_default_beast2_folder()
)
Arguments
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. |
Details
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.
Value
TRUE if the BEAST2 NS package is installed, FALSE otherwise
Author(s)
Richèl J.C. Bilderbeek
Examples
## Not run:
is_beast2_ns_pkg_installed()
## End(Not run)
Is a BEAST2 package installed?
Description
Checks if a BEAST2 package is installed.
Usage
is_beast2_pkg_installed(
name,
beast2_folder = beastier::get_default_beast2_folder(),
has_internet = curl::has_internet()
)
Arguments
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 |
Details
To be able to check this, an internet connection is needed.
Without an internet connection, NULL
is returned.
Value
-
TRUE
if the BEAST2 package is installed -
FALSE
if the BEAST2 package is not installed -
NULL
if there is no internet connection
Author(s)
Richèl J.C. Bilderbeek
See Also
Use is_beast2_ns_pkg_installed to see if the NS package is installed without an internet connection
Examples
## Not run:
is_beast2_pkg_installed("Beasy")
## End(Not run)
Uninstall a BEAST2 package
Description
Uninstall a BEAST2 package
Usage
uninstall_beast2_pkg(
name,
beast2_folder = beastier::get_default_beast2_folder(),
verbose = FALSE,
has_internet = curl::has_internet()
)
Arguments
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 |
Value
nothing. It does install the BEAST2 package
Note
Installing or uninstalling a BEAST2 package for a (singular) BEAST2 installation, does so for all BEAST2 installations
Author(s)
Richèl J.C. Bilderbeek
Examples
## Not run:
uninstall_beast2_pkg("Beasy")
## End(Not run)