map_disease: Map disease

View source: R/map_disease.R

map_diseaseR Documentation

Map disease

Description

Map disease IDs (e.g. "OMIM:101200") to names (e.g. "Apert syndrome")

Usage

map_disease(
  dat,
  id_col = "disease_id",
  fields = c("disease", "categories", "genes")[1],
  use_api = FALSE,
  return_dat = FALSE,
  workers = NULL,
  all.x = TRUE,
  allow.cartesian = FALSE
)

Arguments

dat

A data.table with a column of disease IDs.

id_col

The name of the column with the disease IDs.

fields

The fields to extract from the API response.

use_api

Use the API to get the disease names and descriptions. Otherwise, use a cached data.table (disease_map).

return_dat

Return the data.table with the mapped fields.

workers

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

all.x

logical; if TRUE, rows from x which have no matching row in y are included. These rows will have 'NA's in the columns that are usually filled with values from y. The default is FALSE so that only rows with data from both x and y are included in the output.

allow.cartesian

See allow.cartesian in [.data.table.

Source

HPO API docs

HPO GitHub Issue

Examples

dat <- HPOExplorer::load_phenotype_to_genes()
out <- map_disease(dat = dat, workers=1)

neurogenomics/HPOExplorer documentation built on Aug. 24, 2024, 1:39 a.m.