Construct a yaml file to be used for building a given conda environment.

construct_conda_yml(
  name = "test",
  channels = list("conda-forge", "nodefaults"),
  dependencies = list(),
  pip = NULL,
  save_path = here::here(paste0(name, "_conda.yml")),
  return_path = TRUE,
  preview = FALSE,
  verbose = TRUE
)

Arguments

name

Name of conda env.

channels

conda channels to use.

dependencies

Packages to install via conda.

pip

Packages to install via pip.

save_path

Path to save the yaml file to.

return_path

Return the path to the saved yaml workflow file (default: TRUE), or return the yaml object directly.

preview

Print the yaml file to the R console.

verbose

Print messages.

Value

description

Path or yaml object.

Examples

yml <- construct_conda_yml(name="myenv",
                           dependencies=c("anndata","scanpy"),
                           return_path = FALSE,  
                           ## Writing to temp only for example
                           save_path=tempfile(fileext="myenv_conda.yml"))
#> Saving yaml ==> /tmp/RtmppaN4bb/file11e2144aaf25myenv_conda.yml