tidygenclust 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
)

Arguments

reset

a boolean used to reset the virtual environment. Only set to TRUE if you have a broken virtual environment that you want to reset.

fastmixture_hash

a string with the commit hash of the fastmixture version to install. Default is the latest tested version.

clumppling_hash

a string with the commit hash of the clumppling version to install. Default is the latest tested version.

conda_method

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.

ci_install

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.

Details

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++"