Skip to contents

load_eplet_registry() returns a dataframe with the HLA Eplet Registry table, which maps HLA alleles to eplets. If no local copy exists, the function will prompt you whether you want to scrape the online registry to download a fresh copy.

Usage

load_eplet_registry(
  folder_path = NULL,
  filename = "eplets.rds",
  print_version = TRUE,
  return_path = FALSE,
  delete = FALSE
)

Arguments

folder_path

Character path to the folder where the previously downloaded table is stored, or where you want a new version to be stored. Defaults to the R user cache directory.

filename

Character filename for the table.

print_version

Logical indicating whether to print message with version information when loading the table. Turn this off by setting to FALSE.

return_path

Logical indicating whether to return the folder path rather than the data frame.

delete

Logical indicating whether to delete the cached Eplet Registry.

Value

Either a data frame containing the Eplet Registry (default) or a character string giving the path to the folder where it is/will be stored (if return_path = TRUE).

Details

Currently incorporates only the HLA tables (A/B/C, DRB, DQ, DP and Interlocus), not MICA.

N.B. Several eplets occur in multiple locus groups. Currently, these are:

  • 26L, 30H, 37YV, 57V, 77T (DQ, DRB)

  • 28D, 57D (DP, DRB)

  • 76V (DP, DQ)

  • 30G, 77N (ABC, DRB)

  • 56E, 9H (ABC, DP)

  • 9F (ABC, DQ)

  • 9Y (ABC, DP, DQ)

These eplet names are de-duplicated by adding the locus group in square brackets. For example, the returned dataframe contains 2 eplets with name 76V: 76V[DP] and 76V[DQ].

See also

  • lookup_alleles() for a helper function that takes in eplets and looks up the HLA alleles they occur on in the registry

  • lookup_eplets() for a helper function that takes in alleles and looks up which eplets occur on them in the registry

Examples

if (FALSE) { # \dontrun{
# (Down)load the eplet registry (to/)from the default path
df_eplets <- load_eplet_registry()
# Return the location of the default path
load_eplet_registry(return_path = TRUE)
# (Down)load the eplet registry (to/)from a custom path and a custom filename
df_eplets <- load_eplet_registry("~/eplet_registry", "eplet_table.rds")
# Delete the saved table
load_eplet_registry("~/eplet_registry", "eplet_table.rds", delete = TRUE)
} # }