Tests whether a set of muscles is enriched for specific anatomical or functional annotations (actions, nerves, body regions, spinal levels) compared to the full background set of muscles in the hypergraph.
Usage
mskEnrichKG(
muscles,
annotation_type = c("action", "nerve", "body_region", "spinal_level"),
hub = NULL,
hg = NULL
)Value
A data.frame with columns:
- term
Annotation term
- count
Number of query muscles with this term
- background_count
Number of background muscles with this term
- expected
Expected count under null
- fold_enrichment
Ratio of observed to expected
- p_value
P-value from hypergeometric test
- significant
Logical, TRUE if p < 0.05
Clinical Validity
Enrichment analysis depends on the completeness and accuracy of the underlying knowledge graph annotations. P-values are not adjusted for multiple testing; consider applying Bonferroni or FDR correction when testing multiple annotation types simultaneously.
Examples
if (requireNamespace("PhysioAnnotationHub", quietly = TRUE)) {
enrichment <- mskEnrichKG(c("Biceps Brachii", "Deltoid", "Trapezius"),
annotation_type = "nerve")
enrichment[enrichment$significant, ]
}
#> term count total_in_background expected fold_enrichment
#> 1 Accessory Nerve (XI) 1 2 0.02222222 45
#> 2 Axillary Nerve 1 2 0.02222222 45
#> 3 Musculocutaneous Nerve 1 3 0.03333333 30
#> p_value significant
#> 1 0.02213961 TRUE
#> 2 0.02213961 TRUE
#> 3 0.03308581 TRUE