PhysioAnnotationHub is a
lightweight, base-R-only annotation hub for the PhysioExperiment
ecosystem. It bundles curated anatomical ontology data (muscles, bones,
nerves), clinical codes (ICD-10, ICF), and an anatomical knowledge graph
as CSV files under inst/extdata. Everything here runs
offline – nothing is downloaded at run time.
library(PhysioAnnotationHub)
#> PhysioAnnotationHub v0.2.1 - Anatomical Knowledge Graph for Physio-EcosystemloadAnnotationHub() reads all bundled datasets into one
cached object; printing it summarises what is available.
Look up a muscle, bone, or nerve by name (matching is case-insensitive and fuzzy); call a getter with no arguments to get the whole table.
getMuscleAnnotation("Trapezius")[, c("muscle_name", "body_region",
"action_primary", "nerve")]
#> muscle_name body_region action_primary nerve
#> 1 Trapezius trunk scapular_elevation Accessory Nerve (XI)
getNerveAnnotation("Accessory")
#> nerve_name spinal_levels type body_region plexus
#> 1 Accessory Nerve (XI) C3-C4 cranial neck cranial_nervesClinical codes that reference a muscle:
Anatomical relationships are stored as subject-predicate-object triples. Query them by any combination of the three slots:
head(queryKG(subject = "Trapezius"))
#> subject predicate object evidence_type
#> 1 Trapezius attaches_to External Occipital Protuberance anatomy_textbook
#> 2 Trapezius attaches_to Ligamentum Nuchae anatomy_textbook
#> 3 Trapezius attaches_to C7 anatomy_textbook
#> 4 Trapezius attaches_to T1 anatomy_textbook
#> 5 Trapezius attaches_to T2 anatomy_textbook
#> 6 Trapezius attaches_to T3 anatomy_textbookTraverse the graph – neighbours within N hops, or the shortest path between two entities:
nrow(kgNeighbors("Trapezius"))
#> [1] 27
kgShortestPath("Trapezius", "External Occipital Protuberance")
#> $path
#> [1] "Trapezius" "External Occipital Protuberance"
#>
#> $predicates
#> [1] "attaches_to"
#>
#> $depth
#> [1] 1
#>
#> $found
#> [1] TRUEOver-representation analysis asks whether a muscle set is enriched for an annotation (here, body region) relative to the full hub:
Map a physiological metric or clinical instrument to WHO ICF categories, or pull a published ICF Core Set:
?loadAnnotationHub – the hub object and its
tables.?queryKG, ?kgShortestPath,
?kgEnrichment – graph queries.?tagICF, ?getCoreSet – ICF linking.This hub is designed to be imported by other ecosystem packages (e.g. PhysioMSKNet) that need anatomical metadata without carrying their own copy.