Title: | Manages 'patRoon' Installations |
---|---|
Description: | Installs and updates patRoon and its dependencies. |
Authors: | Rick Helmus |
Maintainer: | Rick Helmus <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2024-10-26 04:10:38 UTC |
Source: | https://github.com/rickhelmus/patRoonInst |
Installs and updates patRoon and its dependencies.
The following package options (see options()
) can be set:
patRoonInst.repos.patRoonDeps
The URL to the patRoonDeps
R package repository.
patRoonInst.repos.runiverse
The URL to the r-universe R package repository.
patRoonInst.path.legacy
The directory where legacy files were installed.
Useful links:
Report bugs at https://github.com/rickhelmus/patRoon/issues
Returns information for patRoon and its direct R package dependencies.
getDirectDeps()
getDirectDeps()
The information returned by this function may change over time, and is downloaded from the internet.
A list
with miscellaneous package information.
Functions to install, update and synchronize patRoon and its dependencies from various repositories.
install( pkgs = NULL, ignorePkgs = NULL, origin = NULL, lib.loc = NULL, ask = TRUE, force = FALSE, quiet = TRUE ) update( pkgs = NULL, ignorePkgs = NULL, origin = NULL, lib.loc = NULL, ask = TRUE, quiet = TRUE ) sync( pkgs = NULL, ignorePkgs = NULL, origin = NULL, lib.loc = NULL, allDeps = FALSE, ask = TRUE, quiet = TRUE )
install( pkgs = NULL, ignorePkgs = NULL, origin = NULL, lib.loc = NULL, ask = TRUE, force = FALSE, quiet = TRUE ) update( pkgs = NULL, ignorePkgs = NULL, origin = NULL, lib.loc = NULL, ask = TRUE, quiet = TRUE ) sync( pkgs = NULL, ignorePkgs = NULL, origin = NULL, lib.loc = NULL, allDeps = FALSE, ask = TRUE, quiet = TRUE )
pkgs , ignorePkgs
|
A |
origin |
Where patRoon and its R dependencies are installed from. Valid values are: |
lib.loc |
The path to the R library where packages will be installed. Set to |
ask |
Set to |
force |
If |
quiet |
If |
allDeps |
Consider all dependencies when synchronizing, including recursive dependencies. This is currently
only supported for |
The installation of patRoon involves installing several dependencies, including R packages not available from common repositories (CRAN, BioConductor) and software outside the R environment. The following three functions automate this process and are used to install and maintain patRoon and its dependencies:
install()
Installs patRoon and any missing dependencies.
update()
Like install()
and updates outdated packages.
sync()
Like update()
but may also downgrade packages to fully synchronize package versions with the repository.
The R packages are currently sourced from the following repositories (set by the origin
argument):
"patRoonDeps"
: a specialized miniCRAN repository contains binary R packages with versions that are automatically tested with patRoon. Currently this is only supported for Windows.
"runiverse"
: an r-universe repository containing the latest versions of patRoon and its dependencies.
"regular": the last versions are sourced from regular CRAN/BioConductor repositories and GitHub. The latter means that suitable build tools (e.g. Rtools on windows).
Note that some large R packages, currently patRoonDeps
, patRoonExt
and MetaCleanData
, are always sourced
directly from GitHub.
Synchronization with sync()
was mainly designed to be used in combination with the patRoonDeps
repository, since
it contains package versions already tested with patRoon
. Doing a synchronization is most commonly used with
patRoon bundle installations or when patRoon is installed in a separate R library (i.e. using the
lib.loc
argument). Furthermore, the allDeps
argument should be set to TRUE
to ensure all dependencies are
synchronized.
Packages that originate from GitHub (even when obtained via patRoonDeps
/runiverse
) will also be synchronized
with update()
, since these packages typically involve 'snapshots' with unreliable version information.
All functions return NULL
invisibly.
Toggles or removes installations of patRoon that were installed by the
legacy installation script (install_patRoon.R
).
toggleLegacy(enable = NULL, ask = TRUE) removeLegacy(restoreRProfile = FALSE, ask = TRUE)
toggleLegacy(enable = NULL, ask = TRUE) removeLegacy(restoreRProfile = FALSE, ask = TRUE)
enable |
Enables ( |
ask |
Set to |
restoreRProfile |
If |
Previous versions of patRoon (<2.3
) could be installed via a (now legacy) installation R script
(install_patRoon.R
). The functions documented here can (temporarily) undo the changes by this script, so that the
installation functions in this package can be used to manage patRoon installations.
The toggleLegacy()
function is used to enable or disable legacy installations temporarily.
The removeLegacy()
function is used to undo legacy installations.
All functions return NULL
invisibly.
This section is purely informative, but may be of use when you want to manually manage legacy installations.
The legacy installation script typically results in the following changes:
~/patRoon-install
: a directory with external dependencies (MetFrag
, SIRIUS
, ...) and may contain R packages from the patRoonDeps
repository depending on user input during the installation.
~/.Rprofile-patRoon.R
: An R script that should be loaded during R startup, and initializes the configuration needed to use the files (1).
Code in ~/.Rprofile
to actually load (2) on R startup (only if it exists)
When toggleLegacy()
is used to disable legacy installations the function simply renames the initialization script
(2) so it won't be loaded on R startup. The removeLegacy()
function removes the files from (1-2) and optionally
the changes from (3).
The R session should be restarted to make the changes effective.