map_ontology: Map terms to biomedical ontologies

View source: R/text_preprocessing.R

map_ontologyR Documentation

Map terms to biomedical ontologies

Description

This function maps terms to standard biomedical ontologies like MeSH or UMLS.

Usage

map_ontology(
  terms,
  ontology = c("mesh", "umls"),
  api_key = NULL,
  fuzzy_match = FALSE,
  similarity_threshold = 0.8,
  mesh_query = NULL,
  semantic_types = NULL,
  dictionary_type = "disease"
)

Arguments

terms

Character vector of terms to map

ontology

Character string. The ontology to use: "mesh" or "umls"

api_key

UMLS API key (required if ontology = "umls")

fuzzy_match

Logical. If TRUE, allows fuzzy matching of terms

similarity_threshold

Numeric between 0 and 1. Minimum similarity for fuzzy matching

mesh_query

Additional query to filter MeSH terms (only if ontology = "mesh")

semantic_types

Vector of semantic types to filter UMLS results

dictionary_type

Type of dictionary to use ("disease", "drug", "gene", etc.)

Value

A data frame with mapped terms and ontology identifiers


LBDiscover documentation built on June 16, 2025, 5:09 p.m.