Get Open Targets disease-gene associations data NOTE: If you get an error like " Cannot call parquet...", try running arrow::install_arrow, restarting the R session, and trying again.

get_opentargets(
  release = "latest",
  data_type = c("associationByDatasourceDirect", "associationByDatasourceIndirect",
    "associationByDatatypeDirect", "associationByDatatypeIndirect",
    "associationByOverallDirect", "associationByOverallIndirect", "l2g")[1],
  server = "https://ftp.ebi.ac.uk/pub/databases/opentargets/",
  subdir = c("platform/", "genetics/")[1],
  subdir2 = c("/output/etl/parquet/", "/")[1],
  ftp = paste0(server, subdir, release, subdir2, data_type[1], "/"),
  save_dir = cache_dir(),
  max_files = NULL,
  workers = 1,
  force_new = FALSE
)

Arguments

release

Open Targets release version.

data_type

Type of data to download.

server

Open Targets server.

subdir

Open Targets subdirectory.

subdir2

Open Targets sub-subdirectory.

ftp

The final Open Targets FTP URL.

save_dir

Directory to save a file to.

max_files

Limit the number of files to import

workers

Number (>1) or proportion (<1) of worker cores to use.

force_new

If TRUE, force a new download.

Examples

if (FALSE) { # \dontrun{
d <- get_opentargets(max_files=2, save_dir=tempdir())
} # }