| Title: | Anatomical and Clinical Knowledge Graph for Physiological Data |
|---|---|
| Description: | Centralized annotation hub providing anatomical ontology, muscle/bone metadata, nerve innervation, clinical codes (ICD-10, ICF), and knowledge graph queries for the physio-ecosystem. |
| Authors: | Yusuke Matsui [aut, cre] |
| Maintainer: | Yusuke Matsui <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.1 |
| Built: | 2026-10-03 13:41:30 UTC |
| Source: | https://github.com/x-biosignal/PhysioAnnotationHub |
Get bone annotations
getBoneAnnotation(bones = NULL, hub = NULL, fuzzy = TRUE)getBoneAnnotation(bones = NULL, hub = NULL, fuzzy = TRUE)
bones |
Character vector of bone names (NULL for all) |
hub |
AnnotationHub object |
fuzzy |
Logical; use fuzzy matching (default TRUE) |
data.frame of bone annotations
getBoneAnnotation("Occipital")getBoneAnnotation("Occipital")
Get clinical codes for muscles
getClinicalCodes(muscles, system = c("icd10", "icf"), hub = NULL)getClinicalCodes(muscles, system = c("icd10", "icf"), hub = NULL)
muscles |
Character vector of muscle names |
system |
Character; "icd10" or "icf" (default "icd10") |
hub |
AnnotationHub object |
data.frame of matching clinical codes
getClinicalCodes("Rectus abdominis", system = "icd10")getClinicalCodes("Rectus abdominis", system = "icd10")
Returns the categories of a published WHO ICF Core Set for a health condition. Currently the Brief ICF Core Set for Stroke (Geyh 2004) is bundled; the data are the officially published category lists, not derived.
getCoreSet(condition, level = c("brief", "comprehensive"), hub = NULL)getCoreSet(condition, level = c("brief", "comprehensive"), hub = NULL)
condition |
Condition name (e.g. |
level |
|
hub |
Optional |
A data frame of ICF categories (icf_code, category_title,
component, ...) for the requested Core Set.
Geyh et al. 2004, ICF Core Sets for Stroke; ICF Research Branch.
[icfCategories()], [tagICF()]
getCoreSet("Stroke")getCoreSet("Stroke")
Get muscle annotations
getMuscleAnnotation(muscles = NULL, hub = NULL, fuzzy = TRUE)getMuscleAnnotation(muscles = NULL, hub = NULL, fuzzy = TRUE)
muscles |
Character vector of muscle names (NULL for all) |
hub |
AnnotationHub object |
fuzzy |
Logical; use fuzzy matching (default TRUE) |
data.frame of muscle annotations
getMuscleAnnotation("Trapezius") nrow(getMuscleAnnotation()) # the whole muscle tablegetMuscleAnnotation("Trapezius") nrow(getMuscleAnnotation()) # the whole muscle table
Get nerve annotations
getNerveAnnotation(nerves = NULL, hub = NULL)getNerveAnnotation(nerves = NULL, hub = NULL)
nerves |
Character vector of nerve names (NULL for all) |
hub |
AnnotationHub object |
data.frame of nerve annotations
getNerveAnnotation("Accessory")getNerveAnnotation("Accessory")
Resolves ICF category codes to their titles (across the hub's Core-Set, metric-link, and clinical ICF tables).
icfCategories(codes, hub = NULL)icfCategories(codes, hub = NULL)
codes |
A character vector of ICF codes (e.g. |
hub |
Optional |
A data frame with icf_code and title (NA title
for an unknown code).
[getCoreSet()], [tagICF()]
icfCategories(c("b730", "d450"))icfCategories(c("b730", "d450"))
Tests whether a set of muscles is enriched for specific annotations (actions, innervation, body regions) compared to the full set.
kgEnrichment( muscles, annotation_type = c("action", "nerve", "body_region", "spinal_level"), hub = NULL )kgEnrichment( muscles, annotation_type = c("action", "nerve", "body_region", "spinal_level"), hub = NULL )
muscles |
Character vector of muscle names (query set) |
annotation_type |
Character; "action", "nerve", "body_region", "spinal_level" |
hub |
AnnotationHub object |
data.frame with term, count, expected, fold_enrichment, p_value
kgEnrichment( c("Trapezius", "Latissimus Dorsi", "Serratus Posterior Superior"), annotation_type = "body_region" )kgEnrichment( c("Trapezius", "Latissimus Dorsi", "Serratus Posterior Superior"), annotation_type = "body_region" )
Get KG neighbors of an entity
kgNeighbors(entity, depth = 1, hub = NULL)kgNeighbors(entity, depth = 1, hub = NULL)
entity |
Character; entity name |
depth |
Integer; traversal depth (default 1) |
hub |
AnnotationHub object |
data.frame of all triples within depth hops
head(kgNeighbors("Trapezius"))head(kgNeighbors("Trapezius"))
Find shortest path between two entities in the KG
kgShortestPath(from, to, hub = NULL, max_depth = 5)kgShortestPath(from, to, hub = NULL, max_depth = 5)
from |
Character; source entity name |
to |
Character; target entity name |
hub |
AnnotationHub object |
max_depth |
Integer; maximum search depth (default 5) |
List with path (entities), predicates, and depth
kgShortestPath("Trapezius", "External Occipital Protuberance")kgShortestPath("Trapezius", "External Occipital Protuberance")
Like [tagICF()] but returns a data frame with the ICF code and its title, suitable for annotating a clinical outcome measure.
linkInstrumentToICF(instrument_id, hub = NULL)linkInstrumentToICF(instrument_id, hub = NULL)
instrument_id |
A clinical instrument identifier (e.g. |
hub |
Optional |
A data frame with instrument_id, icf_code,
icf_title (zero rows, with a warning, if unmapped).
[tagICF()]
linkInstrumentToICF("berg")linkInstrumentToICF("berg")
Loads all annotation data into a cached environment for fast repeated queries.
loadAnnotationHub(reload = FALSE)loadAnnotationHub(reload = FALSE)
reload |
Logical; force reload even if cached (default FALSE) |
An AnnotationHub object (list) with muscle, bone, nerve, kg, clinical data
hub <- loadAnnotationHub() hubhub <- loadAnnotationHub() hub
Print method for PhysioAnnotationHub
## S3 method for class 'PhysioAnnotationHub' print(x, ...)## S3 method for class 'PhysioAnnotationHub' print(x, ...)
x |
A PhysioAnnotationHub object |
... |
Additional arguments (ignored) |
Invisibly returns x
Query the Knowledge Graph by triple pattern
queryKG( subject = NULL, predicate = NULL, object = NULL, hub = NULL, exact = FALSE )queryKG( subject = NULL, predicate = NULL, object = NULL, hub = NULL, exact = FALSE )
subject |
Character or NULL; entity name pattern (grep) |
predicate |
Character or NULL; relation type (exact or grep) |
object |
Character or NULL; target entity pattern (grep) |
hub |
AnnotationHub object (loaded if NULL) |
exact |
Logical; use exact matching instead of grep (default FALSE) |
data.frame of matching triples
# All triples with Trapezius as the subject: head(queryKG(subject = "Trapezius"))# All triples with Trapezius as the subject: head(queryKG(subject = "Trapezius"))
Returns the WHO ICF category codes linked to a physiological metric or clinical instrument, using the packaged metric-to-ICF map (built with the Cieza 2005 ICF linking rules). Matching is case-insensitive.
tagICF(metric, hub = NULL)tagICF(metric, hub = NULL)
metric |
A metric / instrument identifier (e.g. |
hub |
Optional |
A character vector of ICF codes (empty, with a warning, if unmapped).
WHO ICF; Cieza et al. 2005 (ICF linking rules).
[linkInstrumentToICF()], [getCoreSet()], [icfCategories()]
tagICF("gait_speed") tagICF("FMA_UE")tagICF("gait_speed") tagICF("FMA_UE")