DO_similarity.Rd
Calculate Disease Ontology (DO) semantic similarity matrix
DO_similarity(do_id, measure = "Rel", remove_orphan_terms = FALSE)
A vector of DO IDs.
Semantic measure for the DO similarity, pass to doSim
.
Whether to remove terms that have zero similarity to all other terms?
This function is basically a wrapper on doSim
.
A symmetric matrix.
# \donttest{
require(DOSE)
#> Loading required package: DOSE
#> DOSE v3.22.0 For help: https://yulab-smu.top/biomedical-knowledge-mining-book/
#>
#> If you use DOSE in published research, please cite:
#> Guangchuang Yu, Li-Gen Wang, Guang-Rong Yan, Qing-Yu He. DOSE: an R/Bioconductor package for Disease Ontology Semantic and Enrichment analysis. Bioinformatics 2015, 31(4):608-609
do_id = random_DO(10)
DO_similarity(do_id)
#> DOID:10866 DOID:7148 DOID:9261 DOID:6039 DOID:4723
#> DOID:10866 0.99981201 0.05391662 0.00000000 0.00000000 0.18810902
#> DOID:7148 0.05391662 0.99924803 0.00000000 0.00000000 0.05040555
#> DOID:9261 0.00000000 0.00000000 0.99843339 0.15157864 0.00000000
#> DOID:6039 0.00000000 0.00000000 0.15157864 0.99924803 0.00000000
#> DOID:4723 0.18810902 0.05040555 0.00000000 0.00000000 0.99993734
#> DOID:0050716 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
#> DOID:4265 0.00000000 0.00000000 0.09185844 0.08758367 0.00000000
#> DOID:5059 0.00000000 0.00000000 0.12823668 0.36026812 0.00000000
#> DOID:8305 0.00000000 0.00000000 0.11544095 0.11041858 0.00000000
#> DOID:3203 0.00000000 0.00000000 0.08560452 0.08188020 0.00000000
#> DOID:0050716 DOID:4265 DOID:5059 DOID:8305 DOID:3203
#> DOID:10866 0.0000000 0.00000000 0.00000000 0.00000000 0.00000000
#> DOID:7148 0.0000000 0.00000000 0.00000000 0.00000000 0.00000000
#> DOID:9261 0.0000000 0.09185844 0.12823668 0.11544095 0.08560452
#> DOID:6039 0.0000000 0.08758367 0.36026812 0.11041858 0.08188020
#> DOID:4723 0.0000000 0.00000000 0.00000000 0.00000000 0.00000000
#> DOID:0050716 0.9999373 0.00000000 0.00000000 0.00000000 0.00000000
#> DOID:4265 0.0000000 0.99981201 0.07566280 0.07566280 0.28035685
#> DOID:5059 0.0000000 0.07566280 0.99993734 0.09624272 0.07136819
#> DOID:8305 0.0000000 0.07566280 0.09624272 0.99993734 0.07136819
#> DOID:3203 0.0000000 0.28035685 0.07136819 0.07136819 0.99993734
#> attr(,"measure")
#> [1] "Rel"
#> attr(,"ontology")
#> [1] "DO"
# }