Mapping of HPO disease IDs (disease_id) to OMOP concepts (OMOP_ID).
disease_id_to_omop
An object of class data.table
(inherits from data.frame
) with 5354 rows and 3 columns.
annot <- load_phenotype_to_genes(3)
input_col <- "disease_id"
## NOTE: must keep batch_size=1 as the OARD API returns results only for
## the IDs it can map. This leads to a mismatch between the input and output
## which is exacerbated that the concept_id is automatically converted to
## MONDO IDs for some reason, without any way to map back to the original
## input ID...
disease_id_to_omop <- oard_query_api(ids = annot$disease_id, workers=10,
batch_size=1)
data.table::setnames(disease_id_to_omop,
toupper(gsub("concept_","OMOP_",names(disease_id_to_omop)))
)
data.table::setnames(disease_id_to_omop,"QUERY",input_col)
disease_id_to_omop <- disease_id_to_omop[,c(input_col,"OMOP_ID","OMOP_NAME"),
with=FALSE]
usethis::use_data(disease_id_to_omop, overwrite = TRUE)
@format data.table
@usage data("disease_id_to_omop")