Skip to contents

Each `document_conda_*()` function runs `conda env export` for the matching environment created by a [setup_conda] function, prints the result, and optionally writes it to a YAML file so the environment can be recreated with `conda env create -f <file>`.

Usage

document_conda_sra(
  env_name = "sra_env",
  write_yml = FALSE,
  dir = "methods",
  file = paste0(env_name, ".yml")
)

document_conda_sylph(
  env_name = "sylph_env",
  write_yml = FALSE,
  dir = "methods",
  file = paste0(env_name, ".yml")
)

document_conda_sourmash(
  env_name = "smash_env",
  write_yml = FALSE,
  dir = "methods",
  file = paste0(env_name, ".yml")
)

document_conda_funprofiler(
  env_name = "funprofiler_env",
  write_yml = FALSE,
  dir = "methods",
  file = paste0(env_name, ".yml")
)

document_conda_rgi(
  env_name = "rgi_env",
  write_yml = FALSE,
  dir = "methods",
  file = paste0(env_name, ".yml")
)

Arguments

env_name

Name of the conda environment to export.

write_yml

If `TRUE`, write the export to `<dir>/<file>`.

dir

Directory to save the YAML file in when `write_yml` is `TRUE`. Created if needed. Defaults to `methods/` in the working directory.

file

Name of the YAML file to write in `dir`. Defaults to `<env_name>.yml`.

Value

The lines of the environment export, invisibly.

Examples

if (FALSE) { # \dontrun{
document_conda_sra()
# writes methods/sylph_env.yml
document_conda_sylph(write_yml = TRUE)

# writes envs/sra.yml
document_conda_sra(write_yml = TRUE, dir = "envs", file = "sra.yml")
} # }