Functions to support other functions.

cache_dir(package = "KGExplorer")

example_dat(
  types = c("omim_id", "orphanet_id", "decipher_id", "hpo_id", "gene"),
  rm_types = NULL
)

get_data(
  file,
  tag = "latest",
  repo = "neurogenomics/KGExplorer",
  save_dir = cache_dir(),
  add_version = FALSE,
  overwrite = TRUE
)

messager(..., v = Sys.getenv("VERBOSE") != "FALSE", parallel = FALSE)

report_filter(g1, g2, cols, suffix = "remain after filtering.")

report_missing(dat, id_col, report_col)

stopper(..., v = TRUE)

Arguments

package

a character string giving the name of an R package

types

Types of IDs to include in the data.

file

name or vector of names of files to be downloaded. If NULL, all assets attached to the release will be downloaded.

tag

tag for the GitHub release to which this data should be attached.

repo

Repository name in format "owner/repo". Defaults to guess_repo().

save_dir

Directory to save data to.

add_version

Add the release version to the returned object's attributes

overwrite

Should any local files of the same name be overwritten? default TRUE.

v

Whether to print messages or not.

parallel

Whether to enable message print when wrapped in parallelised functions.

Value

Merged data.

Cache directory path.

data.table

Path to downloaded file or the object itself (when ".rds" format).

Null

Null

Functions

  • cache_dir(): utils_ Cache directory

    Provides the path to the package-wide cache directory.

  • example_dat(): utils_ Example data

    Construct an example data.table containing diseases, phenotype, and/or genes.

  • get_data(): utils_ Get remote data

    Download remotely stored data via pb_download.

  • messager(): utils_ Print messages

    Conditionally print messages. Allows developers to easily control verbosity of functions, and meet Bioconductor requirements that dictate the message must first be stored to a variable before passing to message.

  • report_filter(): utils_

  • report_missing(): utils_

  • stopper(): utils_ Stop messages

    Conditionally print stop messages. Allows developers to easily control verbosity of functions, and meet Bioconductor requirements that dictate the stop message must first be stored to a variable before passing to stop.

Examples

save_dir <- cache_dir
dat <- example_dat()