tidygenclusttgc_tools_install.Rdtidygenclust relies on ADMIXTURE 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 environments, ctidygenclust (for fastmixture and
admixture) and cclumppling (for clumppling). Additionally, for silicon
Macs, ADMIXTURE is installed in a separate conda environment
cadmixture86, as it is only available for OSX as x86 in bioconda.
tgc_tools_install(
reset = FALSE,
fastmixture_hash = "1f03a8980be4872341e5faca9d6f2dfc7ccbfe35",
clumppling_hash = "2d24e0b2f6ddfcb51a436df96a06d5f57d18d20a",
conda_yaml = "auto",
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 vector of string with the path for the yaml files used
for installation (one for fastmixture, one for clumppling, and, for osx
only, one for admixture in 86 compatibility model). The value of each
string can either be "auto" (the default, select the latest available yaml
that has been tested to work on a given operating system), NULL (let conda
attempt to install the latest available packages from the internet), or a
path to a specific conda yaml found in "inst/env_snapshots". For "auto" or
NULL, it is also possible to provide a vector of lenght one, and the value
will apply to all the conda environments (e.g. conda_yaml="auto" is
equivalent to conda_yaml = c("auto", "auto") in linux and
conda_yaml = c("auto", "auto", "auto").
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