tidygenclusttgc_tools_install.Rdtidygenclust relies on the admxiture and on python packages fastmixture
and clumppling for a number of
functionalities. We use reticulate to install them in conda
environments. As their dependencies are incompatible, we use two separate
conda environment, ctidygenclust (for fastmixture and admixture) and
cclumppling (for clumppling).
tgc_tools_install(
reset = FALSE,
fastmixture_hash = "f913014669f4a235a1150669d4fbf0715bef42be",
clumppling_hash = "a4bf351037fb569e2c2cb83c603a1931606d4d40",
conda_method = c("reticulate", "conda_yaml"),
ci_install = FALSE
)a boolean used to reset the virtual environment. Only set to TRUE if you have a broken virtual environment that you want to reset.
a string with the commit hash of the fastmixture
version to install. Default is the latest tested version.
a string with the commit hash of the clumppling
version to install. Default is the latest tested version.
a string indicating the method to create the environment
used for fastmixture. Default is reticulate, which uses the
reticulate::conda_run2() function to run the installation commands (this is
the default, and the only method for Linux.
Alternatively, for OSX, you can use conda_yaml, which will create a conda
environment directly with conda. Use this second method if "reticulate" fails
whilst trying to install on OSX.
a boolean indicating if the installation is being run on
continuous integration (CI) services. Default is FALSE. If TRUE, the
function will look for the conda yaml file in the inst/python folder
of the package source directory, rather than in the installed package
directory. This is useful when testing the package on CI services.
For each tool, default to the latest tested version of
these packages that have been tested to work with tidegenclust. It is
possible to provide a more recent github commit for a specific tool, but
this might lead to incompatibilities and errors.
We have found installation on OSX to be tricky, so we provide two methods
for installing fastmixture on OSX: reticulate and conda_yaml. The
reticulate method uses the reticulate::conda_run2() function to run
installation commands, while the conda_yaml method creates a conda
environment directly with conda. If the reticulate method fails, you can
use the conda_yaml method to create the environment directly with conda.
For OSX, you might also need to install a suitable compiler for openmp
using brew in bash, setting the correct paths to use it:
brew install llvm libomp
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export CC="/opt/homebrew/opt/llvm/bin/clang"
export CXX="/opt/homebrew/opt/llvm/bin/clang++"