diff --git a/404.html b/404.html index 7c6a72d..4544678 100644 --- a/404.html +++ b/404.html @@ -6,7 +6,7 @@ Page not found (404) • KGExplorer - + @@ -18,7 +18,7 @@ - +
@@ -47,7 +47,7 @@
- +
@@ -103,16 +103,16 @@

Page not found (404)

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/articles/KGExplorer.html b/articles/KGExplorer.html index 00705fd..10913f9 100644 --- a/articles/KGExplorer.html +++ b/articles/KGExplorer.html @@ -6,20 +6,19 @@ Get started • KGExplorer - + - - +
@@ -48,7 +47,7 @@
- +
@@ -84,15 +83,15 @@

Get started


-Authors: Brian Schilder
+Authors: Brian Schilder, Hiranyamaya Dash


-Vignette updated: Feb-02-2024
+Vignette updated: Dec-18-2024

- Source: vignettes/KGExplorer.Rmd + Source: vignettes/KGExplorer.Rmd
@@ -113,7 +112,7 @@

Extract disease/phenoty to_categories = c("biolink:Disease", "biolink:PhenotypicFeature"), from_categories = "biolink:Cell") -plot_graph_visnetwork(g2, +plot_graph_visnetwork(g2, selectedBy = "id", label_var = "name", layout = "layout_nicely", @@ -147,7 +146,7 @@

Session Info
 utils::sessionInfo()

-
## R Under development (unstable) (2024-01-23 r85822)
+
## R Under development (unstable) (2024-12-15 r87442)
 ## Platform: x86_64-pc-linux-gnu
-## Running under: Ubuntu 22.04.3 LTS
+## Running under: Ubuntu 24.04.1 LTS
 ## 
 ## Matrix products: default
 ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
-## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
 ## 
 ## locale:
 ##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
@@ -182,80 +181,77 @@ 

Session Info## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: -## [1] KGExplorer_0.99.0 +## [1] KGExplorer_0.99.05 ## ## loaded via a namespace (and not attached): -## [1] grr_0.9.5 rlang_1.1.3 -## [3] magrittr_2.0.3 clue_0.3-65 -## [5] GetoptLong_1.0.5 matrixStats_1.2.0 -## [7] compiler_4.4.0 png_0.1-8 -## [9] systemfonts_1.0.5 vctrs_0.6.5 -## [11] maps_3.4.2 gprofiler2_0.2.2 -## [13] rvest_1.0.3 stringr_1.5.1 -## [15] shape_1.4.6 pkgconfig_2.0.3 -## [17] crayon_1.5.2 fastmap_1.1.1 -## [19] ellipsis_0.3.2 backports_1.4.1 -## [21] utf8_1.2.4 promises_1.2.1 -## [23] rmarkdown_2.25 ragg_1.2.7 -## [25] purrr_1.0.2 xfun_0.41 -## [27] cachem_1.0.8 pals_1.9 -## [29] aplot_0.2.2 jsonlite_1.8.8 -## [31] progress_1.2.3 later_1.3.2 -## [33] cluster_2.1.6 broom_1.0.5 -## [35] parallel_4.4.0 prettyunits_1.2.0 -## [37] R6_2.5.1 rols_2.31.0 -## [39] RColorBrewer_1.1-3 bslib_0.6.1 -## [41] stringi_1.8.3 car_3.1-2 -## [43] jquerylib_0.1.4 Rcpp_1.0.12 -## [45] iterators_1.0.14 knitr_1.45 -## [47] IRanges_2.37.1 httpuv_1.6.14 -## [49] igraph_2.0.1.1 Matrix_1.6-5 -## [51] tidyselect_1.2.0 dichromat_2.0-0.1 -## [53] abind_1.4-5 yaml_2.3.8 -## [55] doParallel_1.0.17 codetools_0.2-19 -## [57] lattice_0.22-5 tibble_3.2.1 -## [59] shiny_1.8.0 Biobase_2.63.0 -## [61] treeio_1.27.0 evaluate_0.23 -## [63] gridGraphics_0.5-1 desc_1.4.3 -## [65] xml2_1.3.6 circlize_0.4.15 -## [67] pillar_1.9.0 ggtree_3.11.0 -## [69] ggpubr_0.6.0 carData_3.0-5 -## [71] stats4_4.4.0 foreach_1.5.2 -## [73] ggfun_0.1.4 plotly_4.10.4 -## [75] generics_0.1.3 S4Vectors_0.41.3 -## [77] hms_1.1.3 ggplot2_3.4.4 -## [79] munsell_0.5.0 scales_1.3.0 -## [81] tidytree_0.4.6 xtable_1.8-4 -## [83] glue_1.7.0 orthogene_1.9.0 -## [85] mapproj_1.2.11 scatterplot3d_0.3-44 -## [87] lazyeval_0.2.2 tools_4.4.0 -## [89] data.table_1.15.0 ggsignif_0.6.4 -## [91] babelgene_22.9 fs_1.6.3 -## [93] tidygraph_1.3.1 grid_4.4.0 -## [95] tidyr_1.3.1 ape_5.7-1 -## [97] colorspace_2.1-0 nlme_3.1-164 -## [99] patchwork_1.2.0 homologene_1.4.68.19.3.27 -## [101] cli_3.6.2 Polychrome_1.5.1 -## [103] textshaping_0.3.7 fansi_1.0.6 -## [105] viridisLite_0.4.2 ComplexHeatmap_2.19.0 -## [107] dplyr_1.1.4 gtable_0.3.4 -## [109] rstatix_0.7.2 yulab.utils_0.1.4 -## [111] sass_0.4.8 digest_0.6.34 -## [113] BiocGenerics_0.49.1 ggplotify_0.1.2 -## [115] rjson_0.2.21 htmlwidgets_1.6.4 -## [117] memoise_2.0.1 htmltools_0.5.7 -## [119] pkgdown_2.0.7 simona_1.1.6 -## [121] lifecycle_1.0.4 httr_1.4.7 -## [123] mime_0.12 GlobalOptions_0.1.2

+## [1] grr_0.9.5 httr2_1.0.7 +## [3] rlang_1.1.4 magrittr_2.0.3 +## [5] clue_0.3-66 GetoptLong_1.0.5 +## [7] matrixStats_1.4.1 compiler_4.5.0 +## [9] png_0.1-8 systemfonts_1.1.0 +## [11] vctrs_0.6.5 maps_3.4.2.1 +## [13] gprofiler2_0.2.3 stringr_1.5.1 +## [15] rvest_1.0.4 shape_1.4.6.1 +## [17] pkgconfig_2.0.3 crayon_1.5.3 +## [19] fastmap_1.2.0 backports_1.5.0 +## [21] promises_1.3.2 rmarkdown_2.29 +## [23] ragg_1.3.3 purrr_1.0.2 +## [25] xfun_0.49 cachem_1.1.0 +## [27] pals_1.9 aplot_0.2.4 +## [29] jsonlite_1.8.9 later_1.4.1 +## [31] BiocParallel_1.41.0 cluster_2.1.8 +## [33] broom_1.0.7 parallel_4.5.0 +## [35] R6_2.5.1 rols_3.3.0 +## [37] stringi_1.8.4 RColorBrewer_1.1-3 +## [39] bslib_0.8.0 car_3.1-3 +## [41] jquerylib_0.1.4 Rcpp_1.0.13-1 +## [43] iterators_1.0.14 knitr_1.49 +## [45] IRanges_2.41.2 httpuv_1.6.15 +## [47] igraph_2.1.2 Matrix_1.7-1 +## [49] tidyselect_1.2.1 dichromat_2.0-0.1 +## [51] abind_1.4-8 yaml_2.3.10 +## [53] doParallel_1.0.17 codetools_0.2-20 +## [55] lattice_0.22-6 tibble_3.2.1 +## [57] shiny_1.10.0 Biobase_2.67.0 +## [59] treeio_1.31.0 evaluate_1.0.1 +## [61] gridGraphics_0.5-1 desc_1.4.3 +## [63] xml2_1.3.6 circlize_0.4.16 +## [65] pillar_1.10.0 ggtree_3.15.0 +## [67] ggpubr_0.6.0 carData_3.0-5 +## [69] stats4_4.5.0 foreach_1.5.2 +## [71] ggfun_0.1.8 plotly_4.10.4 +## [73] generics_0.1.3 S4Vectors_0.45.2 +## [75] ggplot2_3.5.1 munsell_0.5.1 +## [77] scales_1.3.0 tidytree_0.4.6 +## [79] xtable_1.8-4 glue_1.8.0 +## [81] orthogene_1.13.0 mapproj_1.2.11 +## [83] scatterplot3d_0.3-44 lazyeval_0.2.2 +## [85] tools_4.5.0 data.table_1.16.4 +## [87] ggsignif_0.6.4 babelgene_22.9 +## [89] fs_1.6.5 tidygraph_1.3.1 +## [91] grid_4.5.0 tidyr_1.3.1 +## [93] ape_5.8-1 colorspace_2.1-1 +## [95] nlme_3.1-166 patchwork_1.3.0 +## [97] homologene_1.4.68.19.3.27 Formula_1.2-5 +## [99] cli_3.6.3 rappdirs_0.3.3 +## [101] Polychrome_1.5.1 textshaping_0.4.1 +## [103] viridisLite_0.4.2 ComplexHeatmap_2.23.0 +## [105] dplyr_1.1.4 gtable_0.3.6 +## [107] rstatix_0.7.2 yulab.utils_0.1.8 +## [109] sass_0.4.9 digest_0.6.37 +## [111] BiocGenerics_0.53.3 ggplotify_0.1.2 +## [113] rjson_0.2.23 htmlwidgets_1.6.4 +## [115] farver_2.1.2 htmltools_0.5.8.1 +## [117] pkgdown_2.1.1 simona_1.5.0 +## [119] lifecycle_1.0.4 httr_1.4.7 +## [121] mime_0.12 GlobalOptions_0.1.2


+ @@ -268,16 +264,16 @@

Session Info

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/articles/docker.html b/articles/docker.html index 63b1050..3ae13cf 100644 --- a/articles/docker.html +++ b/articles/docker.html @@ -6,20 +6,19 @@ Docker/Singularity Containers • KGExplorer - + - - +
@@ -48,7 +47,7 @@
- +
@@ -84,15 +83,15 @@

Docker/Singularity Containers


-Authors: Brian Schilder
+Authors: Brian Schilder, Hiranyamaya Dash


-Vignette updated: Feb-02-2024
+Vignette updated: Dec-18-2024

- Source: vignettes/docker.Rmd + Source: vignettes/docker.Rmd @@ -165,13 +164,13 @@

Session Info
 utils::sessionInfo()
-
## R Under development (unstable) (2024-01-23 r85822)
+
## R Under development (unstable) (2024-12-15 r87442)
 ## Platform: x86_64-pc-linux-gnu
-## Running under: Ubuntu 22.04.3 LTS
+## Running under: Ubuntu 24.04.1 LTS
 ## 
 ## Matrix products: default
 ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
-## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
 ## 
 ## locale:
 ##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
@@ -188,80 +187,77 @@ 

Session Info## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: -## [1] KGExplorer_0.99.0 +## [1] KGExplorer_0.99.05 ## ## loaded via a namespace (and not attached): -## [1] grr_0.9.5 rlang_1.1.3 -## [3] magrittr_2.0.3 clue_0.3-65 -## [5] GetoptLong_1.0.5 matrixStats_1.2.0 -## [7] compiler_4.4.0 png_0.1-8 -## [9] systemfonts_1.0.5 vctrs_0.6.5 -## [11] maps_3.4.2 gprofiler2_0.2.2 -## [13] rvest_1.0.3 stringr_1.5.1 -## [15] shape_1.4.6 pkgconfig_2.0.3 -## [17] crayon_1.5.2 fastmap_1.1.1 -## [19] ellipsis_0.3.2 backports_1.4.1 -## [21] utf8_1.2.4 promises_1.2.1 -## [23] rmarkdown_2.25 ragg_1.2.7 -## [25] purrr_1.0.2 xfun_0.41 -## [27] cachem_1.0.8 pals_1.9 -## [29] aplot_0.2.2 jsonlite_1.8.8 -## [31] progress_1.2.3 later_1.3.2 -## [33] cluster_2.1.6 broom_1.0.5 -## [35] parallel_4.4.0 prettyunits_1.2.0 -## [37] R6_2.5.1 rols_2.31.0 -## [39] RColorBrewer_1.1-3 bslib_0.6.1 -## [41] stringi_1.8.3 car_3.1-2 -## [43] jquerylib_0.1.4 Rcpp_1.0.12 -## [45] iterators_1.0.14 knitr_1.45 -## [47] IRanges_2.37.1 httpuv_1.6.14 -## [49] igraph_2.0.1.1 Matrix_1.6-5 -## [51] tidyselect_1.2.0 dichromat_2.0-0.1 -## [53] abind_1.4-5 yaml_2.3.8 -## [55] doParallel_1.0.17 codetools_0.2-19 -## [57] lattice_0.22-5 tibble_3.2.1 -## [59] shiny_1.8.0 Biobase_2.63.0 -## [61] treeio_1.27.0 evaluate_0.23 -## [63] gridGraphics_0.5-1 desc_1.4.3 -## [65] xml2_1.3.6 circlize_0.4.15 -## [67] pillar_1.9.0 ggtree_3.11.0 -## [69] ggpubr_0.6.0 carData_3.0-5 -## [71] stats4_4.4.0 foreach_1.5.2 -## [73] ggfun_0.1.4 plotly_4.10.4 -## [75] generics_0.1.3 S4Vectors_0.41.3 -## [77] hms_1.1.3 ggplot2_3.4.4 -## [79] munsell_0.5.0 scales_1.3.0 -## [81] tidytree_0.4.6 xtable_1.8-4 -## [83] glue_1.7.0 orthogene_1.9.0 -## [85] mapproj_1.2.11 scatterplot3d_0.3-44 -## [87] lazyeval_0.2.2 tools_4.4.0 -## [89] data.table_1.15.0 ggsignif_0.6.4 -## [91] babelgene_22.9 fs_1.6.3 -## [93] tidygraph_1.3.1 grid_4.4.0 -## [95] tidyr_1.3.1 ape_5.7-1 -## [97] colorspace_2.1-0 nlme_3.1-164 -## [99] patchwork_1.2.0 homologene_1.4.68.19.3.27 -## [101] cli_3.6.2 Polychrome_1.5.1 -## [103] textshaping_0.3.7 fansi_1.0.6 -## [105] viridisLite_0.4.2 ComplexHeatmap_2.19.0 -## [107] dplyr_1.1.4 gtable_0.3.4 -## [109] rstatix_0.7.2 yulab.utils_0.1.4 -## [111] sass_0.4.8 digest_0.6.34 -## [113] BiocGenerics_0.49.1 ggplotify_0.1.2 -## [115] rjson_0.2.21 htmlwidgets_1.6.4 -## [117] memoise_2.0.1 htmltools_0.5.7 -## [119] pkgdown_2.0.7 simona_1.1.6 -## [121] lifecycle_1.0.4 httr_1.4.7 -## [123] mime_0.12 GlobalOptions_0.1.2

+## [1] grr_0.9.5 httr2_1.0.7 +## [3] rlang_1.1.4 magrittr_2.0.3 +## [5] clue_0.3-66 GetoptLong_1.0.5 +## [7] matrixStats_1.4.1 compiler_4.5.0 +## [9] png_0.1-8 systemfonts_1.1.0 +## [11] vctrs_0.6.5 maps_3.4.2.1 +## [13] gprofiler2_0.2.3 stringr_1.5.1 +## [15] rvest_1.0.4 shape_1.4.6.1 +## [17] pkgconfig_2.0.3 crayon_1.5.3 +## [19] fastmap_1.2.0 backports_1.5.0 +## [21] promises_1.3.2 rmarkdown_2.29 +## [23] ragg_1.3.3 purrr_1.0.2 +## [25] xfun_0.49 cachem_1.1.0 +## [27] pals_1.9 aplot_0.2.4 +## [29] jsonlite_1.8.9 later_1.4.1 +## [31] BiocParallel_1.41.0 cluster_2.1.8 +## [33] broom_1.0.7 parallel_4.5.0 +## [35] R6_2.5.1 rols_3.3.0 +## [37] stringi_1.8.4 RColorBrewer_1.1-3 +## [39] bslib_0.8.0 car_3.1-3 +## [41] jquerylib_0.1.4 Rcpp_1.0.13-1 +## [43] iterators_1.0.14 knitr_1.49 +## [45] IRanges_2.41.2 httpuv_1.6.15 +## [47] igraph_2.1.2 Matrix_1.7-1 +## [49] tidyselect_1.2.1 dichromat_2.0-0.1 +## [51] abind_1.4-8 yaml_2.3.10 +## [53] doParallel_1.0.17 codetools_0.2-20 +## [55] lattice_0.22-6 tibble_3.2.1 +## [57] shiny_1.10.0 Biobase_2.67.0 +## [59] treeio_1.31.0 evaluate_1.0.1 +## [61] gridGraphics_0.5-1 desc_1.4.3 +## [63] xml2_1.3.6 circlize_0.4.16 +## [65] pillar_1.10.0 ggtree_3.15.0 +## [67] ggpubr_0.6.0 carData_3.0-5 +## [69] stats4_4.5.0 foreach_1.5.2 +## [71] ggfun_0.1.8 plotly_4.10.4 +## [73] generics_0.1.3 S4Vectors_0.45.2 +## [75] ggplot2_3.5.1 munsell_0.5.1 +## [77] scales_1.3.0 tidytree_0.4.6 +## [79] xtable_1.8-4 glue_1.8.0 +## [81] orthogene_1.13.0 mapproj_1.2.11 +## [83] scatterplot3d_0.3-44 lazyeval_0.2.2 +## [85] tools_4.5.0 data.table_1.16.4 +## [87] ggsignif_0.6.4 babelgene_22.9 +## [89] fs_1.6.5 tidygraph_1.3.1 +## [91] grid_4.5.0 tidyr_1.3.1 +## [93] ape_5.8-1 colorspace_2.1-1 +## [95] nlme_3.1-166 patchwork_1.3.0 +## [97] homologene_1.4.68.19.3.27 Formula_1.2-5 +## [99] cli_3.6.3 rappdirs_0.3.3 +## [101] Polychrome_1.5.1 textshaping_0.4.1 +## [103] viridisLite_0.4.2 ComplexHeatmap_2.23.0 +## [105] dplyr_1.1.4 gtable_0.3.6 +## [107] rstatix_0.7.2 yulab.utils_0.1.8 +## [109] sass_0.4.9 digest_0.6.37 +## [111] BiocGenerics_0.53.3 ggplotify_0.1.2 +## [113] rjson_0.2.23 htmlwidgets_1.6.4 +## [115] farver_2.1.2 htmltools_0.5.8.1 +## [117] pkgdown_2.1.1 simona_1.5.0 +## [119] lifecycle_1.0.4 httr_1.4.7 +## [121] mime_0.12 GlobalOptions_0.1.2


+ @@ -274,16 +270,16 @@

Session Info

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/articles/index.html b/articles/index.html index 184d437..e3a76da 100644 --- a/articles/index.html +++ b/articles/index.html @@ -1,9 +1,9 @@ -Articles • KGExplorerArticles • KGExplorer - +
@@ -31,7 +31,7 @@
- +
@@ -63,9 +63,9 @@

Articles

All vignettes

-
Get started
+
Docker/Singularity Containers
-
Docker/Singularity Containers
+
Get started
@@ -77,15 +77,15 @@

All vignettes

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/authors.html b/authors.html index b0f2ead..23e6857 100644 --- a/authors.html +++ b/authors.html @@ -1,9 +1,9 @@ -Authors and Citation • KGExplorerAuthors and Citation • KGExplorer - +
@@ -31,7 +31,7 @@
- +
- +
  • Brian Schilder. Author, maintainer.

  • +
  • +

    Hiranyamaya Dash. Contributor. +

    +

Citation

- Source: inst/CITATION + Source: inst/CITATION
@@ -94,15 +98,15 @@

Citation

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/index.html b/index.html index 3225e82..5cfe25c 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Biomedical Knowledge Network Construction and Analysis • KGExplorer - + @@ -19,7 +19,7 @@ - +
@@ -48,7 +48,7 @@
- +
-
License: GPL-3
R build status

-Authors: Brian Schilder +
License: GPL-3
R build status

+Authors: Brian Schilder, Hiranyamaya Dash

-README updated: Feb-02-2024 +README updated: Dec-18-2024

@@ -110,9 +110,9 @@

Installation

-if(!require("remotes")) install.packages("remotes")
+if(!require("BiocManager")) install.packages("BiocManager")
 
-remotes::install_github("neurogenomics/KGExplorer")
+BiocManager::install("neurogenomics/KGExplorer")
 library(KGExplorer)
@@ -135,13 +135,13 @@

Session Info
 utils::sessionInfo()

-
## R Under development (unstable) (2024-01-23 r85822)
+
## R Under development (unstable) (2024-12-15 r87442)
 ## Platform: x86_64-pc-linux-gnu
-## Running under: Ubuntu 22.04.3 LTS
+## Running under: Ubuntu 24.04.1 LTS
 ## 
 ## Matrix products: default
 ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
-## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so;  LAPACK version 3.10.0
+## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
 ## 
 ## locale:
 ##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
@@ -158,25 +158,23 @@ 

Session Info## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: -## [1] rmarkdown_2.25 +## [1] rmarkdown_2.29 ## ## loaded via a namespace (and not attached): -## [1] gtable_0.3.4 jsonlite_1.8.8 renv_1.0.3 -## [4] dplyr_1.1.4 compiler_4.4.0 BiocManager_1.30.22 -## [7] tidyselect_1.2.0 rvcheck_0.2.1 scales_1.3.0 -## [10] yaml_2.3.8 fastmap_1.1.1 here_1.0.1 -## [13] ggplot2_3.4.4 R6_2.5.1 generics_0.1.3 -## [16] knitr_1.45 yulab.utils_0.1.4 tibble_3.2.1 -## [19] desc_1.4.3 dlstats_0.1.7 rprojroot_2.0.4 -## [22] munsell_0.5.0 pillar_1.9.0 RColorBrewer_1.1-3 -## [25] rlang_1.1.3 utf8_1.2.4 cachem_1.0.8 -## [28] badger_0.2.3 xfun_0.41 fs_1.6.3 -## [31] memoise_2.0.1 cli_3.6.2 magrittr_2.0.3 -## [34] rworkflows_1.0.1 digest_0.6.34 grid_4.4.0 -## [37] lifecycle_1.0.4 vctrs_0.6.5 data.table_1.15.0 -## [40] evaluate_0.23 glue_1.7.0 fansi_1.0.6 -## [43] colorspace_2.1-0 tools_4.4.0 pkgconfig_2.0.3 -## [46] htmltools_0.5.7

+## [1] gtable_0.3.6 jsonlite_1.8.9 renv_1.0.11 +## [4] dplyr_1.1.4 compiler_4.5.0 BiocManager_1.30.25 +## [7] tidyselect_1.2.1 rvcheck_0.2.1 scales_1.3.0 +## [10] yaml_2.3.10 fastmap_1.2.0 here_1.0.1 +## [13] ggplot2_3.5.1 R6_2.5.1 generics_0.1.3 +## [16] knitr_1.49 yulab.utils_0.1.8 tibble_3.2.1 +## [19] desc_1.4.3 dlstats_0.1.7 munsell_0.5.1 +## [22] rprojroot_2.0.4 pillar_1.10.0 RColorBrewer_1.1-3 +## [25] rlang_1.1.4 badger_0.2.4 xfun_0.49 +## [28] fs_1.6.5 cli_3.6.3 magrittr_2.0.3 +## [31] rworkflows_1.0.2 digest_0.6.37 grid_4.5.0 +## [34] lifecycle_1.0.4 vctrs_0.6.5 evaluate_1.0.1 +## [37] glue_1.8.0 data.table_1.16.4 colorspace_2.1-1 +## [40] tools_4.5.0 pkgconfig_2.0.3 htmltools_0.5.8.1
@@ -210,6 +208,7 @@

Citation

Developers

@@ -226,16 +225,16 @@

Developers

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/news/index.html b/news/index.html index db15465..ea6e07d 100644 --- a/news/index.html +++ b/news/index.html @@ -1,9 +1,9 @@ -Changelog • KGExplorerChangelog • KGExplorer - +
@@ -31,7 +31,7 @@
- +
+
+ +
+

New features

+
  • +get_hpo +
    • Port function from HPOExplorer package to prevent circular dependency.
    • +
  • +
+
+

Bug fixes

+
+
+
+ +
+

Bug fixes

+
  • +test-get_ontology_levels +
    • Check for range rather than fixed values.
    • +
  • +
  • +filter_ontology +
    • Move terms processing block to after check for character, as appropriate.
    • +
  • +
  • +get_ontology_dict +
    • Add error handling for missing alternative_terms when include_alternative_terms=TRUE.
    • +
  • +
  • +plot_ontology_heatmap +
  • +
  • +prune_ancestors +
    • Add value for argument id_col in example.
    • +
  • +
  • +set_cores +
    • Reduce workers during R CMD CHECK if required.
    • +
  • +
+
+
+ +
+

New features

+
+
+
+ +
+

Bug fixes

+
  • Fix get_ontology_dict data.table construction.
  • +
+
@@ -85,15 +158,15 @@

Bug fixes -

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/pkgdown.yml b/pkgdown.yml index 33fab32..6820a73 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,8 +1,7 @@ -pandoc: 3.1.1 -pkgdown: 2.0.7 +pandoc: '3.6' +pkgdown: 2.1.1 pkgdown_sha: ~ articles: - KGExplorer: KGExplorer.html docker: docker.html -last_built: 2024-02-02T14:27Z - + KGExplorer: KGExplorer.html +last_built: 2024-12-18T15:13Z diff --git a/reference/add_.html b/reference/add_.html index 6a77ced..ec2463f 100644 --- a/reference/add_.html +++ b/reference/add_.html @@ -1,9 +1,9 @@ -Add functions — add_ • KGExplorerAdd functions — add_ • KGExplorer - +
@@ -31,7 +31,7 @@
- +
@@ -65,221 +65,50 @@

Add functions

Functions to add extra metadata to an ontology or data.table object.

-
-
add_ancestors(ont, lvl = 2, include_self = TRUE, force_new = FALSE)
-
-add_db(
-  dat,
-  input_col,
-  output_col = paste0(input_col, "_db"),
-  split = ":",
-  keep = 1
-)
-
-add_hoverboxes(
-  g,
-  columns = get_graph_colnames(g),
-  hoverbox_column = c("hover", "title", "label"),
-  width = 60,
-  digits = 3,
-  decorators = c("<b>", "</b>"),
-  as_html = TRUE,
-  force_new = FALSE
-)
-
-add_ontology_metadata(
-  ont,
-  add_ancestors = 2,
-  add_n_edges = TRUE,
-  add_ontology_levels = TRUE
-)
-

Arguments

-
ont
-

An ontology of class ontology_DAG.

- - -
lvl
-

Depth of the ancestor terms to add. -Will get the closest ancestor to this level if none have this exact level.

- - -
include_self
-

For dag_offspring() and dag_ancestors(), this controls whether to also include the query term itself.

- - -
force_new
-

Add the data again even if the associated column already -exists.

- - -
dat
-

data.table or tbl_graph.

- - -
input_col
-

Column containing IDs.

- -
output_col
-

Column to add.

- -
split
-

character vector (or object which can be coerced to such) - containing regular expression(s) (unless fixed = TRUE) - to use for splitting. If empty matches occur, in particular if - split has length 0, x is split into single characters. - If split has length greater than 1, it is re-cycled along - x.

- - -
keep
-

Specify indices corresponding to just those list elements to retain in the transposed result. Default is to return all.

- - -
g
-

ggnetwork object -(or an igraph/tbl_graph to be converted to ggnetwork format).

- - -
columns
-

Character vector of column names to include in the hoverbox.

- - -
hoverbox_column
-

Name of the new hoverbox column to add.

+
ont
+

An ontology of class ontology_DAG.

-
width
-

Positive integer giving target line width (in number of -characters). A width less than or equal to 1 will put each word on its -own line.

+
terms
+

A vector of ontology term IDs.

-
digits
-

integer indicating the number of decimal places - (round) or significant digits (signif) to be used. - For round, negative values are allowed (see ‘Details’).

+
g
+

tbl_graph object.

-
decorators
-

Left and right decorators to add to the hoverbox titles.

+
force_new
+

Add the data again even if the associated column already +exists.

-
as_html
-

Provide the hoverbox in HTML format.

+
lvl
+

Depth of the ancestor terms to add. +Will get the closest ancestor to this level if none have this exact level.

-
add_ancestors
+
add_ancestors

Add ancestors for each term.

-
add_n_edges
+
add_n_edges

Add the number of edges (connections) for each term.

-
add_ontology_levels
+
add_ontology_levels

Add the ontology level for each term.

Value

- - -

Added data.

- - -

tidygraph with additional metadata column named "hover".

-
-
-

Functions

- -
  • add_ancestors(): add_ -Add ancestor

    -

    For each term, get its ancestor at a given level -and add the ID and name of the ancestor to the ontology metadata. -By default, lower numbers are higher in the ontology - (e.g. level 0 includes the most broad ontology term). -When a terms does not have an ancestor at a given level - (e.g. lvl=3 but the term itself is at level 1) the term is assigned - to itself as its own ancestor. -When a term has multiple ancestors at a given level, -the first ancestor is arbitrarily chosen.

  • -
  • add_db(): add_ -Extract a database identifier from an ID column and add it -as a separate column.

  • -
  • add_hoverboxes(): add_ -Add hoverboxes

    -

    A hoverbox is a box of text that shows up when the cursor - hovers over something. -These can be useful when making interactive network plots -of the HPO phenotypes because we can include a hoverbox that gives -information and data associated with each phenotype.

  • -
  • add_ontology_metadata(): add_

    -

    Add per-term metadata to ontology.

  • -
- -
-

Examples

-
ont <- get_ontology("hp")
-#> Loading required namespace: piggyback
-#>  All local files already up-to-date!
-#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl
-#> Adding term metadata.
-#> IC_method: IC_offspring
-#> Adding ancestor metadata.
-#> Getting absolute ontology level for 25,301 IDs.
-#> 900 ancestors found at level 2
-#> Translating all terms to names.
-#> + Returning a vector of terms (same order as input).
-#> Converted ontology to: adjacency 
-#> Getting absolute ontology level for 25,301 IDs.
-ont2 <- add_ancestors(ont)
-#> Adding ancestor metadata.
-#> Ancestor metadata already present. Use force_new=TRUE to overwrite.
-ont <- get_ontology("hp", terms=10)
-#>  All local files already up-to-date!
-#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl
-#> Adding term metadata.
-#> IC_method: IC_offspring
-#> Adding ancestor metadata.
-#> Getting absolute ontology level for 25,301 IDs.
-#> 900 ancestors found at level 2
-#> Translating all terms to names.
-#> + Returning a vector of terms (same order as input).
-#> Converted ontology to: adjacency 
-#> Getting absolute ontology level for 25,301 IDs.
-#> Randomly sampling 10 term(s).
-g <- ontology_to(ont, to="tbl_graph")
-#> Converted ontology to: tbl_graph 
-g2 <- add_hoverboxes(g)
-#> Making hoverboxes from: 'name', 'short_id', 'label', 'namespace', 'definition', 'IC', 'depth', 'n_children', 'n_ancestors', 'n_parents', 'n_offspring', 'n_connected_leaves', 'ancestor', 'ancestor_name', 'n_edges', 'ontLvl'
-#> Adding hoverboxes to data.table.
-ont <- get_ontology("hp", terms=10)
-#>  All local files already up-to-date!
-#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl
-#> Adding term metadata.
-#> IC_method: IC_offspring
-#> Adding ancestor metadata.
-#> Getting absolute ontology level for 25,301 IDs.
-#> 900 ancestors found at level 2
-#> Translating all terms to names.
-#> + Returning a vector of terms (same order as input).
-#> Converted ontology to: adjacency 
-#> Getting absolute ontology level for 25,301 IDs.
-#> Randomly sampling 10 term(s).
-ont2 <- add_ontology_metadata(ont)
-#> Adding term metadata.
-#> IC_method: IC_offspring
-#> Adding ancestor metadata.
-#> Ancestor metadata already present. Use force_new=TRUE to overwrite.
-#> Converted ontology to: adjacency 
-#> Getting absolute ontology level for 67 IDs.
-
+

Added data.

+
-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/reference/add_ancestors.html b/reference/add_ancestors.html new file mode 100644 index 0000000..a10df67 --- /dev/null +++ b/reference/add_ancestors.html @@ -0,0 +1,199 @@ + +Add ancestors — add_ancestors • KGExplorer + + +
+
+ + + +
+
+ + +
+

For each term, get its ancestor at a given level +and add the ID and name of the ancestor to the ontology metadata. +By default, lower numbers are higher in the ontology + (e.g. level 0 includes the most broad ontology term). +When a terms does not have an ancestor at a given level + (e.g. lvl=3 but the term itself is at level 1) the term is assigned + to itself as its own ancestor. +When a term has multiple ancestors at a given level, +the first ancestor is arbitrarily chosen.

+
+ +
+
add_ancestors(
+  ont,
+  lvl = 2,
+  include_self = TRUE,
+  prefix = "ancestor",
+  fill_na = TRUE,
+  i = 1,
+  force_new = FALSE
+)
+
+ +
+

Arguments

+ + +
ont
+

An ontology of class ontology_DAG.

+ + +
lvl
+

Depth of the ancestor terms to add. +Will get the closest ancestor to this level if none have this exact level.

+ + +
include_self
+

For dag_offspring() and dag_ancestors(), this controls whether to also include the query term itself.

+ + +
prefix
+

A prefix for the ancestor column names.

+ + +
fill_na
+

If TRUE, fill ancestor columns with +NA values using the term ID and name.

+ + +
i
+

Index of ancestor to use when more than one is available.

+ + +
force_new
+

Add the data again even if the associated column already +exists.

+ +
+ +
+

Examples

+
ont <- get_ontology("hp")
+#> ⠙ Iterating 5 done (2.3/s) | 2.2s
+#> ⠙ Iterating 14 done (2.8/s) | 5s
+#> Loading required namespace: piggyback
+#> Preparing ontology_index object from: https://github.com/obophenotype/human-phenotype-ontology/releases/download/v2024-12-12/hp.obo
+#> Parsing [Typedef] sections in the obo file [3/3]
+#> Parsing [Term] sections in the obo file [1000/19475]
+#> Parsing [Term] sections in the obo file [2000/19475]
+#> Parsing [Term] sections in the obo file [3000/19475]
+#> Parsing [Term] sections in the obo file [4000/19475]
+#> Parsing [Term] sections in the obo file [5000/19475]
+#> Parsing [Term] sections in the obo file [6000/19475]
+#> Parsing [Term] sections in the obo file [7000/19475]
+#> Parsing [Term] sections in the obo file [8000/19475]
+#> Parsing [Term] sections in the obo file [9000/19475]
+#> Parsing [Term] sections in the obo file [10000/19475]
+#> Parsing [Term] sections in the obo file [11000/19475]
+#> Parsing [Term] sections in the obo file [12000/19475]
+#> Parsing [Term] sections in the obo file [13000/19475]
+#> Parsing [Term] sections in the obo file [14000/19475]
+#> Parsing [Term] sections in the obo file [15000/19475]
+#> Parsing [Term] sections in the obo file [16000/19475]
+#> Parsing [Term] sections in the obo file [17000/19475]
+#> Parsing [Term] sections in the obo file [18000/19475]
+#> Parsing [Term] sections in the obo file [19000/19475]
+#> Parsing [Term] sections in the obo file [19475/19475]
+#> remove 450 obsolete terms
+#> Adding term metadata.
+#> IC_method: IC_offspring
+#> Adding ancestor metadata.
+#> Getting absolute ontology level for 19,025 IDs.
+#> 79 ancestors found at level 2
+#> Translating ontology terms to names.
+#> Translating ontology terms to ids.
+#> Converted ontology to: adjacency 
+#> Getting absolute ontology level for 19,025 IDs.
+#> Saving ontology --> /github/home/.cache/R/KGExplorer/hp.rds
+ont2 <- add_ancestors(ont, lvl=4)
+#> Adding ancestor metadata.
+#> Ancestor metadata already present. Use force_new=TRUE to overwrite.
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.1.1.

+
+ +
+ + + + + + + + diff --git a/reference/add_db.html b/reference/add_db.html new file mode 100644 index 0000000..2a86413 --- /dev/null +++ b/reference/add_db.html @@ -0,0 +1,133 @@ + +Add database — add_db • KGExplorer + + +
+
+ + + +
+
+ + +
+

Extract a database identifier from an ID column and add it +as a separate column.

+
+ +
+
add_db(
+  dat,
+  input_col,
+  output_col = paste0(input_col, "_db"),
+  split = ":",
+  keep = 1
+)
+
+ +
+

Arguments

+ + +
dat
+

data.table or tbl_graph.

+ + +
input_col
+

Column containing IDs.

+ + +
output_col
+

Column to add.

+ + +
split
+

character vector (or object which can be coerced to such) + containing regular expression(s) (unless fixed = TRUE) + to use for splitting. If empty matches occur, in particular if + split has length 0, x is split into single characters. + If split has length greater than 1, it is re-cycled along + x.

+ + +
keep
+

Specify indices corresponding to just those list elements to retain in the transposed result. Default is to return all.

+ +
+ +
+ +
+ + +
+ +
+

Site built with pkgdown 2.1.1.

+
+ +
+ + + + + + + + diff --git a/reference/add_hoverboxes.html b/reference/add_hoverboxes.html new file mode 100644 index 0000000..7df0066 --- /dev/null +++ b/reference/add_hoverboxes.html @@ -0,0 +1,170 @@ + +Add hoverboxes — add_hoverboxes • KGExplorer + + +
+
+ + + +
+
+ + +
+

A hoverbox is a box of text that shows up when the cursor + hovers over something. +These can be useful when making interactive network plots +of the HPO phenotypes because we can include a hoverbox that gives +information and data associated with each phenotype.

+
+ +
+
add_hoverboxes(
+  g,
+  columns = get_graph_colnames(g),
+  hoverbox_column = c("hover", "title", "label"),
+  width = 60,
+  digits = 3,
+  decorators = c("<b>", "</b>"),
+  as_html = TRUE,
+  force_new = FALSE
+)
+
+ +
+

Arguments

+ + +
g
+

tbl_graph object.

+ + +
columns
+

Character vector of column names to include in the hoverbox.

+ + +
hoverbox_column
+

Name of the new hoverbox column to add.

+ + +
width
+

Positive integer giving target line width (in number of +characters). A width less than or equal to 1 will put each word on its +own line.

+ + +
digits
+

integer indicating the number of decimal places + (round) or significant digits (signif) to be used. + For round, negative values are allowed (see ‘Details’).

+ + +
decorators
+

Left and right decorators to add to the hoverbox titles.

+ + +
as_html
+

Provide the hoverbox in HTML format.

+ + +
force_new
+

Add the data again even if the associated column already +exists.

+ +
+
+

Value

+

tidygraph with additional metadata column named "hover".

+
+ +
+

Examples

+
ont <- get_ontology("hp")
+#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
+g <- ontology_to(ont, to="tbl_graph")
+#> Translating ontology terms to ids.
+#> Converted ontology to: tbl_graph 
+g2 <- add_hoverboxes(g)
+#> Making hoverboxes from: 'name', 'short_id', 'label', 'namespace', 'definition', 'IC', 'depth', 'n_children', 'n_ancestors', 'n_parents', 'n_offspring', 'n_connected_leaves', 'ancestor', 'ancestor_name', 'n_edges', 'ontLvl'
+#> Adding hoverboxes to data.table.
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.1.1.

+
+ +
+ + + + + + + + diff --git a/reference/add_ontology_metadata.html b/reference/add_ontology_metadata.html new file mode 100644 index 0000000..f6325e5 --- /dev/null +++ b/reference/add_ontology_metadata.html @@ -0,0 +1,143 @@ + +Add ontology metadata — add_ontology_metadata • KGExplorer + + +
+
+ + + +
+
+ + +
+

Add per-term metadata to ontology.

+
+ +
+
add_ontology_metadata(
+  ont,
+  lvl = 2,
+  force_new = FALSE,
+  add_n_edges = TRUE,
+  add_ontology_levels = TRUE
+)
+
+ +
+

Arguments

+ + +
ont
+

An ontology of class ontology_DAG.

+ + +
lvl
+

Depth of the ancestor terms to add. +Will get the closest ancestor to this level if none have this exact level.

+ + +
force_new
+

Add the data again even if the associated column already +exists.

+ + +
add_n_edges
+

Add the number of edges (connections) for each term.

+ + +
add_ontology_levels
+

Add the ontology level for each term.

+ +
+ +
+

Examples

+
ont <- get_ontology("hp", terms=10)
+#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
+#> Randomly sampling 10 term(s).
+ont2 <- add_ontology_metadata(ont)
+#> Adding term metadata.
+#> IC_method: IC_offspring
+#> Adding ancestor metadata.
+#> Ancestor metadata already present. Use force_new=TRUE to overwrite.
+#> Translating ontology terms to ids.
+#> Converted ontology to: adjacency 
+#> Getting absolute ontology level for 91 IDs.
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.1.1.

+
+ +
+ + + + + + + + diff --git a/reference/cache_.html b/reference/cache_.html index 2207498..24360b7 100644 --- a/reference/cache_.html +++ b/reference/cache_.html @@ -1,9 +1,9 @@ -Cache functions — cache_ • KGExplorerCache functions — cache_ • KGExplorer - +
@@ -31,7 +31,7 @@
- +
@@ -66,24 +66,28 @@

Cache functions

-
cache_clear(save_dir = cache_dir(), recursive = TRUE, ...)
+    
cache_clear(save_dir = cache_dir(), recursive = TRUE, ...)
+
+cache_dir(package = "KGExplorer")
 
-cache_files(save_dir = cache_dir(), recursive = TRUE, ...)
+cache_files(save_dir = cache_dir(), recursive = TRUE, ...)
 
-cache_save(obj, path)
+cache_save(obj, save_path)

Arguments

-
save_dir
-

Path to cache directory.

-
recursive
+
save_dir
+

Directory to save a file to.

+ + +
recursive

logical. Should directories be deleted recursively?

-
...
+
...

Arguments passed on to base::unlink, base::unlink

x

a character vector with the names of the file(s) or directories to be deleted.

@@ -96,33 +100,37 @@

Arguments

logical. Should wildcards (see ‘Details’ below) and tilde (see path.expand) be expanded?

- +
-
obj
+
package
+

a character string giving the name of an R package

+ + +
obj

R object.

-
path
+
save_path

File name to save to.

Value

- - -

Null.

- - +

Null.

+

Cache directory path.

Null.

Functions

- +
  • cache_clear(): cache_ Clear cache

    Remove all data cached by the R package.

  • +
  • cache_dir(): cache_ +Cache directory

    +

    Provides the path to the package-wide cache directory.

  • cache_files(): cache_ List cache

    List all data cached by the R package.

  • @@ -132,14 +140,15 @@

    Functions

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     cache_clear()
    -}
    -if (FALSE) {
    +} # }
    +save_dir <- cache_dir
    +if (FALSE) { # \dontrun{
     cache_files()
    -}
    +} # }
     cache_save(mtcars, tempfile())
    -#> Caching file --> /tmp/RtmpSu2waH/filea03f5f3bd483
    +#> Caching file --> /tmp/RtmpHoWco8/file1445c41731f3a
     
    @@ -154,15 +163,15 @@

    Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/reference/filter_.html b/reference/filter_.html index 8c123a8..50df273 100644 --- a/reference/filter_.html +++ b/reference/filter_.html @@ -1,9 +1,9 @@ -Filter functions — filter_ • KGExplorerFilter functions — filter_ • KGExplorer - +
@@ -31,7 +31,7 @@
- +
@@ -95,6 +95,7 @@

Filter functions

remove_terms = NULL, keep_descendants = NULL, remove_descendants = NULL, + include_self = TRUE, use_simona = FALSE, ... )
@@ -102,92 +103,113 @@

Filter functions

Arguments

-
grlist
+ + +
grlist

Named list of GRanges objects.

-
keep_chr
+
keep_chr

Which chromosomes to keep.

-
filters
-

A named list, where each element in the list is the name of -a column in the data, and the vector within each element represents the +

filters
+

A named list, where each element in the list is the name of +a column in the data, and the vector within each element represents the values to include in the final data.

-
g
-

ggnetwork object -(or an igraph/tbl_graph to be converted to ggnetwork format).

+
g
+

tbl_graph object.

-
node_filters
-

A named list of filters to apply to the node data. -Names should be name of the metadata column, and values should be a vector of +

node_filters
+

A named list of filters to apply to the node data. +Names should be name of the metadata column, and values should be a vector of valid options. For example, list("type" = c("gene","variant")) will return any rows where the "type" column contains either "gene" or "variant".

-
edge_filters
+
edge_filters

A named list of filters to apply to the edge data.

-
ont
+
ont

An ontology of class ontology_DAG.

-
terms
-

Term IDs to include. Can alternatively be an integer, -which will be used to randomly sample N terms from the data.

+
terms
+

A vector of ontology term IDs.

-
remove_terms
+
remove_terms

Character vector of term IDs to exclude.

-
keep_descendants
-

Terms whose descendants should be kept +

keep_descendants
+

Terms whose descendants should be kept (including themselves). Set to NULL (default) to skip this filtering step.

-
remove_descendants
-

Terms whose descendants should be removed +

remove_descendants
+

Terms whose descendants should be removed (including themselves). Set to NULL (default) to skip this filtering step.

-
use_simona
+
use_simona

Use dag_filter to filter terms.

-
...
-

Additional arguments passed to plot-specific functions.

+
...
+

Arguments passed on to simona::dag_filter

dag
+

An ontology_DAG object.

-
-
-

Value

- +
relations
+

A vector of relations. The sub-DAG will only contain these relations. +Valid values of "relations" should correspond to the values set in the +relations argument in the create_ontology_DAG(). If relations_DAG is +already provided, offspring relation types will all be selected. Note "is_a" +is always included.

+ +
root
+

A vector of term names which will be used as roots of the sub-DAG. Only +these with their offspring terms will be kept. If there are multiple root terms, +a super root will be automatically added.

-

Converted data.

+
leaves
+

A vector of leaf terms. Only these with their ancestor terms will be kept.

+
mcols_filter
+

Filtering on columns in the meta data frame.

+
namespace
+

The prefix before ":" of the term IDs.

+ + + + +
+
+

Value

+

Converted data.

Named list of GRanges objects.

Functions

- +
  • filter_chromosomes(): filter_ Remove non-standard chromosomes

    -

    Remove non-standard chromosomes from a list of +

    Remove non-standard chromosomes from a list of GRanges objects.

  • filter_dt(): filter_ -Filter a data.table.

  • +Filter a data.table.

  • filter_graph(): filter_ Filter a tbl_graph.

  • filter_kg(): filter_

    -

    Filter the monarch knowledge graph to only include edges between specific -types of nodes (e.g. Disease <--> Cell).

  • +

    Filter the monarch knowledge graph to only include edges between specific +types of nodes (e.g. Disease <–> Cell).

  • filter_ontology(): filter_ Filter ontology

    Filter ontology by terms.

  • @@ -198,23 +220,14 @@

    Examples

    dat <- mtcars 
     dat2 <- filter_dt(dat, filters=list(cyl=c(4,6)))
     #> Filtered 'cyl' : 14 / 32 rows dropped.
    -if (FALSE) {
    +if (FALSE) { # \dontrun{
     g <- get_monarch_kg()
     g2 <- filter_kg(g)
    -}
    +} # }
     ont <- get_ontology("hp")
    -#>  All local files already up-to-date!
    -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl
    -#> Adding term metadata.
    -#> IC_method: IC_offspring
    -#> Adding ancestor metadata.
    -#> Getting absolute ontology level for 25,301 IDs.
    -#> 900 ancestors found at level 2
    -#> Translating all terms to names.
    -#> + Returning a vector of terms (same order as input).
    -#> Converted ontology to: adjacency 
    -#> Getting absolute ontology level for 25,301 IDs.
    +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
     ont2 <- filter_ontology(ont,terms=c("HP:0000001","HP:0000002"))
    +#> Translating ontology terms to ids.
     ont3 <- filter_ontology(ont,terms=100)
     #> Randomly sampling 100 term(s).
     
    @@ -231,15 +244,15 @@

    Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.1.1.

- - + + diff --git a/reference/get_.html b/reference/get_.html index 49a8c81..5a1fd35 100644 --- a/reference/get_.html +++ b/reference/get_.html @@ -1,9 +1,9 @@ -Get functions — get_ • KGExplorerGet functions — get_ • KGExplorer - +
@@ -31,7 +31,7 @@
- +
@@ -69,7 +69,7 @@

Get functions

get_alphamissense(
   types = c("canonical", "non_canonical", "merged"),
   agg_fun = mean,
-  save_dir = cache_dir(),
+  save_dir = cache_dir(),
   force_new = FALSE
 )
 
@@ -83,7 +83,8 @@ 

Get functions

agg_by = c("disease_id", "gene_symbol"), dict = c(Definitive = 6, Strong = 5, Moderate = 4, Supportive = 3, Limited = 2, `Disputed Evidence` = 1, `Refuted Evidence` = 0, `No Known Disease Relationship` = 0), - save_dir = cache_dir() + save_dir = cache_dir(), + force_new = FALSE ) get_gene_lengths(genes, keep_chr = c(seq(22), "X", "Y"), ensembl_version = 75) @@ -97,11 +98,20 @@

Get functions

get_graph_colnames(g, what = c("nodes", "edges")) +get_hpo( + lvl = 2, + force_new = FALSE, + terms = NULL, + method = "github", + save_dir = cache_dir(package = "KGExplorer"), + ... +) + get_medgen_maps() -get_metadata_omim(save_dir = cache_dir()) +get_metadata_omim(save_dir = cache_dir()) -get_metadata_orphanet(save_dir = cache_dir()) +get_metadata_orphanet(save_dir = cache_dir()) get_monarch( queries = NULL, @@ -109,7 +119,7 @@

Get functions

domain = "https://data.monarchinitiative.org", subdir = "latest/tsv/all_associations/", rbind = FALSE, - save_dir = cache_dir() + save_dir = cache_dir() ) get_monarch_files( @@ -120,7 +130,7 @@

Get functions

omit = c("...", "md5sums", "index.html") ) -get_monarch_kg(as_graph = TRUE, save_dir = cache_dir(), force_new = FALSE, ...) +get_monarch_kg(as_graph = TRUE, save_dir = cache_dir(), force_new = FALSE, ...) get_monarch_models( maps = list(m2d = c("model", "disease")), @@ -140,27 +150,36 @@

Get functions

"relatedmatch", "hasdbxref"), top_n = NULL, top_by = c("subject", "object"), - save_dir = cache_dir() + save_dir = cache_dir() ) get_mondo_maps_files(map_types, map_to, save_dir) -get_ols_options(ol = rols::Ontologies()) +get_ols_options(ol = rols::Ontologies()) get_ontology( - name = c("mondo", "hp", "upheno", "uberon", "cl"), - method = c("rols", "github"), + name = c("mondo", "hp", "upheno", "uberon", "cl")[1], + method = c("github", "rols")[1], + filetype = ".obo", + import_func = NULL, terms = NULL, add_metadata = TRUE, - add_ancestors = 2, + lvl = 2, add_n_edges = TRUE, add_ontology_levels = TRUE, - save_dir = cache_dir(), + save_dir = cache_dir(), force_new = FALSE, ... ) -get_ontology_dict(ont, from = "id", to = "name", include_self = FALSE) +get_ontology_dict( + ont, + from = "short_id", + to = c("name", "label", "term"), + include_self = FALSE, + include_alternative_terms = FALSE, + as_datatable = FALSE +) get_ontology_levels( ont, @@ -171,7 +190,7 @@

Get functions

reverse = FALSE ) -get_pli(agg_fun = mean, save_dir = cache_dir(), force_new = FALSE) +get_pli(agg_fun = mean, save_dir = cache_dir(), force_new = FALSE) get_prevalence( method = c("orphanet", "oard"), @@ -180,7 +199,7 @@

Get functions

... ) -get_ttd(save_dir = cache_dir(), run_map_genes = TRUE) +get_ttd(save_dir = cache_dir(), force_new = FALSE, run_map_genes = TRUE) get_upheno(file = c("ontology", "bestmatches", "upheno_mapping")) @@ -200,31 +219,33 @@

Source

Arguments

-
types
+ + +
types

A character vector of types to return.

-
agg_fun
+
agg_fun

A function to aggregate multiple transcripts per gene.

-
save_dir
+
save_dir

Directory to save a file to.

-
force_new
+
force_new

If TRUE, force a new download.

-
as_granges
+
as_granges

Return the object as a GRanges.

-
annotate
+
annotate

Add variant annotations with map_variants.

-
name
+
name
  • <...>Any ontology name from get_ols_options

  • "mondo" Import the Mondo ontology. @@ -237,7 +258,7 @@

    Arguments

-
package
+
package

a character vector giving the package(s) to look in for data sets, or NULL.

By default, all packages in the search path are used, then @@ -245,55 +266,55 @@

Arguments

directory.

-
ont
+
ont

An ontology of class ontology_DAG.

-
from
+
from

The designated from column in from-to mapping or relations.

-
to
+
to

A character string specifying the format to convert to.

-
agg_by
+
agg_by

Column names to aggregate results by.

-
dict
+
dict

A named vector of evidence score mappings. See here for more information.

-
genes
+
genes

A character vector of gene symbols

-
keep_chr
+
keep_chr

Which chromosomes to keep.

-
ensembl_version
+
ensembl_version

Which Ensembl database version to use.

-
maps
-

A list of paired to/from types to filter Monarch association -files by. For example, list(c("gene","disease")) will return any +

maps
+

A list of paired to/from types to filter Monarch association +files by. For example, list(c("gene","disease")) will return any files that contains gene-disease associations. Passes to get_monarch_files.

-
run_map_mondo
+
run_map_mondo

Run map_mondo to map MONDO IDs to disease IDs.

-
...
-

Arguments passed on to link_monarch, data.table::fread, data.table::fread, get_ontology_github

node_filters
-

A named list of filters to apply to the node data. -Names should be name of the metadata column, and values should be a vector of +

...
+

Arguments passed on to link_monarch, get_ontology, data.table::fread, data.table::fread, get_ontology_github

node_filters
+

A named list of filters to apply to the node data. +Names should be name of the metadata column, and values should be a vector of valid options. For example, list("type" = c("gene","variant")) will return any rows where the "type" column contains either "gene" or "variant".

@@ -341,7 +362,7 @@

Arguments

"integer64" (default) reads columns detected as containing integers larger than 2^31 as type bit64::integer64. Alternatively, "double"|"numeric" reads as utils::read.csv does; i.e., possibly with loss of precision and if so silently. Or, "character".

dec
-

The decimal separator as in utils::read.csv. If not "." (default) then usually ",". See details.

+

The decimal separator as in utils::read.csv. When "auto" (the default), an attempt is made to decide whether "." or "," is more suitable for this input. See details.

col.names

A vector of optional names for the variables (columns). The default is to use the header column if present or detected, or if not "V" followed by the column number. This is applied after check.names and before key and index.

@@ -356,19 +377,19 @@

Arguments

By default ("\""), if a field starts with a double quote, fread handles embedded quotes robustly as explained under Details. If it fails, then another attempt is made to read the field as is, i.e., as if quotes are disabled. By setting quote="", the field is always read as if quotes are disabled. It is not expected to ever need to pass anything other than \"\" to quote; i.e., to turn it off.

strip.white
-

default is TRUE. Strips leading and trailing whitespaces of unquoted fields. If FALSE, only header trailing spaces are removed.

+

Logical, default TRUE, in which case leading and trailing whitespace is stripped from unquoted "character" fields. "numeric" fields are always stripped of leading and trailing whitespace.

fill
-

logical (default is FALSE). If TRUE then in case the rows have unequal length, blank fields are implicitly filled.

+

logical or integer (default is FALSE). If TRUE then in case the rows have unequal length, number of columns is estimated and blank fields are implicitly filled. If an integer is provided it is used as an upper bound for the number of columns. If fill=Inf then the whole file is read for detecting the number of columns.

blank.lines.skip

logical, default is FALSE. If TRUE blank lines in the input are ignored.

key
-

Character vector of one or more column names which is passed to setkey. It may be a single comma separated string such as key="x,y,z", or a vector of names such as key=c("x","y","z"). Only valid when argument data.table=TRUE. Where applicable, this should refer to column names given in col.names.

+

Character vector of one or more column names which is passed to setkey. Only valid when argument data.table=TRUE. Where applicable, this should refer to column names given in col.names.

index
-

Character vector or list of character vectors of one or more column names which is passed to setindexv. As with key, comma-separated notation like index="x,y,z" is accepted for convenience. Only valid when argument data.table=TRUE. Where applicable, this should refer to column names given in col.names.

+

Character vector or list of character vectors of one or more column names which is passed to setindexv. As with key, comma-separated notation like index="x,y,z" is accepted for convenience. Only valid when argument data.table=TRUE. Where applicable, this should refer to column names given in col.names.

showProgress

TRUE displays progress on the console if the ETA is greater than 3 seconds. It is produced in fread's C code where the very nice (but R level) txtProgressBar and tkProgressBar are not easily available.

@@ -397,139 +418,152 @@

Arguments

tz

Relevant to datetime values which have no Z or UTC-offset at the end, i.e. unmarked datetime, as written by utils::write.csv. The default tz="UTC" reads unmarked datetime as UTC POSIXct efficiently. tz="" reads unmarked datetime as type character (slowly) so that as.POSIXct can interpret (slowly) the character datetimes in local timezone; e.g. by using "POSIXct" in colClasses=. Note that fwrite() by default writes datetime in UTC including the final Z and therefore fwrite's output will be read by fread consistently and quickly without needing to use tz= or colClasses=. If the TZ environment variable is set to "UTC" (or "" on non-Windows where unset vs `""` is significant) then the R session's timezone is already UTC and tz="" will result in unmarked datetimes being read as UTC POSIXct. For more information, please see the news items from v1.13.0 and v1.14.0.

-
filetype
-

File type to search for.

-
repo

Repository name in format "owner/repo". Defaults to guess_repo().

tag

tag for the GitHub release to which this data should be attached.

- +
-
g
-

ggnetwork object -(or an igraph/tbl_graph to be converted to ggnetwork format).

+
g
+

tbl_graph object.

-
what
+
what

What should get activated? Possible values are nodes or edges.

-
queries
-

A list of free-form substring queries to filter files by -(using any column in the metadata). -For example, list("gene_disease","variant_disease") will return any - files that contain either of the substrings +

lvl
+

Depth of the ancestor terms to add. +Will get the closest ancestor to this level if none have this exact level.

+ + +
terms
+

A vector of ontology term IDs.

+ + +
method
+

Compute ontology levels using:

+ + +
queries
+

A list of free-form substring queries to filter files by +(using any column in the metadata). +For example, list("gene_disease","variant_disease") will return any + files that contain either of the substrings "gene_disease" or "variant_disease". Passes to get_monarch_files.

-
domain
+
domain

Web domain to search for Monarch files.

-
subdir
+
subdir

Subdirectory path to search for Monarch files within domain.

-
rbind
-

If TRUE, rbinds all data.tables -together. Otherwise, returns a named list of separated -data.tables.

+
rbind
+

If TRUE, rbinds all data.tables +together. Otherwise, returns a named list of separated +data.tables.

-
omit
+
omit

Files to omit from results.

-
as_graph
+
as_graph

Return the object as a tbl_graph.

-
filters
-

A named list, where each element in the list is the name of -a column in the data, and the vector within each element represents the +

filters
+

A named list, where each element in the list is the name of +a column in the data, and the vector within each element represents the values to include in the final data.

-
input_col
-

Column containing IDs.

+
input_col
+

Column name of input IDs.

-
map_orthologs
+
map_orthologs

Add gene-level data.

-
map_types
+
map_types

Mapping types to include.

-
map_to
+
map_to

Mapping outputs to include (from Mondo IDs to another database's IDs).

-
map_type_order
+
map_type_order

The order in which map_types will be prioritised when filtering the top_n rows by groupings.

-
top_n
+
top_n

Top number of mappings to return per top_by grouping. Set to NULL to skip this step.

-
top_by
+
top_by

Grouping columns when selecting top_n rows per grouping. Can be a character vector of one or more column names.

-
ol
-

An Ontologies object.

+
ol
+

An Ontologies object.

-
method
-

Compute ontology levels using:

+
filetype
+

File type to search for.

-
terms
-

Term IDs to include. Can alternatively be an integer, -which will be used to randomly sample N terms from the data.

+
import_func
+

Function to import the ontology with. +If NULL, automatically tries to choose the correct function.

-
add_metadata
+
add_metadata

Add metadata to the resulting ontology object.

-
add_ancestors
-

Add ancestors for each term.

- - -
add_n_edges
+
add_n_edges

Add the number of edges (connections) for each term.

-
add_ontology_levels
+
add_ontology_levels

Add the ontology level for each term.

-
include_self
+
include_self

For dag_offspring() and dag_ancestors(), this controls whether to also include the query term itself.

-
remove_terms
+
include_alternative_terms
+

Include alternative terms in the dictionary.

+ + +
as_datatable
+

Return as a data.table instead of a named vector.

+ + +
remove_terms

Character vector of term IDs to exclude.

-
absolute
+
absolute

Make the levels absolute in the sense that they consider the entire ontology (TRUE). Otherwise, levels will be relative to only the terms that are in @@ -537,22 +571,22 @@

Arguments

to a given cluster of terms (FALSE).

-
reverse
+
reverse

If TRUE, ontology level numbers with be revered such that the level of the parent terms are larger than the child terms.

-
include_mondo
+
include_mondo

Include MONDO IDs in the output.

-
run_map_genes
-

Map genes to standardised HGNC symbols using +

run_map_genes
+

Map genes to standardised HGNC symbols using map_genes.

-
file
+
file

Can be one of the following:

-
obj
+
obj

An object.

-
return_version
+
return_version

Return the version as a character string.

-
verbose
+
verbose

Print messages.

Value

- - -

Data.

- - +

Data.

A named list of data.tables of AlphaMissense predictions.

- - -

data.table with columns:

Functions

- +
  • get_alphamissense(): get_ Get AlphaMissense predictions

    Get gene-level @@ -632,7 +647,7 @@

    Functions

    ClinSigSimple integer, 0 = no current value of Likely pathogenic; Pathogenic; Likely pathogenic, low penetrance; Pathogenic, low penetrance; Likely risk allele; or Risk allele 1 = at least one current record submitted with an interpretation of Likely pathogenic; Pathogenic; -Likely pathogenic, low penetrance; Pathogenic, low penetrance; Likely risk allele; +Likely pathogenic, low penetrance; Pathogenic, low penetrance; Likely risk allele; or Risk allele (independent of whether that record includes assertion criteria and evidence). -1 = no values for clinical significance at all for this variant or set of variants; used for the "included" variants that are only in ClinVar because they are included in a @@ -651,7 +666,10 @@

    Functions

    Get GenCC

    Get phenotype-gene evidence score from the Gene Curation Coalition. -Data downloaded from here.
    NOTE: Due to licensing restrictions, a GenCC download does not +Note that the column "submitted_as_moi_id" indicates the mechanism of action + (e.g. "Autosomal dominant inheritance"), not specific HPO phenotypes. +Set agg_by=NULL to return raw unaggregated data.

    +

    Data downloaded from here.
    NOTE: Due to licensing restrictions, a GenCC download does not include OMIM data. OMIM data can be accessed and downloaded through OMIM.
    NOTE: GenCC does not currently have any systematic versioning. There for the attr(obj,"version") attribute is set to the date it was @@ -665,6 +683,16 @@

    Functions

  • get_graph_colnames(): get_ Get column names in the nodes and/or edges of a tbl_graph.

  • +
  • get_hpo(): get_ +Get Human Phenotype Ontology (HPO)

    +

    Updated version of Human Phenotype Ontology (HPO). +Created from the OBO files distributed by the HPO project's +GitHub. +Adapted from get_hpo.

    +

    By comparison, the hpo data from ontologyIndex is from 2016. +Note that the maximum ontology level depth in the 2016 version was 14, +whereas in the 2023 version the maximum ontology level depth is 16 + (due to an expansion of the HPO).

  • get_medgen_maps(): get_ Get MedGen maps.

  • get_metadata_omim(): get_

  • @@ -679,13 +707,13 @@

    Functions

    for all associations data, specifically.

  • get_monarch_files(): get_ Monarch files

    -

    Find files +

    Find files Monarch Initiative server.

  • get_monarch_kg(): get_ Get knowledge graph: Monarch

    -

    Imports the entire Monarch knowledge graph containing >500,000 nodes -and >10,000,000 edges across many categories +

    Imports the entire Monarch knowledge graph containing >500,000 nodes +and >10,000,000 edges across many categories (e.g. Disease, Phenotypes, Cell Types, etc.).

    Option 1: Use the biolink API to efficiently extract specific subset of data @@ -695,8 +723,8 @@

    Functions

  • get_monarch_models(): get_ Get Monarch models

    Get disease-to-model mappings for multiple model species. -Additionally maps mondo IDs to OMIM and Orphanet IDs. -NOTE, adding additional maps +Additionally maps mondo IDs to OMIM and Orphanet IDs. +NOTE, adding additional maps will drastically reduce the number of results.

  • get_mondo_maps(): get_ Get Mondo ID maps

    @@ -736,13 +764,13 @@

    Functions

    Get prevalence

    Get epidemiological disease and phenotype prevalence data.

  • get_ttd(): get_

  • -
  • get_upheno(): get_ +

  • get_upheno(): get_ Get uPheno

    Get data from the Unified Phenotype Ontology (uPheno).

  • get_version(): get_ Get version

    -

    For a given ontology, extract the precise version of the Release that the +

    For a given ontology, extract the precise version of the Release that the data object was built from. For Human Phenotype Ontology specifically, all Releases can be found at the official @@ -751,31 +779,25 @@

    Functions

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     am <- get_alphamissense()
    -}
    +} # }
     ont <- get_ontology("hp", terms=10)
    -#>  All local files already up-to-date!
    -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl
    -#> Adding term metadata.
    -#> IC_method: IC_offspring
    -#> Adding ancestor metadata.
    -#> Getting absolute ontology level for 25,301 IDs.
    -#> 900 ancestors found at level 2
    -#> Translating all terms to names.
    -#> + Returning a vector of terms (same order as input).
    -#> Converted ontology to: adjacency 
    -#> Getting absolute ontology level for 25,301 IDs.
    +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
     #> Randomly sampling 10 term(s).
     def <- get_definitions(ont)
     d <- get_gencc()
     #> Gathering data from GenCC.
    -#> + Version: 2024-02-02
    +#> Evidence scores for: 
    +#>  - 10514 diseases 
    +#>  - 5171 genes
    +#> + Version: 2024-12-18
     genes <- get_genes_disease()
     #> Filtering with `maps`.
     #> Files found: 1
     #> Constructing data: gene <--> disease
     #> genes(s): 0
    +hpo <- get_hpo()
     dat <- get_monarch(maps=list(c("gene","disease")))
     #> Filtering with `maps`.
     #> Files found: 1
    @@ -783,9 +805,9 @@ 

    Examples

    #> - 1/1: gene_disease.all files <- get_monarch_files() #> Files found: 35 -if (FALSE) { +if (FALSE) { # \dontrun{ g <- get_monarch_kg(save_dir=tempdir(), nrows=100) -} +} # } models <- get_monarch_models() #> Filtering with `maps`. #> Files found: 1 @@ -795,275 +817,139 @@

    Examples

    #> Loading required namespace: downloadR #> Downloading with download.file. #> download.file download successful. -#> Time difference of 0.8 secs +#> Time difference of 0.6 secs mondo <- get_ontology(name="mondo") -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/mondo.owl +#> ⠙ Iterating 5 done (2.2/s) | 2.2s +#> ⠹ Iterating 10 done (2.8/s) | 3.6s +#> ⠹ Iterating 14 done (3.1/s) | 4.5s +#> Preparing ontology_index object from: https://github.com/monarch-initiative/mondo/releases/download/v2024-12-03/mondo.obo +#> Parsing [Typedef] sections in the obo file [268/268] +#> remove 2 obsolete terms +#> Parsing [Term] sections in the obo file [1000/54683] +#> Parsing [Term] sections in the obo file [2000/54683] +#> Parsing [Term] sections in the obo file [3000/54683] +#> Parsing [Term] sections in the obo file [4000/54683] +#> Parsing [Term] sections in the obo file [5000/54683] +#> Parsing [Term] sections in the obo file [6000/54683] +#> Parsing [Term] sections in the obo file [7000/54683] +#> Parsing [Term] sections in the obo file [8000/54683] +#> Parsing [Term] sections in the obo file [9000/54683] +#> Parsing [Term] sections in the obo file [10000/54683] +#> Parsing [Term] sections in the obo file [11000/54683] +#> Parsing [Term] sections in the obo file [12000/54683] +#> Parsing [Term] sections in the obo file [13000/54683] +#> Parsing [Term] sections in the obo file [14000/54683] +#> Parsing [Term] sections in the obo file [15000/54683] +#> Parsing [Term] sections in the obo file [16000/54683] +#> Parsing [Term] sections in the obo file [17000/54683] +#> Parsing [Term] sections in the obo file [18000/54683] +#> Parsing [Term] sections in the obo file [19000/54683] +#> Parsing [Term] sections in the obo file [20000/54683] +#> Parsing [Term] sections in the obo file [21000/54683] +#> Parsing [Term] sections in the obo file [22000/54683] +#> Parsing [Term] sections in the obo file [23000/54683] +#> Parsing [Term] sections in the obo file [24000/54683] +#> Parsing [Term] sections in the obo file [25000/54683] +#> Parsing [Term] sections in the obo file [26000/54683] +#> Parsing [Term] sections in the obo file [27000/54683] +#> Parsing [Term] sections in the obo file [28000/54683] +#> Parsing [Term] sections in the obo file [29000/54683] +#> Parsing [Term] sections in the obo file [30000/54683] +#> Parsing [Term] sections in the obo file [31000/54683] +#> Parsing [Term] sections in the obo file [32000/54683] +#> Parsing [Term] sections in the obo file [33000/54683] +#> Parsing [Term] sections in the obo file [34000/54683] +#> Parsing [Term] sections in the obo file [35000/54683] +#> Parsing [Term] sections in the obo file [36000/54683] +#> Parsing [Term] sections in the obo file [37000/54683] +#> Parsing [Term] sections in the obo file [38000/54683] +#> Parsing [Term] sections in the obo file [39000/54683] +#> Parsing [Term] sections in the obo file [40000/54683] +#> Parsing [Term] sections in the obo file [41000/54683] +#> Parsing [Term] sections in the obo file [42000/54683] +#> Parsing [Term] sections in the obo file [43000/54683] +#> Parsing [Term] sections in the obo file [44000/54683] +#> Parsing [Term] sections in the obo file [45000/54683] +#> Parsing [Term] sections in the obo file [46000/54683] +#> Parsing [Term] sections in the obo file [47000/54683] +#> Parsing [Term] sections in the obo file [48000/54683] +#> Parsing [Term] sections in the obo file [49000/54683] +#> Parsing [Term] sections in the obo file [50000/54683] +#> Parsing [Term] sections in the obo file [51000/54683] +#> Parsing [Term] sections in the obo file [52000/54683] +#> Parsing [Term] sections in the obo file [53000/54683] +#> Parsing [Term] sections in the obo file [54000/54683] +#> Parsing [Term] sections in the obo file [54683/54683] +#> remove 4250 obsolete terms +#> There are more than one root: +#> BFO:0000001, CHEBI:24431, CHEBI:36342, CHEBI:50906, ECTO:0000015, +#> and other 29 terms ... +#> A super root (~~all~~) is added. #> Adding term metadata. #> IC_method: IC_offspring #> Adding ancestor metadata. -#> Getting absolute ontology level for 31,550 IDs. -#> 2412 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). +#> Getting absolute ontology level for 50,425 IDs. +#> 206 ancestors found at level 2 +#> Translating ontology terms to names. +#> Translating ontology terms to ids. #> Converted ontology to: adjacency -#> Getting absolute ontology level for 31,550 IDs. -if (FALSE) { +#> Getting absolute ontology level for 50,425 IDs. +#> Saving ontology --> /github/home/.cache/R/KGExplorer/mondo.rds +if (FALSE) { # \dontrun{ hp <- get_ontology(name="hp") upheno <- get_ontology(name="upheno") -} +} # } ont <- get_ontology("hp", terms=10) -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 25,301 IDs. -#> 900 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 25,301 IDs. +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds #> Randomly sampling 10 term(s). dict <- get_ontology_dict(ont) ont <- get_ontology("hp") -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 25,301 IDs. -#> 900 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 25,301 IDs. +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds terms <- ont@terms[1:10] lvls <- get_ontology_levels(ont, terms = terms) #> Getting absolute ontology level for 10 IDs. lvls_rel <- get_ontology_levels(ont, terms = terms, absolute=FALSE) #> Getting relative ontology level for 10 IDs. -if (FALSE) { +#> Translating ontology terms to ids. +if (FALSE) { # \dontrun{ pli <- get_pli() -} -if (FALSE) { +} # } +if (FALSE) { # \dontrun{ get_prevalence() -} -if (FALSE) { +} # } ttd <- get_ttd() -} +#> Loading required namespace: readxl +#> Retrieving all organisms available in gprofiler. +#> Using stored `gprofiler_orgs`. +#> Mapping species name: hsapiens +#> 1 organism identified from search: hsapiens +#> 13,815 / 27,118 (50.94%) genes mapped. upheno <- get_upheno() -#> Ontology not found via 'rols.' Trying method='github'.' -#> All local files already up-to-date! -#> Downloading https://purl.obolibrary.org/obo/upheno/v2/upheno.owl... -#> Converting filea03f31112d25_upheno.owl to the obo format. -#> '/usr/bin/java' -jar '/github/home/.cache/R/KGExplorer/robot.jar' convert --input '/tmp/RtmpSu2waH/filea03f31112d25_upheno.owl' --format obo --output '/tmp/RtmpSu2waH/filea03f6cfc7aa6.obo.gz' --check false -#> Parsing [Typedef] sections in the obo file [443/443] -#> remove 10 obsolete terms -#> Parsing [Term] sections in the obo file [1000/175632] -#> Parsing [Term] sections in the obo file [2000/175632] -#> Parsing [Term] sections in the obo file [3000/175632] -#> Parsing [Term] sections in the obo file [4000/175632] -#> Parsing [Term] sections in the obo file [5000/175632] -#> Parsing [Term] sections in the obo file [6000/175632] -#> Parsing [Term] sections in the obo file [7000/175632] -#> Parsing [Term] sections in the obo file [8000/175632] -#> Parsing [Term] sections in the obo file [9000/175632] -#> Parsing [Term] sections in the obo file [10000/175632] -#> Parsing [Term] sections in the obo file [11000/175632] -#> Parsing [Term] sections in the obo file [12000/175632] -#> Parsing [Term] sections in the obo file [13000/175632] -#> Parsing [Term] sections in the obo file [14000/175632] -#> Parsing [Term] sections in the obo file [15000/175632] -#> Parsing [Term] sections in the obo file [16000/175632] -#> Parsing [Term] sections in the obo file [17000/175632] -#> Parsing [Term] sections in the obo file [18000/175632] -#> Parsing [Term] sections in the obo file [19000/175632] -#> Parsing [Term] sections in the obo file [20000/175632] -#> Parsing [Term] sections in the obo file [21000/175632] -#> Parsing [Term] sections in the obo file [22000/175632] -#> Parsing [Term] sections in the obo file [23000/175632] -#> Parsing [Term] sections in the obo file [24000/175632] -#> Parsing [Term] sections in the obo file [25000/175632] -#> Parsing [Term] sections in the obo file [26000/175632] -#> Parsing [Term] sections in the obo file [27000/175632] -#> Parsing [Term] sections in the obo file [28000/175632] -#> Parsing [Term] sections in the obo file [29000/175632] -#> Parsing [Term] sections in the obo file [30000/175632] -#> Parsing [Term] sections in the obo file [31000/175632] -#> Parsing [Term] sections in the obo file [32000/175632] -#> Parsing [Term] sections in the obo file [33000/175632] -#> Parsing [Term] sections in the obo file [34000/175632] -#> Parsing [Term] sections in the obo file [35000/175632] -#> Parsing [Term] sections in the obo file [36000/175632] -#> Parsing [Term] sections in the obo file [37000/175632] -#> Parsing [Term] sections in the obo file [38000/175632] -#> Parsing [Term] sections in the obo file [39000/175632] -#> Parsing [Term] sections in the obo file [40000/175632] -#> Parsing [Term] sections in the obo file [41000/175632] -#> Parsing [Term] sections in the obo file [42000/175632] -#> Parsing [Term] sections in the obo file [43000/175632] -#> Parsing [Term] sections in the obo file [44000/175632] -#> Parsing [Term] sections in the obo file [45000/175632] -#> Parsing [Term] sections in the obo file [46000/175632] -#> Parsing [Term] sections in the obo file [47000/175632] -#> Parsing [Term] sections in the obo file [48000/175632] -#> Parsing [Term] sections in the obo file [49000/175632] -#> Parsing [Term] sections in the obo file [50000/175632] -#> Parsing [Term] sections in the obo file [51000/175632] -#> Parsing [Term] sections in the obo file [52000/175632] -#> Parsing [Term] sections in the obo file [53000/175632] -#> Parsing [Term] sections in the obo file [54000/175632] -#> Parsing [Term] sections in the obo file [55000/175632] -#> Parsing [Term] sections in the obo file [56000/175632] -#> Parsing [Term] sections in the obo file [57000/175632] -#> Parsing [Term] sections in the obo file [58000/175632] -#> Parsing [Term] sections in the obo file [59000/175632] -#> Parsing [Term] sections in the obo file [60000/175632] -#> Parsing [Term] sections in the obo file [61000/175632] -#> Parsing [Term] sections in the obo file [62000/175632] -#> Parsing [Term] sections in the obo file [63000/175632] -#> Parsing [Term] sections in the obo file [64000/175632] -#> Parsing [Term] sections in the obo file [65000/175632] -#> Parsing [Term] sections in the obo file [66000/175632] -#> Parsing [Term] sections in the obo file [67000/175632] -#> Parsing [Term] sections in the obo file [68000/175632] -#> Parsing [Term] sections in the obo file [69000/175632] -#> Parsing [Term] sections in the obo file [70000/175632] -#> Parsing [Term] sections in the obo file [71000/175632] -#> Parsing [Term] sections in the obo file [72000/175632] -#> Parsing [Term] sections in the obo file [73000/175632] -#> Parsing [Term] sections in the obo file [74000/175632] -#> Parsing [Term] sections in the obo file [75000/175632] -#> Parsing [Term] sections in the obo file [76000/175632] -#> Parsing [Term] sections in the obo file [77000/175632] -#> Parsing [Term] sections in the obo file [78000/175632] -#> Parsing [Term] sections in the obo file [79000/175632] -#> Parsing [Term] sections in the obo file [80000/175632] -#> Parsing [Term] sections in the obo file [81000/175632] -#> Parsing [Term] sections in the obo file [82000/175632] -#> Parsing [Term] sections in the obo file [83000/175632] -#> Parsing [Term] sections in the obo file [84000/175632] -#> Parsing [Term] sections in the obo file [85000/175632] -#> Parsing [Term] sections in the obo file [86000/175632] -#> Parsing [Term] sections in the obo file [87000/175632] -#> Parsing [Term] sections in the obo file [88000/175632] -#> Parsing [Term] sections in the obo file [89000/175632] -#> Parsing [Term] sections in the obo file [90000/175632] -#> Parsing [Term] sections in the obo file [91000/175632] -#> Parsing [Term] sections in the obo file [92000/175632] -#> Parsing [Term] sections in the obo file [93000/175632] -#> Parsing [Term] sections in the obo file [94000/175632] -#> Parsing [Term] sections in the obo file [95000/175632] -#> Parsing [Term] sections in the obo file [96000/175632] -#> Parsing [Term] sections in the obo file [97000/175632] -#> Parsing [Term] sections in the obo file [98000/175632] -#> Parsing [Term] sections in the obo file [99000/175632] -#> Parsing [Term] sections in the obo file [100000/175632] -#> Parsing [Term] sections in the obo file [101000/175632] -#> Parsing [Term] sections in the obo file [102000/175632] -#> Parsing [Term] sections in the obo file [103000/175632] -#> Parsing [Term] sections in the obo file [104000/175632] -#> Parsing [Term] sections in the obo file [105000/175632] -#> Parsing [Term] sections in the obo file [106000/175632] -#> Parsing [Term] sections in the obo file [107000/175632] -#> Parsing [Term] sections in the obo file [108000/175632] -#> Parsing [Term] sections in the obo file [109000/175632] -#> Parsing [Term] sections in the obo file [110000/175632] -#> Parsing [Term] sections in the obo file [111000/175632] -#> Parsing [Term] sections in the obo file [112000/175632] -#> Parsing [Term] sections in the obo file [113000/175632] -#> Parsing [Term] sections in the obo file [114000/175632] -#> Parsing [Term] sections in the obo file [115000/175632] -#> Parsing [Term] sections in the obo file [116000/175632] -#> Parsing [Term] sections in the obo file [117000/175632] -#> Parsing [Term] sections in the obo file [118000/175632] -#> Parsing [Term] sections in the obo file [119000/175632] -#> Parsing [Term] sections in the obo file [120000/175632] -#> Parsing [Term] sections in the obo file [121000/175632] -#> Parsing [Term] sections in the obo file [122000/175632] -#> Parsing [Term] sections in the obo file [123000/175632] -#> Parsing [Term] sections in the obo file [124000/175632] -#> Parsing [Term] sections in the obo file [125000/175632] -#> Parsing [Term] sections in the obo file [126000/175632] -#> Parsing [Term] sections in the obo file [127000/175632] -#> Parsing [Term] sections in the obo file [128000/175632] -#> Parsing [Term] sections in the obo file [129000/175632] -#> Parsing [Term] sections in the obo file [130000/175632] -#> Parsing [Term] sections in the obo file [131000/175632] -#> Parsing [Term] sections in the obo file [132000/175632] -#> Parsing [Term] sections in the obo file [133000/175632] -#> Parsing [Term] sections in the obo file [134000/175632] -#> Parsing [Term] sections in the obo file [135000/175632] -#> Parsing [Term] sections in the obo file [136000/175632] -#> Parsing [Term] sections in the obo file [137000/175632] -#> Parsing [Term] sections in the obo file [138000/175632] -#> Parsing [Term] sections in the obo file [139000/175632] -#> Parsing [Term] sections in the obo file [140000/175632] -#> Parsing [Term] sections in the obo file [141000/175632] -#> Parsing [Term] sections in the obo file [142000/175632] -#> Parsing [Term] sections in the obo file [143000/175632] -#> Parsing [Term] sections in the obo file [144000/175632] -#> Parsing [Term] sections in the obo file [145000/175632] -#> Parsing [Term] sections in the obo file [146000/175632] -#> Parsing [Term] sections in the obo file [147000/175632] -#> Parsing [Term] sections in the obo file [148000/175632] -#> Parsing [Term] sections in the obo file [149000/175632] -#> Parsing [Term] sections in the obo file [150000/175632] -#> Parsing [Term] sections in the obo file [151000/175632] -#> Parsing [Term] sections in the obo file [152000/175632] -#> Parsing [Term] sections in the obo file [153000/175632] -#> Parsing [Term] sections in the obo file [154000/175632] -#> Parsing [Term] sections in the obo file [155000/175632] -#> Parsing [Term] sections in the obo file [156000/175632] -#> Parsing [Term] sections in the obo file [157000/175632] -#> Parsing [Term] sections in the obo file [158000/175632] -#> Parsing [Term] sections in the obo file [159000/175632] -#> Parsing [Term] sections in the obo file [160000/175632] -#> Parsing [Term] sections in the obo file [161000/175632] -#> Parsing [Term] sections in the obo file [162000/175632] -#> Parsing [Term] sections in the obo file [163000/175632] -#> Parsing [Term] sections in the obo file [164000/175632] -#> Parsing [Term] sections in the obo file [165000/175632] -#> Parsing [Term] sections in the obo file [166000/175632] -#> Parsing [Term] sections in the obo file [167000/175632] -#> Parsing [Term] sections in the obo file [168000/175632] -#> Parsing [Term] sections in the obo file [169000/175632] -#> Parsing [Term] sections in the obo file [170000/175632] -#> Parsing [Term] sections in the obo file [171000/175632] -#> Parsing [Term] sections in the obo file [172000/175632] -#> Parsing [Term] sections in the obo file [173000/175632] -#> Parsing [Term] sections in the obo file [174000/175632] -#> Parsing [Term] sections in the obo file [175000/175632] -#> Parsing [Term] sections in the obo file [175632/175632] -#> remove 1822 obsolete terms +#> ⠙ Iterating 5 done (2.2/s) | 2.3s +#> ⠙ Iterating 14 done (2.9/s) | 4.8s +#> Parsing 279 <owl:ObjectProperty> ... +#> remove 2 obsolete terms +#> Parsing 190124 <owl:Class> ... +#> Parsing 87972 <rdf:Description> ... +#> remove 17351 obsolete terms #> There are more than one root: -#> APO:0000001, APO:0000006, APO:0000018, BFO:0000001, BTO:0000000, -#> and other 323 terms ... +#> BFO:0000001, BSPO:0000005, BSPO:0000010, BSPO:0000070, BSPO:0000086, +#> and other 14 terms ... #> A super root (~~all~~) is added. #> Adding term metadata. #> IC_method: IC_offspring #> Adding ancestor metadata. -#> Getting absolute ontology level for 173,206 IDs. -#> 769 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). +#> Getting absolute ontology level for 172,772 IDs. +#> 114 ancestors found at level 2 +#> Translating ontology terms to names. +#> Translating ontology terms to ids. #> Converted ontology to: adjacency -#> Getting absolute ontology level for 173,206 IDs. +#> Getting absolute ontology level for 172,772 IDs. +#> Saving ontology --> /github/home/.cache/R/KGExplorer/upheno.rds obj <- get_ontology("hp") -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 25,301 IDs. -#> 900 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 25,301 IDs. +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds get_version(obj=obj) -#> + Version: 2024-01-16 +#> + Version: releases
    @@ -1078,15 +964,15 @@

    Examples

  • -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_ontology_descendants.html b/reference/get_ontology_descendants.html new file mode 100644 index 0000000..6e72148 --- /dev/null +++ b/reference/get_ontology_descendants.html @@ -0,0 +1,143 @@ + +Get ontology descendants — get_ontology_descendants • KGExplorer + + +
    +
    + + + +
    +
    + + +
    +

    Get the descendants of a set of ontology terms.

    +
    + +
    +
    get_ontology_descendants(ont, terms, include_self = TRUE, ...)
    +
    + +
    +

    Arguments

    + + +
    ont
    +

    An ontology of class ontology_DAG.

    + + +
    terms
    +

    A vector of ontology term IDs.

    + + +
    include_self
    +

    For dag_offspring() and dag_ancestors(), this controls whether to also include the query term itself.

    + + +
    ...
    +

    Arguments passed on to simona::dag_offspring

    dag
    +

    An ontology_DAG object.

    + +
    term
    +

    The value can be a vector of multiple term names. If it is a vector, it returns +union of the upstream/downstream terms of the selected set of terms. For dag_siblings(), +the value can only be a single term.

    + +
    in_labels
    +

    Whether the terms are represented in their names or as integer indices?

    + + +
    + +
    +
    +

    Value

    +

    A named list of descendants, where the names are the input terms.

    +
    + +
    +

    Examples

    +
    ont <- get_ontology("hp", terms=10)
    +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
    +#> Randomly sampling 10 term(s).
    +d <- get_ontology_descendants(ont, c("HP:0000001","HP:0000002"))
    +#> Translating ontology terms to ids.
    +#> Translating ontology terms to ids.
    +#> WARNING: The term HP:0000002 was not found in the ontology.
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.1.

    +
    + +
    + + + + + + + + diff --git a/reference/get_ontology_github.html b/reference/get_ontology_github.html index 53b5db6..566352a 100644 --- a/reference/get_ontology_github.html +++ b/reference/get_ontology_github.html @@ -1,9 +1,9 @@ -Get ontology from GitHub and import it via import_ontology. — get_ontology_github • KGExplorerGet ontology from GitHub and import it via import_ontology. — get_ontology_github • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -69,10 +69,10 @@

    Get ontology from GitHub and import it via
    get_ontology_github(
       name,
       repo,
    -  filetype = "-base.obo",
    +  filetype = ".obo",
       file = paste0(name, filetype),
       tag = "latest",
    -  save_dir = cache_dir(),
    +  save_dir = cache_dir(),
       force_new = FALSE,
       ...
     )

    @@ -80,7 +80,9 @@

    Get ontology from GitHub and import it via

    Arguments

    -
    name
    + + +
    name
    • <...>Any ontology name from get_ols_options

    • "mondo" Import the Mondo ontology. @@ -93,15 +95,15 @@

      Arguments

    -
    repo
    +
    repo

    Repository name in format "owner/repo". Defaults to guess_repo().

    -
    filetype
    +
    filetype

    File type to search for.

    -
    file
    +
    file

    Can be one of the following:

    -
    tag
    +
    tag

    tag for the GitHub release to which this data should be attached.

    -
    save_dir
    +
    save_dir

    Directory to save a file to.

    -
    force_new
    +
    force_new

    If TRUE, force a new download.

    -
    ...
    +
    ...

    Arguments passed on to simona::import_ontology

    verbose

    Whether to print messages.

    @@ -142,17 +144,13 @@

    Arguments

    JAVA_ARGS

    Options for java. For example you can set -Xmx20G if you want to increase the memory to 20G for java.

    - +

    Value

    - - -

    ontology_DAG

    - - +

    ontology_DAG

    @@ -167,15 +165,15 @@

    Value

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_ontology_robot.html b/reference/get_ontology_robot.html index 0d75662..5f6b328 100644 --- a/reference/get_ontology_robot.html +++ b/reference/get_ontology_robot.html @@ -1,10 +1,10 @@ -Get ontology robot — get_ontology_robot • KGExplorerGet ontology robot — get_ontology_robot • KGExplorer - +
    @@ -32,7 +32,7 @@
    - +
    @@ -73,17 +73,31 @@

    Get ontology robot

    Arguments

    -
    ...
    -

    Arguments passed on to get_data

    save_dir
    -

    Directory to save data to.

    -
    add_version
    + +
    ...
    +

    Arguments passed on to get_data

    add_version

    Add the release version to the returned object's attributes

    file
    -

    name or vector of names of files to be downloaded. If NULL, -all assets attached to the release will be downloaded.

    +

    Can be one of the following:

    • "ontology"Creates an ontology_DAG R object by + importing the OBO file directly from the official + uPheno GitHub repository.

    • +
    • "bestmatches"Returns a merged table with the best matches between + human and non-human homologous phenotypes (from multiple species). + Distributed by the official + + uPheno GitHub repository.

    • +
    • "upheno_mapping"Return a merged table with matches between human +and non-human homologous phenotypes (from multiple species). +Distributed by the + + Monarch Initiative server.

    • +
    + +
    save_dir
    +

    Directory to save a file to.

    repo

    Repository name in format "owner/repo". Defaults to guess_repo().

    @@ -95,7 +109,7 @@

    Arguments

    Should any local files of the same name be overwritten? default TRUE.

    - +
    @@ -112,15 +126,15 @@

    Arguments

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/get_opentargets.html b/reference/get_opentargets.html new file mode 100644 index 0000000..0b55dc6 --- /dev/null +++ b/reference/get_opentargets.html @@ -0,0 +1,165 @@ + +Get Open Targets — get_opentargets • KGExplorer + + +
    +
    + + + +
    +
    + + +
    +

    Get Open Targets disease-gene associations data +NOTE: If you get an error like " Cannot call parquet...", +try running arrow::install_arrow, + restarting the R session, and trying again.

    +
    + +
    +
    get_opentargets(
    +  release = "latest",
    +  data_type = c("associationByDatasourceDirect", "associationByDatasourceIndirect",
    +    "associationByDatatypeDirect", "associationByDatatypeIndirect",
    +    "associationByOverallDirect", "associationByOverallIndirect", "l2g")[1],
    +  server = "https://ftp.ebi.ac.uk/pub/databases/opentargets/",
    +  subdir = c("platform/", "genetics/")[1],
    +  subdir2 = c("/output/etl/parquet/", "/")[1],
    +  ftp = paste0(server, subdir, release, subdir2, data_type[1], "/"),
    +  save_dir = cache_dir(),
    +  force_new = FALSE
    +)
    +
    + + +
    +

    Arguments

    + + +
    release
    +

    Open Targets release version.

    + + +
    data_type
    +

    Type of data to download.

    + + +
    server
    +

    Open Targets server.

    + + +
    subdir
    +

    Open Targets subdirectory.

    + + +
    subdir2
    +

    Open Targets sub-subdirectory.

    + + +
    ftp
    +

    The final Open Targets FTP URL.

    + + +
    save_dir
    +

    Directory to save a file to.

    + + +
    force_new
    +

    If TRUE, force a new download.

    + +
    + +
    +

    Examples

    +
    d <- get_opentargets()
    +#> 3 core(s) assigned as workers (1 reserved).
    +#> 
      |                                                                            
      |                                                                      |   0%
      |                                                                            
      |=                                                                     |   1%
      |                                                                            
      |=                                                                     |   2%
      |                                                                            
      |==                                                                    |   2%
      |                                                                            
      |==                                                                    |   3%
      |                                                                            
      |==                                                                    |   4%
      |                                                                            
      |===                                                                   |   4%
      |                                                                            
      |====                                                                  |   5%
      |                                                                            
      |====                                                                  |   6%
      |                                                                            
      |=====                                                                 |   6%
      |                                                                            
      |=====                                                                 |   7%
      |                                                                            
      |=====                                                                 |   8%
      |                                                                            
      |======                                                                |   8%
      |                                                                            
      |======                                                                |   9%
      |                                                                            
      |=======                                                               |  10%
      |                                                                            
      |========                                                              |  11%
      |                                                                            
      |========                                                              |  12%
      |                                                                            
      |=========                                                             |  12%
      |                                                                            
      |=========                                                             |  13%
      |                                                                            
      |=========                                                             |  14%
      |                                                                            
      |==========                                                            |  14%
      |                                                                            
      |==========                                                            |  15%
      |                                                                            
      |===========                                                           |  16%
      |                                                                            
      |============                                                          |  16%
      |                                                                            
      |============                                                          |  17%
      |                                                                            
      |============                                                          |  18%
      |                                                                            
      |=============                                                         |  18%
      |                                                                            
      |=============                                                         |  19%
      |                                                                            
      |==============                                                        |  20%
      |                                                                            
      |===============                                                       |  21%
      |                                                                            
      |===============                                                       |  22%
      |                                                                            
      |================                                                      |  22%
      |                                                                            
      |================                                                      |  23%
      |                                                                            
      |================                                                      |  24%
      |                                                                            
      |=================                                                     |  24%
      |                                                                            
      |==================                                                    |  25%
      |                                                                            
      |==================                                                    |  26%
      |                                                                            
      |===================                                                   |  26%
      |                                                                            
      |===================                                                   |  27%
      |                                                                            
      |===================                                                   |  28%
      |                                                                            
      |====================                                                  |  28%
      |                                                                            
      |====================                                                  |  29%
      |                                                                            
      |=====================                                                 |  30%
      |                                                                            
      |======================                                                |  31%
      |                                                                            
      |======================                                                |  32%
    +#> Error: BiocParallel errors
    +#>   1 remote errors, element index: 63
    +#>   137 unevaluated and other errors
    +#>   first remote error:
    +#> Error in download.file(file, tf, quiet = TRUE, mode = "wb"): cannot open URL 'https://ftp.ebi.ac.uk/pub/databases/opentargets/platform/latest/output/etl/parquet/associationByDatasourceDirect/part-00062-37f77eb5-c1ed-4b30-bfe2-a0daf1655b4f-c000.snappy.parquet'
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.1.

    +
    + +
    + + + + + + + + diff --git a/reference/graph_to_plotly.html b/reference/graph_to_plotly.html index 9b2a524..52e5337 100644 --- a/reference/graph_to_plotly.html +++ b/reference/graph_to_plotly.html @@ -1,9 +1,9 @@ -igraph to plotly data — graph_to_plotly • KGExplorerigraph to plotly data — graph_to_plotly • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -69,7 +69,7 @@

    igraph to plotly data

    graph_to_plotly(
       g,
       ont = get_ontology("hpo"),
    -  layout_func = igraph::layout.fruchterman.reingold,
    +  layout_func = igraph::layout.fruchterman.reingold,
       dim = 3,
       id_col = "name",
       label_var = "hpo_name",
    @@ -79,97 +79,69 @@ 

    igraph to plotly data

    Arguments

    -
    g
    -

    ggnetwork object + + +

    g
    +

    ggnetwork object (or an igraph/tbl_graph to be converted to ggnetwork format).

    -
    ont
    +
    ont

    An ontology of class ontology_DAG.

    -
    layout_func
    +
    layout_func

    Layout function for the graph.

    -
    dim
    +
    dim

    Number of dimensions to create layout in.

    -
    id_col
    -

    Column containing the unique identifier for each node +

    id_col
    +

    Column containing the unique identifier for each node in a graph (e.g. "name").

    -
    label_var
    +
    label_var

    Column containing the label for each node in a graph (e.g. "hpo_name").

    -
    seed
    +
    seed

    Set the seed for reproducible clustering.

    Value

    - - -

    Named list of data.frames.

    +

    Named list of data.frames.

    Examples

    ont <- get_ontology("hp", terms=10)
    -#>  All local files already up-to-date!
    -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl
    -#> Adding term metadata.
    -#> IC_method: IC_offspring
    -#> Adding ancestor metadata.
    -#> Getting absolute ontology level for 25,301 IDs.
    -#> 900 ancestors found at level 2
    -#> Translating all terms to names.
    -#> + Returning a vector of terms (same order as input).
    -#> Converted ontology to: adjacency 
    -#> Getting absolute ontology level for 25,301 IDs.
    +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
     #> Randomly sampling 10 term(s).
     g <- ontology_to(ont, to="tbl_graph")
    +#> Translating ontology terms to ids.
     #> Converted ontology to: tbl_graph 
     p <- graph_to_plotly(g)
     #> Converting igraph to plotly data.
    -#> Translating all terms to names.
    -#> Ontology not found via 'rols.' Trying method='github'.'
    -#> Preparing ontology_index object from: https://github.com/obophenotype/human-phenotype-ontology/releases/download/v2024-01-16/hp-base.obo
    -#> Parsing [Typedef] sections in the obo file [7/7]
    -#> Parsing [Term] sections in the obo file [1000/18264]
    -#> Parsing [Term] sections in the obo file [2000/18264]
    -#> Parsing [Term] sections in the obo file [3000/18264]
    -#> Parsing [Term] sections in the obo file [4000/18264]
    -#> Parsing [Term] sections in the obo file [5000/18264]
    -#> Parsing [Term] sections in the obo file [6000/18264]
    -#> Parsing [Term] sections in the obo file [7000/18264]
    -#> Parsing [Term] sections in the obo file [8000/18264]
    -#> Parsing [Term] sections in the obo file [9000/18264]
    -#> Parsing [Term] sections in the obo file [10000/18264]
    -#> Parsing [Term] sections in the obo file [11000/18264]
    -#> Parsing [Term] sections in the obo file [12000/18264]
    -#> Parsing [Term] sections in the obo file [13000/18264]
    -#> Parsing [Term] sections in the obo file [14000/18264]
    -#> Parsing [Term] sections in the obo file [15000/18264]
    -#> Parsing [Term] sections in the obo file [16000/18264]
    -#> Parsing [Term] sections in the obo file [17000/18264]
    -#> Parsing [Term] sections in the obo file [18000/18264]
    -#> Parsing [Term] sections in the obo file [18264/18264]
    -#> remove 388 obsolete terms
    +#> Translating ontology terms to names.
    +#> ⠙ Iterating 4 done (1.9/s) | 2.1s
    +#> ⠹ Iterating 9 done (2.6/s) | 3.5s
    +#> ⠹ Iterating 14 done (3/s) | 4.7s
    +#> Importing cached file: /github/home/.cache/R/KGExplorer/hp.obo
     #> Adding term metadata.
     #> IC_method: IC_offspring
     #> Adding ancestor metadata.
    -#> Getting absolute ontology level for 17,874 IDs.
    -#> 70 ancestors found at level 2
    -#> Translating all terms to names.
    -#> + Returning a vector of terms (same order as input).
    +#> Getting absolute ontology level for 19,025 IDs.
    +#> 79 ancestors found at level 2
    +#> Translating ontology terms to names.
    +#> Translating ontology terms to ids.
     #> Converted ontology to: adjacency 
    -#> Getting absolute ontology level for 17,874 IDs.
    -#> + Returning a vector of terms (same order as input).
    +#> Getting absolute ontology level for 19,025 IDs.
    +#> Saving ontology --> /github/home/.cache/R/KGExplorer/hpo.rds
     
    @@ -184,15 +156,15 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/index.html b/reference/index.html index 9b3e393..2d03d94 100644 --- a/reference/index.html +++ b/reference/index.html @@ -1,9 +1,9 @@ -Function reference • KGExplorerPackage index • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -64,17 +64,41 @@

    All functions

    -

    add_ancestors() add_db() add_hoverboxes() add_ontology_metadata()

    +

    add_

    Add functions

    -

    cache_clear() cache_files() cache_save()

    +

    add_ancestors()

    + +

    Add ancestors

    + +

    add_db()

    + +

    Add database

    + +

    add_hoverboxes()

    + +

    Add hoverboxes

    + +

    add_ontology_metadata()

    + +

    Add ontology metadata

    + +

    cache_clear() cache_dir() cache_files() cache_save()

    Cache functions

    -

    get_alphamissense() get_clinvar() get_data_package() get_definitions() get_gencc() get_gene_lengths() get_genes_disease() get_graph_colnames() get_medgen_maps() get_metadata_omim() get_metadata_orphanet() get_monarch() get_monarch_files() get_monarch_kg() get_monarch_models() get_mondo_maps() get_mondo_maps_files() get_ols_options() get_ontology() get_ontology_dict() get_ontology_levels() get_pli() get_prevalence() get_ttd() get_upheno() get_version()

    +

    get_alphamissense() get_clinvar() get_data_package() get_definitions() get_gencc() get_gene_lengths() get_genes_disease() get_graph_colnames() get_hpo() get_medgen_maps() get_metadata_omim() get_metadata_orphanet() get_monarch() get_monarch_files() get_monarch_kg() get_monarch_models() get_mondo_maps() get_mondo_maps_files() get_ols_options() get_ontology() get_ontology_dict() get_ontology_levels() get_pli() get_prevalence() get_ttd() get_upheno() get_version()

    Get functions

    + +

    get_ontology_descendants()

    + +

    Get ontology descendants

    + +

    get_opentargets()

    + +

    Get Open Targets

    graph_to_plotly()

    @@ -87,6 +111,10 @@

    All functions link_monarch()

    Link functions

    + +

    main_

    + +

    Main functions

    map_colors() map_genes_monarch() map_medgen() map_mondo() map_ontology_terms() map_upheno() map_variants()

    @@ -99,12 +127,20 @@

    All functions map_upheno_data()

    Map uPheno data

    + +

    plot_graph_visnetwork()

    + +

    Plot graph using visNetwork.

    plot_upheno()

    Map uPheno plot

    -

    query_monarch() query_oard()

    +

    prune_ancestors()

    + +

    Prune ancestor

    + +

    query_oard()

    Query functions

    @@ -115,6 +151,14 @@

    All functions query_ubergraph()

    Query ubergraph

    + +

    set_cores()

    + +

    Set cores

    + +

    unlist_dt()

    + +

    Unlist a data.table

    - - + + diff --git a/reference/kde_surface.html b/reference/kde_surface.html index 4c3a801..0e64087 100644 --- a/reference/kde_surface.html +++ b/reference/kde_surface.html @@ -1,10 +1,10 @@ -Kernel Density Estimation (KDE) surface — kde_surface • KGExplorerKernel Density Estimation (KDE) surface — kde_surface • KGExplorer - +
    @@ -32,7 +32,7 @@
    - +
    @@ -73,35 +73,36 @@

    Kernel Density Estimation (KDE) surface

    Arguments

    -
    xyz
    + + +
    xyz

    A data.frame containing the columns "x" and "y" (required). Can also include a third column "z" (optional).

    -
    n
    +
    n

    Number of grid points in each direction. Can be scalar or a length-2 integer vector.

    -
    extend_kde
    +
    extend_kde

    Extend the limits of the KDE area by setting extend_kde>1. This makes the "mountains' of the KDE end more smoothly along the edges of the x/y coordinates.

    -
    rescale_z
    +
    rescale_z

    Rescale the z-axis so that the KDE can be positioned below the original data points (when plotting them together).

    Value

    - -
    • x, y: +

      • x, y: The x and y coordinates of the grid points, vectors of length n.

      • -
      • z: +

      • z: An n[1] by n[2] matrix of the estimated density: rows correspond to the value of x, columns to the value of y.

    @@ -127,15 +128,15 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/link_.html b/reference/link_.html index 6e3d6aa..19ceb2f 100644 --- a/reference/link_.html +++ b/reference/link_.html @@ -1,9 +1,9 @@ -Link functions — link_ • KGExplorerLink functions — link_ • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -79,55 +79,55 @@

    Link functions

    Arguments

    -
    maps
    -

    A list of paired to/from types to filter Monarch association -files by. For example, list(c("gene","disease")) will return any + + +

    maps
    +

    A list of paired to/from types to filter Monarch association +files by. For example, list(c("gene","disease")) will return any files that contains gene-disease associations. Passes to get_monarch_files.

    -
    queries
    -

    A list of free-form substring queries to filter files by -(using any column in the metadata). -For example, list("gene_disease","variant_disease") will return any - files that contain either of the substrings +

    queries
    +

    A list of free-form substring queries to filter files by +(using any column in the metadata). +For example, list("gene_disease","variant_disease") will return any + files that contain either of the substrings "gene_disease" or "variant_disease". Passes to get_monarch_files.

    -
    node_filters
    -

    A named list of filters to apply to the node data. -Names should be name of the metadata column, and values should be a vector of +

    node_filters
    +

    A named list of filters to apply to the node data. +Names should be name of the metadata column, and values should be a vector of valid options. For example, list("type" = c("gene","variant")) will return any rows where the "type" column contains either "gene" or "variant".

    -
    as_graph
    +
    as_graph

    Return the object as a tbl_graph.

    -
    domain
    +
    domain

    Web domain to search for Monarch files.

    -
    subdir
    +
    subdir

    Subdirectory path to search for Monarch files within domain.

    -
    ...
    -

    Additional arguments passed to plot-specific functions.

    +
    ...
    +

    Not used at this time.

    Value

    - - -

    Merged data.

    +

    Merged data.

    Functions

    - +
    • link_monarch(): link_ Link Monarch

      Construct a knowledge graph by iteratively linking together pairs of concepts @@ -157,15 +157,15 @@

      Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/main_.html b/reference/main_.html new file mode 100644 index 0000000..46af987 --- /dev/null +++ b/reference/main_.html @@ -0,0 +1,129 @@ + +Main functions — main_ • KGExplorer + + +
    +
    + + + +
    +
    + + +
    +

    Documentation for common arguments.

    +
    + + +
    +

    Arguments

    + + +
    ont
    +

    An ontology of class ontology_DAG.

    + + +
    terms
    +

    A vector of ontology term IDs.

    + + +
    g
    +

    tbl_graph object.

    + + +
    force_new
    +

    Create a new file instead of using any cached files.

    + + +
    save_dir
    +

    Directory to save a file to.

    + + +
    save_path
    +

    File name to save to.

    + + +
    obj
    +

    R object.

    + +
    +
    +

    Value

    +

    R object.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.1.

    +
    + +
    + + + + + + + + diff --git a/reference/map_.html b/reference/map_.html index 5ed1de9..36dcb25 100644 --- a/reference/map_.html +++ b/reference/map_.html @@ -1,9 +1,9 @@ -Map functions — map_ • KGExplorerMap functions — map_ • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -96,26 +96,29 @@

    Map functions

    add_definitions = TRUE, all.x = TRUE, allow.cartesian = FALSE, - save_dir = cache_dir() + save_dir = cache_dir() ) map_ontology_terms( ont, terms = NULL, - to = c("name", "id"), + to = c("name", "id", "short_id"), keep_order = TRUE, - invert = FALSE + invert = FALSE, + ignore_case = TRUE, + ignore_char = c("-", "/", ",", "\\."), + verbose = 1 ) map_upheno( pheno_map_method = c("upheno", "monarch"), gene_map_method = c("monarch"), - subset_db1 = c("HP"), + filters = list(db1 = "HP", gene_taxon_label1 = "Homo sapiens"), terms = NULL, fill_scores = NULL, show_plot = TRUE, force_new = FALSE, - save_dir = cache_dir() + save_dir = cache_dir() ) map_variants( @@ -135,123 +138,138 @@

    Source

    Arguments

    -
    dat
    -

    data.table with genes.

    -
    columns
    +
    dat
    +

    data.table with genes.

    + + +
    columns

    Names of columns to map colour palettes to.

    -
    as
    +
    as

    A character string specifying the format to convert to.

    -
    what
    +
    what

    What should get activated? Possible values are nodes or edges.

    -
    preferred_palettes
    +
    preferred_palettes

    Preferred palettes to use for each column.

    -
    gene_col
    +
    gene_col

    Name of the gene column in dat.

    -
    as_graph
    +
    as_graph

    Return the object as a tbl_graph.

    -
    map_by_merge
    -

    Map orthologs by merging the node data such that the -orthologous genes will appear as a new column (TRUE). -Otherwise, the orthologs will be added as new nodes to the graph +

    map_by_merge
    +

    Map orthologs by merging the node data such that the +orthologous genes will appear as a new column (TRUE). +Otherwise, the orthologs will be added as new nodes to the graph (FALSE).

    -
    all.x
    +
    all.x

    logical; if TRUE, rows from x which have no matching row in y are included. These rows will have 'NA's in the columns that are usually filled with values from y. The default is FALSE so that only rows with data from both x and y are included in the output.

    -
    input_col
    +
    input_col

    Column name of input IDs.

    -
    ...
    +
    ...

    Arguments passed on to map_mondo

    - +
    -
    output_col
    +
    output_col

    Column name of output IDs.

    -
    to
    +
    to

    Character vector of database(s) to map IDs to. When not "mondo", can supply multiple alternative databases to map to (e.g. c("OMIM","Orphanet","DECIPHER")).

    -
    map_types
    +
    map_types

    Mapping types to include.

    -
    map_to
    +
    map_to

    Mapping outputs to include (from Mondo IDs to another database's IDs).

    -
    top_n
    +
    top_n

    Top number of mappings to return per top_by grouping. Set to NULL to skip this step.

    -
    add_name
    +
    add_name

    Logical, if TRUE, add mondo name column.

    -
    add_definitions
    +
    add_definitions

    logical, if TRUE, add mondo definition column.

    -
    allow.cartesian
    -

    See allow.cartesian in [.data.table.

    +
    allow.cartesian
    +

    See allow.cartesian in [.data.table.

    -
    save_dir
    +
    save_dir

    Directory to save cached data.

    -
    ont
    +
    ont

    An ontology of class ontology_DAG.

    -
    terms
    +
    terms

    A subset of HPO IDs to include in the final dataset and plots (e.g. c("HP:0001508","HP:0001507")).

    -
    keep_order
    +
    keep_order

    Return a named list of the same length and order as terms. If FALSE, return a named list of only the unique terms, sometimes in a different order.

    -
    invert
    +
    invert

    Invert the keys/values of the dictionary, such that the key becomes the values (and vice versa).

    -
    pheno_map_method
    +
    ignore_case
    +

    Ignore case when mapping terms.

    + + +
    ignore_char
    +

    A character vector of characters to ignore when +mapping terms.

    + + +
    verbose
    +

    Print messages.

    + + +
    pheno_map_method

    Method to use for mapping phenotypes across ontologies.

    • "upheno"Use uPheno's phenotype-to-phenotype mappings. Contains fewer ontologies but with greater coverage of phenotypes.

    • "monarch"Use Monarch's phenotype-to-phenotype mappings. @@ -259,71 +277,64 @@

      Arguments

    -
    gene_map_method
    +
    gene_map_method

    Method to use for mapping genes across species.

    • "monarch"Use Monarch's gene-to-gene mappings.

    -
    subset_db1
    -

    Subset of ontologies to include in the plot.

    +
    filters
    +

    A named list, where each element in the list is the name of +a column in the data, and the vector within each element represents the +values to include in the final data.

    -
    fill_scores
    +
    fill_scores

    Fill missing scores in the "equivalence_score" and "subclass_score" columns with this value. These columns represent the quality of mapping between two phenotypes on a scale from 0-1.

    -
    show_plot
    +
    show_plot

    Show the plot.

    -
    force_new
    -

    Force new data to be downloaded and processed.

    +
    force_new
    +

    Create a new file instead of using any cached files.

    -
    gr
    +
    gr

    A GRanges object.

    -
    build
    +
    build

    Genome build to use when mapping genomic coordinates.

    -
    upstream, downstream
    -

    Single integer values representing the number of base pairs - upstream of the 5'-end and downstream of the 3'-end. Used in contructing +

    upstream, downstream
    +

    Single integer values representing the number of base pairs + upstream of the 5'-end and downstream of the 3'-end. Used in contructing PromoterVariants() and IntergenicVariants() objects only.

    -
    keep_chr
    +
    keep_chr

    Which chromosomes to keep.

    -
    ignore.strand
    +
    ignore.strand

    A logical indicating if strand should be ignored when performing overlaps.

    Value

    - - -

    Mapped data.

    - - +

    Mapped data.

    Mapped dat

    - - - -

    Character vector

    - - +

    Character vector.

    A list containing the data and plot.

    Functions

    - +
    • map_colors(): map_

    • map_genes_monarch(): map_ Map Monarch genes

      @@ -366,55 +377,29 @@

      Examples

      dat <- example_dat(rm_types="gene") dat2 <- map_mondo(dat = dat, map_to="hpo") #> Loading required namespace: echogithub -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. -#> Preexisting file detected. Set force_overwrite=TRUE to override this. +#> Searching for all branches in: monarch-initiative/mondo +#> 1 matching branch(es) found: +#> - master +#> 1,429 files found in GitHub repo: monarch-initiative/mondo +#> 70 file(s) found matching query. #> Mapping id --> mondo_id -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/mondo.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 31,550 IDs. -#> 2412 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 31,550 IDs. -#> 4 / 21 (19.05%) mondo_id missing. -#> 4 / 21 (19.05%) mondo_name missing. -#> 14 / 21 (66.67%) mondo_def missing. +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/mondo.rds +#> 4 / 20 (20%) mondo_id missing. +#> 4 / 20 (20%) mondo_name missing. +#> 9 / 20 (45%) mondo_def missing. ont <- get_ontology("hp") -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 25,301 IDs. -#> 900 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 25,301 IDs. -terms <- c("Focal motor seizure","HP:0000002","HP:0000003") +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds +terms <- c("Focal motor seizure", + "Focal MotoR SEIzure", + "Focal-motor,/seizure.", + "HP:0000002","HP:0000003") term_names <- map_ontology_terms(ont=ont, terms=terms) -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). +#> Translating ontology terms to names. term_ids <- map_ontology_terms(ont=ont, terms=terms, to="id") -#> Translating all terms to HPO IDs. -#> + Returning a vector of terms (same order as input). -if (FALSE) { +#> Translating ontology terms to ids. +if (FALSE) { # \dontrun{ res <- map_upheno() -} +} # } if(interactive()){ gr <- GenomicRanges::GRanges("1:100-10000") hits <- map_variants(gr) @@ -433,15 +418,15 @@

      Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/map_genes_dt.html b/reference/map_genes_dt.html index e3eeef3..3c44af8 100644 --- a/reference/map_genes_dt.html +++ b/reference/map_genes_dt.html @@ -1,9 +1,9 @@ -Standardise genes — map_genes_dt • KGExplorerStandardise genes — map_genes_dt • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -77,23 +77,25 @@

    Standardise genes

    Arguments

    -
    dat
    + + +
    dat

    data.table

    -
    gene_col
    +
    gene_col

    character column name.

    -
    fill_na
    +
    fill_na

    logical. Fill NAs with original gene symbol.

    -
    verbose
    +
    verbose

    logical. Print messages.

    -
    ...
    +
    ...

    Arguments passed on to orthogene::map_genes

    genes

    Gene list.

    @@ -116,26 +118,24 @@

    Arguments

    namespace to use for fully numeric IDs (list of available namespaces).

    run_map_species
    -

    Standardise species names with +

    Standardise species names with map_species first (Default: TRUE).

    - +

    Value

    - - -

    data.table

    +

    data.table

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     dat <- data.table(gene_symbol = c("BRCA1","BRCA2","BRCA3"))
     dat2 <- map_genes_dt(dat)
    -}
    +} # }
     
    @@ -150,15 +150,15 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/map_upheno_data.html b/reference/map_upheno_data.html index a4f0f6a..0f99981 100644 --- a/reference/map_upheno_data.html +++ b/reference/map_upheno_data.html @@ -1,5 +1,5 @@ -Map uPheno data — map_upheno_data • KGExplorerMap uPheno data — map_upheno_data • KGExplorer - +
    @@ -43,7 +43,7 @@
    - +
    @@ -93,14 +93,17 @@

    Map uPheno data

    keep_nogenes = FALSE, fill_scores = NULL, terms = NULL, - save_dir = cache_dir(), + save_dir = cache_dir(), + agg = TRUE, force_new = FALSE )

    Arguments

    -
    pheno_map_method
    + + +
    pheno_map_method

    Method to use for mapping phenotypes across ontologies.

    • "upheno"Use uPheno's phenotype-to-phenotype mappings. Contains fewer ontologies but with greater coverage of phenotypes.

    • "monarch"Use Monarch's phenotype-to-phenotype mappings. @@ -108,47 +111,50 @@

      Arguments

    -
    gene_map_method
    +
    gene_map_method

    Method to use for mapping genes across species.

    • "monarch"Use Monarch's gene-to-gene mappings.

    -
    keep_nogenes
    +
    keep_nogenes

    Logical indicating whether to keep mappings that do not have any orthologous genes.

    -
    fill_scores
    +
    fill_scores

    Fill missing scores in the "equivalence_score" and "subclass_score" columns with this value. These columns represent the quality of mapping between two phenotypes on a scale from 0-1.

    -
    terms
    +
    terms

    A subset of HPO IDs to include in the final dataset and plots (e.g. c("HP:0001508","HP:0001507")).

    -
    save_dir
    +
    save_dir

    Directory to save cached data.

    -
    force_new
    -

    Force new data to be downloaded and processed.

    +
    agg
    +

    Aggregate the data to to phenotype-level (TRUE). +Otherwise, keep data at gene level (FALSE).

    + + +
    force_new
    +

    Create a new file instead of using any cached files.

    Value

    - - -

    A data.table containing the mapped data.

    +

    A data.table containing the mapped data.

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     pheno_map_genes_match <- map_upheno_data()
    -}
    +} # }
     
    @@ -163,15 +169,15 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/plot_-1.png b/reference/plot_-1.png index f691172..62eba66 100644 Binary files a/reference/plot_-1.png and b/reference/plot_-1.png differ diff --git a/reference/plot_-2.png b/reference/plot_-2.png index bf2a102..976e4b8 100644 Binary files a/reference/plot_-2.png and b/reference/plot_-2.png differ diff --git a/reference/plot_.html b/reference/plot_.html index 7311062..a1df722 100644 --- a/reference/plot_.html +++ b/reference/plot_.html @@ -1,9 +1,9 @@ -Plot functions — plot_ • KGExplorerPlot functions — plot_ • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -71,8 +71,8 @@

    Plot functions

    x = "region", y = "N", fill = "Type", - by = c("build", "region", "Type", "ClinSigSimple"), - rows = "ClinSigSimple" + rows = "ClinSigSimple", + by = c("build", x, fill, rows) ) plot_ggnetwork( @@ -88,7 +88,7 @@

    Plot functions

    plot_graph_3d( g, - layout_func = igraph::layout.fruchterman.reingold, + layout_func = igraph::layout.fruchterman.reingold, id_var = "name", node_color_var = "ancestor_name", edge_color_var = "zend", @@ -114,33 +114,6 @@

    Plot functions

    verbose = TRUE ) -plot_graph_visnetwork( - g, - label_var = "name", - size_var = "degree", - colour_var = size_var, - invert_colour_var = TRUE, - columns = get_graph_colnames(g), - preferred_palettes = NULL, - selectedBy = label_var, - show_plot = TRUE, - layout = "layout_with_kk", - solver = "forceAtlas2Based", - physics = FALSE, - forceAtlas2Based = list(avoidOverlap = 0.5, gravitationalConstant = -50), - scaling = NULL, - smooth = list(enabled = TRUE, type = "cubicBezier", roundness = 0.5), - add_visExport = FALSE, - degree = 1, - width = "100%", - height = "90vh", - highlight_color = "#00FFFFCF", - randomSeed = 2024, - main = NULL, - submain = NULL, - save_path = tempfile(fileext = "_visnetwork.html") -) - plot_ontology( ont, terms = NULL, @@ -154,7 +127,7 @@

    Plot functions

    plot_ontology_heatmap( ont, - annot = data.table::data.table(ont@elementMetadata), + annot = data.table::data.table(as.data.frame(ont@elementMetadata)), X = ontology_to(ont, to = "similarity"), fontsize = ont@n_terms * 4e-04, row_labels = ont@terms, @@ -176,16 +149,16 @@

    Plot functions

    plot_ontology_visnetwork(ont, ...) -plot_save(plt, path, width = 7, height = width) - -plot_ttd(dat_sub) +plot_save(plt, save_path = save_path, width = NULL, height = width) plot_upheno_heatmap( plot_dat, - ont, + lvl = 10, + ont = get_ontology("upheno", lvl = lvl), hpo_ids = NULL, value.var = c("phenotype_genotype_score", "prop_intersect", "equivalence_score", "subclass_score"), + name = value.var[1], min_rowsums = NULL, cluster_from_ontology = FALSE, save_dir = tempdir(), @@ -209,41 +182,35 @@

    Source

    Arguments

    -
    x
    -

    : Number. Default to undefined. This gives a node an initial x position. When using the hierarchical layout, either the x or y position is set by the layout engine depending on the type of view. The other value remains untouched. When using stabilization, the stabilized position may be different from the initial one. To lock the node to that position use the physics or fixed options.

    -
    y
    -

    : Number. Default to undefined. This gives a node an initial y position. When using the hierarchical layout, either the x or y position is set by the layout engine depending on the type of view. The other value remains untouched. When using stabilization, the stabilized position may be different from the initial one. To lock the node to that position use the physics or fixed options.

    - - -
    g
    -

    ggnetwork object +

    g
    +

    ggnetwork object (or an igraph/tbl_graph to be converted to ggnetwork format).

    -
    colour_var
    +
    colour_var

    Column to color nodes by.

    -
    size_var
    +
    size_var

    Column to scale node size by.

    -
    label_var
    +
    label_var

    Column containing the label for each node in a graph (e.g. "hpo_name").

    -
    interactive
    +
    interactive

    Make the plot interactive.

    -
    show_plot
    +
    show_plot

    Print the plot after it's been generated.

    -
    ...
    +
    ...

    Arguments passed on to ggplot2::aes, simona::dag_circular_viz, simona::dag_graphviz, base::plot, simona::dag_graphviz

    dag

    An ontology_Dag object.

    @@ -310,276 +277,188 @@

    Arguments

    If the parameter is set to a named vector, it can be named by relation types c("is_a" = ...), or directly relations c("a -> b" = ...). Please see the vignette for details.

    - +
    x
    +

    the coordinates of points in the plot. Alternatively, a + single plotting structure, function or any R object with a + plot method can be provided.

    + +
    y
    +

    the y coordinates of points in the plot, optional + if x is an appropriate structure.

    + +
    -
    layout_func
    +
    layout_func

    Layout function for the graph.

    -
    node_color_var
    +
    node_color_var

    Variable in the vertex metadata to color nodes by.

    -
    edge_color_var
    +
    edge_color_var

    Variable in the edge metadata to color edges by.

    -
    text_color_var
    +
    text_color_var

    Variable in the node metadata to color text by.

    -
    node_symbol_var
    +
    node_symbol_var

    Variable in the vertex metadata to shape nodes by.

    -
    node_palette
    +
    node_palette

    Color palette function for the nodes/points.

    -
    edge_palette
    +
    edge_palette

    Color palette function for the edges/lines.

    -
    node_opacity
    +
    node_opacity

    Node opacity.

    -
    edge_opacity
    +
    edge_opacity

    Edge opacity.

    -
    kde_palette
    +
    kde_palette

    Color palette function for the KDE plot.

    -
    add_kde
    +
    add_kde

    Add a kernel density estimation (KDE) plot below the 3D scatter plot (i.e. the "mountains" beneath the points).

    -
    extend_kde
    +
    extend_kde

    Extend the area that the KDE plot covers.

    -
    bg_color
    +
    bg_color

    Plot background color.

    -
    add_labels
    +
    add_labels

    Add phenotype name labels to each point.

    -
    keep_grid
    +
    keep_grid

    Keep all grid lines and axis labels.

    -
    aspectmode
    +
    aspectmode

    The proportions of the 3D plot. See the plotly documentation site for details.

    -
    hover_width
    +
    hover_width

    Maximum width of the hover text.

    -
    label_width
    +
    label_width

    Maximum width of the label text.

    -
    seed
    +
    seed

    Set the seed for reproducible clustering.

    -
    showlegend
    +
    showlegend

    Show node fill legend.

    -
    save_path
    +
    save_path

    Path to save interactive plot to as a self-contained HTML file.

    -
    verbose
    +
    verbose

    Print messages.

    -
    columns
    -

    Names of columns to map colour palettes to.

    - - -
    preferred_palettes
    -

    Preferred palettes to use for each column.

    - - -
    selectedBy
    -

    : Custom option. Character or a named list. Add a multiple selection based on column of node data.frame creating an HTML select element. Not available for DOT and Gephi.

    • "variable" : Character. Column name of selection variable.

    • -
    • "values : Optional. Vector of possible values. Default to all values in nodes data.frame.

    • -
    • "selected" : Optional. Integer/Character. Initial selection. Default to NULL

    • -
    • "style" : Optional. Character. HTML style of list. Default to 'width: 150px; height: 26px'.

    • -
    • "multiple" : Optional. Boolean. Default to FALSE. If TRUE, you can affect multiple groups per nodes using a comma ("gr1,gr2")

    • -
    • "hideColor" : Optional. String. Color for hidden nodes/edges. Use a rgba definition. Default to rgba(200,200,200,0.5)

    • -
    • "main" : Optional. Default to "Select by variable"

    • -
    • "sort" : Optional. If values is NULL, sort all possible values ?. Default to TRUE

    • -
    • "highlight" : Optional. Boolean. Run highlightNearest if defined on each selected node ? Default to FALSE

    • -
    - - -
    layout
    -

    : Character Name of igraph layout function to use. Default to "layout_nicely"

    - - -
    solver
    -

    : String. Default to 'barnesHut'. You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'. When setting the hierarchical layout, the hierarchical repulsion solver is automaticaly selected, regardless of what you fill in here.

    - - -
    physics
    -

    : Boolean. Default to FALSE. Enabled physics on nodes ?

    - - -
    forceAtlas2Based
    -

    named list of options

    • "theta" : Number. Default to 0.5. This parameter determines the boundary between consolidated long range forces and individual short range forces. To oversimplify higher values are faster but generate more errors, lower values are slower but with less errors.

    • -
    • "gravitationalConstant" : Number. Default to -50. Gravity attracts. We like repulsion. So the value is negative. If you want the repulsion to be stronger, decrease the value (so -10000, -50000).

    • -
    • "centralGravity" : Number. Default to 0.01. There is a central gravity attractor to pull the entire network back to the center.

    • -
    • "springLength" : Number. Default to 100. The edges are modelled as springs. This springLength here is the the rest length of the spring.

    • -
    • "springConstant" : Number. Default to 0.08. This is how 'sturdy' the springs are. Higher values mean stronger springs.

    • -
    • "damping" : Number. Default to 0.4. Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.

    • -
    • "avoidOverlap" : Number. Default to 0. Accepted range: [0 .. 1]. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model. Value 1 is maximum overlap avoidance.

    • -
    - - -
    scaling
    -

    : Named list. If the value option is specified, the size of the nodes will be scaled according to the properties in this object.

    • "min" : Number. Default to 10. If nodes have a value, their sizes are determined by the value, the scaling function and the min max values.

    • -
    • "max" : Number. Default to 30. This is the maximum allowed size when the nodes are scaled using the value option.

    • -
    • "label" : Named list or Boolean. Default to Named list. This can be false if the label is not allowed to scale with the node. If true it will scale using default settigns. For further customization, you can supply an object. -

      • "enabled" : Boolean. Default to false. Toggle the scaling of the label on or off. If this option is not defined, it is set to true if any of the properties in this object are defined.

      • -
      • "min" : Number. Default to 14. The minimum font-size used for labels when scaling.

      • -
      • "max" : Number. Default to 30. The maximum font-size used for labels when scaling.

      • -
      • "maxVisible" : Number. Default to 30. When zooming in, the font is drawn larger as well. You can limit the perceived font size using this option. If set to 30, the font will never look larger than size 30 zoomed at 100%.

      • -
      • "drawThreshold" : Number. Default to 5. When zooming out, the font will be drawn smaller. This defines a lower limit for when the font is drawn. When using font scaling, you can use this together with the maxVisible to first show labels of important nodes when zoomed out and only show the rest when zooming in.

      • -
    • -
    • "customScalingFunction" : Function. If nodes have value fields, this function determines how the size of the nodes are scaled based on their values.

    • -
    - - -
    smooth
    -

    : Boolean. Default to FALSE. Use smooth edges ?

    - - -
    add_visExport
    -

    Add PDF download button.

    - - -
    width
    -

    : Number. Default to 1. The width of the edge. If value is set, this is not used.

    - - -
    height
    -

    : String. Default to "100%". The height of the network in pixels or as a percentage.

    - - -
    randomSeed
    -

    : Number. The nodes are randomly positioned initially. This means that the settled result is different every time. If you provide a random seed manually, the layout will be the same every time.

    - - -
    main
    -

    : For add a title. Character or a named list.

    • "text" : Character. Title.

    • -
    • "style" : Optional. Character. HTML style of title. Default to 'font-family:Georgia, Times New Roman, Times, serif;font-weight:bold;font-size:20px;text-align:center;'.

    • -
    - - -
    submain
    -

    : For add a subtitle. Character or a named list.

    • "text" : Character. Subtitle.

    • -
    • "style" : Optional. Character. HTML style of submain. Default to 'font-family:Georgia, Times New Roman, Times, serif;font-size:12px;text-align:center;'.

    • -
    - - -
    ont
    +
    ont

    An ontology of class ontology_DAG.

    -
    terms
    -

    A subset of HPO IDs to include in the final dataset and plots -(e.g. c("HP:0001508","HP:0001507")).

    +
    terms
    +

    A vector of ontology term IDs.

    -
    types
    +
    types

    Types of graph to produce. Can be one or more.

    -
    fontsize
    +
    fontsize

    Axis labels font size.

    -
    row_labels
    +
    row_labels

    Optional row labels which are put as row names in the heatmap.

    -
    column_labels
    +
    column_labels

    Optional column labels which are put as column names in the heatmap.

    -
    name
    +
    name

    Name of the heatmap. By default the heatmap name is used as the title of the heatmap legend.

    -
    row_side_vars
    +
    row_side_vars

    Variables to include in row-side metadata annotations.

    -
    col_side_vars
    +
    col_side_vars

    Variables to include in column-side metadata annotations.

    -
    col
    +
    col

    A vector of colors if the color mapping is discrete or a color mapping function if the matrix is continuous numbers (should be generated by colorRamp2). If the matrix is continuous, the value can also be a vector of colors so that colors can be interpolated. Pass to ColorMapping. For more details and examples, please refer to https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#colors .

    -
    save_dir
    -

    Directory to save cached data.

    +
    height
    +

    Height of the heatmap body.

    + +
    width
    +

    Width of the heatmap body.

    -
    id_col
    -

    Column containing the unique identifier for each node + +

    save_dir
    +

    Directory to save a file to.

    + + +
    id_col
    +

    Column containing the unique identifier for each node in a graph (e.g. "name").

    -
    top_targets
    -

    data.table of prioritised targets +

    top_targets
    +

    data.table of prioritised targets generated by prioritise_targets.

    Value

    - - -

    A named list containing the plot and the data.

    - - +

    A named list containing the plot and the data.

    A 3D interactive plotly object.

    - -

    Null

    - -

    Null

    - -

    Plot

    - -

    Null

    - -

    Null

    Functions

    - +
    • plot_clinvar(): plot_ Plot mapped variant annotations.

    • plot_ggnetwork(): plot_ @@ -587,8 +466,6 @@

      Functions

    • plot_graph_3d(): plot_ 3D network

      Plot a subset of the HPO as a 3D network.

    • -
    • plot_graph_visnetwork(): plot_ -Plot graph using visNetwork.

    • plot_ontology(): plot_

    • plot_ontology_circular(): plot_

    • plot_ontology_graphviz(): plot_ @@ -600,30 +477,20 @@

      Functions

    • plot_ontology_tidygraph(): plot_

    • plot_ontology_visnetwork(): plot_

    • plot_save(): plot_ -Save a plot using grDevices or visSave.

    • -
    • plot_ttd(): plot_ -Plot TTD.

    • +Save a plot using ggsave, grDevices, + or visSave.

    • plot_upheno_heatmap(): plot_

    Examples

    ont <- get_ontology(terms=10)
    -#>  All local files already up-to-date!
    -#> Importing cached file: /github/home/.cache/R/KGExplorer/mondo.owl
    -#> Adding term metadata.
    -#> IC_method: IC_offspring
    -#> Adding ancestor metadata.
    -#> Getting absolute ontology level for 31,550 IDs.
    -#> 2412 ancestors found at level 2
    -#> Translating all terms to names.
    -#> + Returning a vector of terms (same order as input).
    -#> Converted ontology to: adjacency 
    -#> Getting absolute ontology level for 31,550 IDs.
    +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/mondo.rds
     #> Randomly sampling 10 term(s).
     g <- ontology_to(ont, to="tbl_graph")
    +#> Translating ontology terms to ids.
     #> Converted ontology to: tbl_graph 
    -g <- add_hoverboxes(g)
    +g <- add_hoverboxes(g)
     #> Making hoverboxes from: 'name', 'short_id', 'label', 'namespace', 'definition', 'IC', 'depth', 'n_children', 'n_ancestors', 'n_parents', 'n_offspring', 'n_connected_leaves', 'ancestor', 'ancestor_name', 'n_edges', 'ontLvl'
     #> Adding hoverboxes to data.table.
     out <- plot_ggnetwork(g, label_var="label")
    @@ -634,131 +501,69 @@ 

    Examples

    #> Creating ggnetwork plot. #> Converting graph to ggnetwork. ont <- get_ontology("hp", terms=10, add_ancestors=TRUE) -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 25,301 IDs. -#> 314 ancestors found at level TRUE -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 25,301 IDs. +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds #> Randomly sampling 10 term(s). g <- ontology_to(ont, to="tbl_graph") +#> Translating ontology terms to ids. #> Converted ontology to: tbl_graph plt <- plot_graph_3d(g=g, show_plot=FALSE) #> Converting igraph to plotly data. -#> Translating all terms to names. -#> Ontology not found via 'rols.' Trying method='github'.' -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-base.obo -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 17,874 IDs. -#> 70 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 17,874 IDs. -#> + Returning a vector of terms (same order as input). +#> Translating ontology terms to names. +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hpo.rds #> Warning: 'surface' objects don't have these attributes: 'marker' #> Valid attributes include: #> '_deprecated', 'autocolorscale', 'cauto', 'cmax', 'cmid', 'cmin', 'coloraxis', 'colorbar', 'colorscale', 'connectgaps', 'contours', 'customdata', 'customdatasrc', 'hidesurface', 'hoverinfo', 'hoverinfosrc', 'hoverlabel', 'hovertemplate', 'hovertemplatesrc', 'hovertext', 'hovertextsrc', 'ids', 'idssrc', 'legendgroup', 'legendgrouptitle', 'legendrank', 'lighting', 'lightposition', 'meta', 'metasrc', 'name', 'opacity', 'opacityscale', 'reversescale', 'scene', 'showlegend', 'showscale', 'stream', 'surfacecolor', 'surfacecolorsrc', 'text', 'textsrc', 'type', 'uid', 'uirevision', 'visible', 'x', 'xcalendar', 'xhoverformat', 'xsrc', 'y', 'ycalendar', 'yhoverformat', 'ysrc', 'z', 'zcalendar', 'zhoverformat', 'zsrc', 'key', 'set', 'frame', 'transforms', '_isNestedKey', '_isSimpleKey', '_isGraticule', '_bbox' -#> Saving interactive plot --> /tmp/RtmpSu2waH/filea03f5297485fplot_graph_3d.html +#> Saving interactive plot --> /tmp/RtmpHoWco8/file1445c2494a9a7plot_graph_3d.html #> Warning: 'surface' objects don't have these attributes: 'marker' #> Valid attributes include: #> '_deprecated', 'autocolorscale', 'cauto', 'cmax', 'cmid', 'cmin', 'coloraxis', 'colorbar', 'colorscale', 'connectgaps', 'contours', 'customdata', 'customdatasrc', 'hidesurface', 'hoverinfo', 'hoverinfosrc', 'hoverlabel', 'hovertemplate', 'hovertemplatesrc', 'hovertext', 'hovertextsrc', 'ids', 'idssrc', 'legendgroup', 'legendgrouptitle', 'legendrank', 'lighting', 'lightposition', 'meta', 'metasrc', 'name', 'opacity', 'opacityscale', 'reversescale', 'scene', 'showlegend', 'showscale', 'stream', 'surfacecolor', 'surfacecolorsrc', 'text', 'textsrc', 'type', 'uid', 'uirevision', 'visible', 'x', 'xcalendar', 'xhoverformat', 'xsrc', 'y', 'ycalendar', 'yhoverformat', 'ysrc', 'z', 'zcalendar', 'zhoverformat', 'zsrc', 'key', 'set', 'frame', 'transforms', '_isNestedKey', '_isSimpleKey', '_isGraticule', '_bbox' -ont <- get_ontology("hp", terms=10) -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 25,301 IDs. -#> 900 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 25,301 IDs. -#> Randomly sampling 10 term(s). -g <- ontology_to(ont, to="tbl_graph") -#> Converted ontology to: tbl_graph -out <- plot_graph_visnetwork(g) -#> Loading required namespace: visNetwork -#> Creating visNetwork plot. -#> Making hoverboxes from: 'name', 'short_id', 'label', 'namespace', 'definition', 'IC', 'depth', 'n_children', 'n_ancestors', 'n_parents', 'n_offspring', 'n_connected_leaves', 'ancestor', 'ancestor_name', 'n_edges', 'ontLvl' -#> Adding hoverboxes to data.table. -#> Using palette: okabe -#> Warning: Can't find 'name' in node data.frame -#> Saving plot --> /tmp/RtmpSu2waH/filea03f48a8e08e_visnetwork.html ont <- get_ontology("hp") -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 25,301 IDs. -#> 900 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 25,301 IDs. +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds res <- plot_ontology(ont, terms=100, types="circular", partition_by_level=2, edge_transparency=.9) -#> Loading required namespace: DiagrammeR #> Randomly sampling 100 term(s). +#> Loading required namespace: DiagrammeR #> converting DAG to a tree... #> -#> going through 605 / 605 nodes ... Done. +#> going through 504 / 504 nodes ... Done. #> calculating term positions on the DAG... #> -#> going through 605 / 605 nodes ... Done. +#> going through 504 / 504 nodes ... Done. #> making plot... #> adding links... #> adding terms... -#> Best device size: 10.05 x 6.67 inches. +#> Best device size: 10.18 x 7 inches. ont <- get_ontology("hp", terms=2) -#> All local files already up-to-date! -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl -#> Adding term metadata. -#> IC_method: IC_offspring -#> Adding ancestor metadata. -#> Getting absolute ontology level for 25,301 IDs. -#> 900 ancestors found at level 2 -#> Translating all terms to names. -#> + Returning a vector of terms (same order as input). -#> Converted ontology to: adjacency -#> Getting absolute ontology level for 25,301 IDs. +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds #> Randomly sampling 2 term(s). hm <- plot_ontology_heatmap(ont) #> Adding ancestor metadata. #> Ancestor metadata already present. Use force_new=TRUE to overwrite. #> Creating heatmap: ComplexHeatmap #> Using palette: okabe -#> Using palette: viridis -#> Using palette: watlington #> Using palette: stepped2 -#> Using palette: inferno -#> Using palette: magma +#> Using palette: tol +#> Using palette: watlington +#> Using palette: stepped3 +#> Using palette: tableau20 +#> Translating ontology terms to ids. #> term_sim_method: Sim_WP_1994 #> collecting all ancestors of input terms ... #> -#> going through 0 / 40 ancestors ... +#> going through 0 / 18 ancestors ... #> -#> going through 40 / 40 ancestors ... Done. +#> going through 18 / 18 ancestors ... Done. #> collecting all ancestors of input terms ... #> -#> going through 0 / 40 ancestors ... +#> going through 0 / 18 ancestors ... #> -#> going through 40 / 40 ancestors ... Done. +#> going through 18 / 18 ancestors ... Done. #> Converted ontology to: similarity -#> Saving plot --> /tmp/RtmpSu2waH/filea03fb17566cplot_ontology_heatmap.pdf +#> Saving plot --> /tmp/RtmpHoWco8/file1445c5596c994plot_ontology_heatmap.pdf
    @@ -774,15 +579,15 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/plot_graph_visnetwork.html b/reference/plot_graph_visnetwork.html new file mode 100644 index 0000000..03cfac8 --- /dev/null +++ b/reference/plot_graph_visnetwork.html @@ -0,0 +1,288 @@ + +Plot graph using visNetwork. — plot_graph_visnetwork • KGExplorer + + +
    +
    + + + +
    +
    + + +
    +

    Plot graph using visNetwork.

    +
    + +
    +
    plot_graph_visnetwork(
    +  g,
    +  label_var = "name",
    +  size_var = "degree",
    +  colour_var = size_var,
    +  invert_colour_var = TRUE,
    +  columns = get_graph_colnames(g),
    +  node_opacity = 0.75,
    +  edge_opacity = 0.5,
    +  preferred_palettes = NULL,
    +  selectedBy = label_var,
    +  show_plot = TRUE,
    +  layout = "layout_with_kk",
    +  solver = "forceAtlas2Based",
    +  physics = FALSE,
    +  forceAtlas2Based = list(avoidOverlap = 0.5, gravitationalConstant = -50),
    +  scaling = NULL,
    +  arrows = "from",
    +  smooth = list(enabled = TRUE, type = "cubicBezier", roundness = 0.5),
    +  add_visExport = FALSE,
    +  degree = 1,
    +  width = "100%",
    +  height = "90vh",
    +  highlight_color = "#00FFFFCF",
    +  randomSeed = 2024,
    +  main = NULL,
    +  submain = NULL,
    +  save_path = tempfile(fileext = "_visnetwork.html")
    +)
    +
    + +
    +

    Arguments

    + + +
    g
    +

    ggnetwork object +(or an igraph/tbl_graph to be converted to ggnetwork format).

    + + +
    label_var
    +

    Column containing the label for each node in a graph +(e.g. "hpo_name").

    + + +
    size_var
    +

    Column to scale node size by.

    + + +
    colour_var
    +

    Column to color nodes by.

    + + +
    invert_colour_var
    +

    Invert colour variable.

    + + +
    columns
    +

    Names of columns to map colour palettes to.

    + + +
    node_opacity
    +

    Node opacity.

    + + +
    edge_opacity
    +

    Edge opacity.

    + + +
    preferred_palettes
    +

    Preferred palettes to use for each column.

    + + +
    selectedBy
    +

    : Custom option. Character or a named list. Add a multiple selection based on column of node data.frame creating an HTML select element. Not available for DOT and Gephi.

    • "variable" : Character. Column name of selection variable.

    • +
    • "values : Optional. Vector of possible values. Default to all values in nodes data.frame.

    • +
    • "selected" : Optional. Integer/Character. Initial selection. Default to NULL

    • +
    • "style" : Optional. Character. HTML style of list. Default to 'width: 150px; height: 26px'.

    • +
    • "multiple" : Optional. Boolean. Default to FALSE. If TRUE, you can affect multiple groups per nodes using a comma ("gr1,gr2")

    • +
    • "hideColor" : Optional. String. Color for hidden nodes/edges. Use a rgba definition. Default to rgba(200,200,200,0.5)

    • +
    • "main" : Optional. Default to "Select by variable"

    • +
    • "sort" : Optional. If values is NULL, sort all possible values ?. Default to TRUE

    • +
    • "highlight" : Optional. Boolean. Run highlightNearest if defined on each selected node ? Default to FALSE

    • +
    + + +
    show_plot
    +

    Print the plot after it's been generated.

    + + +
    layout
    +

    : Character Name of igraph layout function to use. Default to "layout_nicely"

    + + +
    solver
    +

    : String. Default to 'barnesHut'. You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'. When setting the hierarchical layout, the hierarchical repulsion solver is automaticaly selected, regardless of what you fill in here.

    + + +
    physics
    +

    : Boolean. Default to FALSE. Enabled physics on nodes ?

    + + +
    forceAtlas2Based
    +

    named list of options

    • "theta" : Number. Default to 0.5. This parameter determines the boundary between consolidated long range forces and individual short range forces. To oversimplify higher values are faster but generate more errors, lower values are slower but with less errors.

    • +
    • "gravitationalConstant" : Number. Default to -50. Gravity attracts. We like repulsion. So the value is negative. If you want the repulsion to be stronger, decrease the value (so -10000, -50000).

    • +
    • "centralGravity" : Number. Default to 0.01. There is a central gravity attractor to pull the entire network back to the center.

    • +
    • "springLength" : Number. Default to 100. The edges are modelled as springs. This springLength here is the the rest length of the spring.

    • +
    • "springConstant" : Number. Default to 0.08. This is how 'sturdy' the springs are. Higher values mean stronger springs.

    • +
    • "damping" : Number. Default to 0.4. Accepted range: [0 .. 1]. The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration.

    • +
    • "avoidOverlap" : Number. Default to 0. Accepted range: [0 .. 1]. When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model. Value 1 is maximum overlap avoidance.

    • +
    + + +
    scaling
    +

    : Named list. If the value option is specified, the size of the nodes will be scaled according to the properties in this object.

    • "min" : Number. Default to 10. If nodes have a value, their sizes are determined by the value, the scaling function and the min max values.

    • +
    • "max" : Number. Default to 30. This is the maximum allowed size when the nodes are scaled using the value option.

    • +
    • "label" : Named list or Boolean. Default to Named list. This can be false if the label is not allowed to scale with the node. If true it will scale using default settigns. For further customization, you can supply an object. +

      • "enabled" : Boolean. Default to false. Toggle the scaling of the label on or off. If this option is not defined, it is set to true if any of the properties in this object are defined.

      • +
      • "min" : Number. Default to 14. The minimum font-size used for labels when scaling.

      • +
      • "max" : Number. Default to 30. The maximum font-size used for labels when scaling.

      • +
      • "maxVisible" : Number. Default to 30. When zooming in, the font is drawn larger as well. You can limit the perceived font size using this option. If set to 30, the font will never look larger than size 30 zoomed at 100%.

      • +
      • "drawThreshold" : Number. Default to 5. When zooming out, the font will be drawn smaller. This defines a lower limit for when the font is drawn. When using font scaling, you can use this together with the maxVisible to first show labels of important nodes when zoomed out and only show the rest when zooming in.

      • +
    • +
    • "customScalingFunction" : Function. If nodes have value fields, this function determines how the size of the nodes are scaled based on their values.

    • +
    + + +
    arrows
    +

    : Named list or String. To draw an arrow with default settings a string can be supplied. For example: 'to, from,middle' or 'to;from', any combination with any seperating symbol is fine. +If you want to control the size of the arrowheads, you can supply an object. See visDocumentation

    + + +
    smooth
    +

    : Boolean. Default to FALSE. Use smooth edges ?

    + + +
    add_visExport
    +

    Add PDF download button.

    + + +
    degree
    +

    The number of degrees away from the selected nodes +to highlight.

    + + +
    width
    +

    Width of the heatmap body.

    + + +
    height
    +

    Height of the heatmap body.

    + + +
    highlight_color
    +

    Colour to highlight selected nodes.

    + + +
    randomSeed
    +

    : Number. The nodes are randomly positioned initially. This means that the settled result is different every time. If you provide a random seed manually, the layout will be the same every time.

    + + +
    main
    +

    : For add a title. Character or a named list.

    • "text" : Character. Title.

    • +
    • "style" : Optional. Character. HTML style of title. Default to 'font-family:Georgia, Times New Roman, Times, serif;font-weight:bold;font-size:20px;text-align:center;'.

    • +
    + + +
    submain
    +

    : For add a subtitle. Character or a named list.

    • "text" : Character. Subtitle.

    • +
    • "style" : Optional. Character. HTML style of submain. Default to 'font-family:Georgia, Times New Roman, Times, serif;font-size:12px;text-align:center;'.

    • +
    + + +
    save_path
    +

    Path to save interactive plot to +as a self-contained HTML file.

    + +
    + +
    +

    Examples

    +
    ont <- get_ontology("hp", terms=10)
    +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
    +#> Randomly sampling 10 term(s).
    +g <- ontology_to(ont, to="tbl_graph")
    +#> Translating ontology terms to ids.
    +#> Converted ontology to: tbl_graph 
    +out <- plot_graph_visnetwork(g)
    +#> Creating visNetwork plot.
    +#> Making hoverboxes from: 'name', 'short_id', 'label', 'namespace', 'definition', 'IC', 'depth', 'n_children', 'n_ancestors', 'n_parents', 'n_offspring', 'n_connected_leaves', 'ancestor', 'ancestor_name', 'n_edges', 'ontLvl'
    +#> Adding hoverboxes to data.table.
    +#> Using palette: okabe
    +#> Warning: Can't find 'name' in node data.frame
    +#> Saving plot --> /tmp/RtmpHoWco8/file1445c7eae8_visnetwork.html
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.1.

    +
    + +
    + + + + + + + + diff --git a/reference/plot_upheno.html b/reference/plot_upheno.html index 2de5c82..46e707f 100644 --- a/reference/plot_upheno.html +++ b/reference/plot_upheno.html @@ -1,10 +1,10 @@ -Map uPheno plot — plot_upheno • KGExplorerMap uPheno plot — plot_upheno • KGExplorer - +
    @@ -32,7 +32,7 @@
    - +
    @@ -70,41 +70,48 @@

    Map uPheno plot

    plot_upheno(
       pheno_map_genes_match = NULL,
    -  subset_db1 = "HP",
    -  types = c("rainplot", "scatterplot", "heatmap")
    +  filters = list(db1 = "HP", gene_taxon_label1 = "Homo sapiens"),
    +  types = c("rainplot", "scatterplot", "heatmap"),
    +  ...
     )

    Arguments

    -
    pheno_map_genes_match
    -

    uPheno cross-species mapping data generated by -map_upheno_data.

    -
    subset_db1
    -

    A character vector of reference ontologies to subset +

    pheno_map_genes_match
    +

    uPheno cross-species mapping data generated by +map_upheno_data. pheno_map_genes_match by.

    -
    types
    +
    filters
    +

    A named list, where each element in the list is the name of +a column in the data, and the vector within each element represents the +values to include in the final data.

    + + +
    types

    A character vector of plot types to generate.

    + +
    ...
    +

    Arguments passed to plotting functions.

    +

    Value

    - - -

    A named list of ggplot2 objects.

    +

    A named list of ggplot2 objects.

    Examples

    -
    if (FALSE) {
    +    
    if (FALSE) { # \dontrun{
     pheno_map_genes_match <- map_upheno_data()
     upheno_plots <- plot_upheno(
       pheno_map_genes_match = pheno_map_genes_match)
    -}
    +} # }
     
    @@ -119,15 +126,15 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/prune_ancestors.html b/reference/prune_ancestors.html new file mode 100644 index 0000000..8e11030 --- /dev/null +++ b/reference/prune_ancestors.html @@ -0,0 +1,123 @@ + +Prune ancestor — prune_ancestors • KGExplorer + + +
    +
    + + + +
    +
    + + +
    +

    Prune redundant ancestral terms from a data.table.

    +
    + +
    +
    prune_ancestors(dat, id_col, ont)
    +
    + +
    +

    Arguments

    + + +
    dat
    +

    A data.table with a column of ontology terms.

    + + +
    id_col
    +

    The name of the column containing ontology term IDs.

    + + +
    ont
    +

    An ontology of class ontology_DAG.

    + +
    + +
    +

    Examples

    +
    dat <- data.table::data.table(hpo_id=c("HP:0000001","HP:0000002","HP:0000003"),
    +                             name=c("term1","term2","term3"))
    +ont <- get_ontology("hp")
    +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
    +dat2 <- prune_ancestors(dat,id_col="hpo_id",ont=ont)
    +#> Pruning ancestors.
    +#> 2 / 3 terms were kept after pruning.
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.1.

    +
    + +
    + + + + + + + + diff --git a/reference/query_.html b/reference/query_.html index 28fbb63..b2d707c 100644 --- a/reference/query_.html +++ b/reference/query_.html @@ -1,9 +1,9 @@ -Query functions — query_ • KGExplorerQuery functions — query_ • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -66,9 +66,7 @@

    Query functions

    -
    query_monarch(...)
    -
    -query_oard(
    +    
    query_oard(
       ids,
       concept_prefix = "q=",
       domain = "https://rare.cohd.io/api/",
    @@ -87,63 +85,46 @@ 

    Source

    Arguments

    -
    ...
    -

    Arguments passed on to monarchr::biolink_search

    phrase_or_id
    -

    Something for which we are looking for more information, or to find useful entities.

    - -
    rows
    -

    Number of rows of results to fetch.

    - - -
    -
    ids
    +
    ids

    IDs to query.

    -
    concept_prefix
    +
    concept_prefix

    Concept prefix.

    -
    domain
    +
    domain

    OARD domain URL.

    -
    dataset_id
    +
    dataset_id

    Dataset ID.

    -
    endpoint
    -

    OARD API endpoint to use. +

    endpoint
    +

    OARD API endpoint to use. See the OARD API docs for details.

    -
    batch_size
    +
    batch_size

    Number of IDs to query at once.

    Value

    - - -

    Queried data.

    +

    Queried data.

    Functions

    - -
    • query_monarch(): query_

    • -
    • query_oard(): query_

      + +
      • query_oard(): query_

        Query the Open Real-world-based Annotation for Rare Disease (OARD). See here for details.

    -
    -

    Examples

    -
    cells <- monarchr::biolink_search(phrase_or_id = "T-cell")
    -
    -
    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/query_phenoscape.html b/reference/query_phenoscape.html index 7427a83..64faecd 100644 --- a/reference/query_phenoscape.html +++ b/reference/query_phenoscape.html @@ -1,9 +1,9 @@ -Query Phenoscape — query_phenoscape • KGExplorerQuery Phenoscape — query_phenoscape • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -86,15 +86,15 @@

    Source

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/query_ubergraph.html b/reference/query_ubergraph.html index 1916c01..8c84ec3 100644 --- a/reference/query_ubergraph.html +++ b/reference/query_ubergraph.html @@ -1,9 +1,9 @@ -Query ubergraph — query_ubergraph • KGExplorerQuery ubergraph — query_ubergraph • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -90,15 +90,15 @@

    Source

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/set_cores.html b/reference/set_cores.html new file mode 100644 index 0000000..2d0a49e --- /dev/null +++ b/reference/set_cores.html @@ -0,0 +1,120 @@ + +Set cores — set_cores • KGExplorer + + +
    +
    + + + +
    +
    + + +
    +

    Assign cores automatically for parallel processing, while reserving some.

    +
    + +
    +
    set_cores(workers = 0.9, progressbar = TRUE, verbose = TRUE)
    +
    + +
    +

    Arguments

    + + +
    workers
    +

    Number (>1) or proportion (<1) of worker cores to use.

    + + +
    progressbar
    +

    logical(1) Enable progress bar +(based on plyr:::progress_text). + Enabling the progress bar changes the default value of tasks to + .Machine$integer.max, so that progress is reported for + each element of X.

    + + +
    verbose
    +

    Print messages.

    + +
    +
    +

    Value

    +

    List of core allocations.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.1.

    +
    + +
    + + + + + + + + diff --git a/reference/to_.html b/reference/to_.html index 11d5379..229249b 100644 --- a/reference/to_.html +++ b/reference/to_.html @@ -1,9 +1,9 @@ -To functions — to_ • KGExplorerTo functions — to_ • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -97,70 +97,68 @@

    To functions

    Arguments

    -
    as_sparse
    + + +
    as_sparse

    Return the object as a sparseMatrix.

    -
    g
    -

    ggnetwork object -(or an igraph/tbl_graph to be converted to ggnetwork format).

    +
    g
    +

    tbl_graph object.

    -
    id_col
    -

    Column containing the unique identifier for each node +

    id_col
    +

    Column containing the unique identifier for each node in a graph (e.g. "name").

    -
    ...
    +
    ...

    Arguments passed on to ggnetwork::fortify

    - +
    -
    ont
    +
    ont

    An ontology of class ontology_DAG.

    -
    to
    +
    to

    A character string specifying the format to convert to.

    -
    terms
    -

    Term IDs to include. Can alternatively be an integer, -which will be used to randomly sample N terms from the data.

    +
    terms
    +

    A vector of ontology term IDs.

    -
    remove_terms
    +
    remove_terms

    Character vector of term IDs to exclude.

    -
    as
    +
    as

    A character string specifying the format to convert to.

    -
    as_dt
    -

    Return the object as a data.table.

    +
    as_dt
    +

    Return the object as a data.table.

    -
    as_graph
    +
    as_graph

    Return the object as a tbl_graph.

    -
    as_granges
    +
    as_granges

    Return the object as a GRanges.

    Value

    - - -

    Converted data.

    +

    Converted data.

    Functions

    - +
    • dt_to_matrix(): to_

    • graph_to_dt(): to_

    • graph_to_ggnetwork(): to_

    • @@ -174,99 +172,123 @@

      Functions

      Examples

      -
      dt <- data.table::as.data.table(mtcars, keep.rownames = TRUE)
      +    
      dt <- data.table::as.data.table(mtcars, keep.rownames = TRUE)
       X <- dt_to_matrix(dt)
       ont <- get_ontology("hp", terms=10)
      -#>  All local files already up-to-date!
      -#> Importing cached file: /github/home/.cache/R/KGExplorer/hp-international.owl
      -#> Adding term metadata.
      -#> IC_method: IC_offspring
      -#> Adding ancestor metadata.
      -#> Getting absolute ontology level for 25,301 IDs.
      -#> 900 ancestors found at level 2
      -#> Translating all terms to names.
      -#> + Returning a vector of terms (same order as input).
      -#> Converted ontology to: adjacency 
      -#> Getting absolute ontology level for 25,301 IDs.
      +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/hp.rds
       #> Randomly sampling 10 term(s).
       g <- ontology_to(ont, to="tbl_graph")
      +#> Translating ontology terms to ids.
       #> Converted ontology to: tbl_graph 
       dat <- graph_to_dt(g)
       #> Converting tidygraph to data.table.
      -g <- igraph::graph.atlas(10)
      +g <- igraph::graph.atlas(10)
      +#> Warning: `graph.atlas()` was deprecated in igraph 2.1.0.
      +#>  Please use `graph_from_atlas()` instead.
       ggn <- graph_to_ggnetwork(g)
       #> Converting graph to ggnetwork.
       ont <- get_ontology()
      -#>  All local files already up-to-date!
      -#> Importing cached file: /github/home/.cache/R/KGExplorer/mondo.owl
      -#> Adding term metadata.
      -#> IC_method: IC_offspring
      -#> Adding ancestor metadata.
      -#> Getting absolute ontology level for 31,550 IDs.
      -#> 2412 ancestors found at level 2
      -#> Translating all terms to names.
      -#> + Returning a vector of terms (same order as input).
      -#> Converted ontology to: adjacency 
      -#> Getting absolute ontology level for 31,550 IDs.
      +#> Loading cached ontology: /github/home/.cache/R/KGExplorer/mondo.rds
       obj <- ontology_to(ont=ont, to="dendrogram")
      +#> Translating ontology terms to ids.
      +#> 
      +#> going through 1000 / 46354 nodes ...
      +#> 
      +#> going through 2000 / 46354 nodes ...
      +#> 
      +#> going through 3000 / 46354 nodes ...
      +#> 
      +#> going through 4000 / 46354 nodes ...
      +#> 
      +#> going through 5000 / 46354 nodes ...
      +#> 
      +#> going through 6000 / 46354 nodes ...
       #> 
      -#> going through 1000 / 27730 nodes ...
      +#> going through 7000 / 46354 nodes ...
       #> 
      -#> going through 2000 / 27730 nodes ...
      +#> going through 8000 / 46354 nodes ...
       #> 
      -#> going through 3000 / 27730 nodes ...
      +#> going through 9000 / 46354 nodes ...
       #> 
      -#> going through 4000 / 27730 nodes ...
      +#> going through 10000 / 46354 nodes ...
       #> 
      -#> going through 5000 / 27730 nodes ...
      +#> going through 11000 / 46354 nodes ...
       #> 
      -#> going through 6000 / 27730 nodes ...
      +#> going through 12000 / 46354 nodes ...
       #> 
      -#> going through 7000 / 27730 nodes ...
      +#> going through 13000 / 46354 nodes ...
       #> 
      -#> going through 8000 / 27730 nodes ...
      +#> going through 14000 / 46354 nodes ...
       #> 
      -#> going through 9000 / 27730 nodes ...
      +#> going through 15000 / 46354 nodes ...
       #> 
      -#> going through 10000 / 27730 nodes ...
      +#> going through 16000 / 46354 nodes ...
       #> 
      -#> going through 11000 / 27730 nodes ...
      +#> going through 17000 / 46354 nodes ...
       #> 
      -#> going through 12000 / 27730 nodes ...
      +#> going through 18000 / 46354 nodes ...
       #> 
      -#> going through 13000 / 27730 nodes ...
      +#> going through 19000 / 46354 nodes ...
       #> 
      -#> going through 14000 / 27730 nodes ...
      +#> going through 20000 / 46354 nodes ...
       #> 
      -#> going through 15000 / 27730 nodes ...
      +#> going through 21000 / 46354 nodes ...
       #> 
      -#> going through 16000 / 27730 nodes ...
      +#> going through 22000 / 46354 nodes ...
       #> 
      -#> going through 17000 / 27730 nodes ...
      +#> going through 23000 / 46354 nodes ...
       #> 
      -#> going through 18000 / 27730 nodes ...
      +#> going through 24000 / 46354 nodes ...
       #> 
      -#> going through 19000 / 27730 nodes ...
      +#> going through 25000 / 46354 nodes ...
       #> 
      -#> going through 20000 / 27730 nodes ...
      +#> going through 26000 / 46354 nodes ...
       #> 
      -#> going through 21000 / 27730 nodes ...
      +#> going through 27000 / 46354 nodes ...
       #> 
      -#> going through 22000 / 27730 nodes ...
      +#> going through 28000 / 46354 nodes ...
       #> 
      -#> going through 23000 / 27730 nodes ...
      +#> going through 29000 / 46354 nodes ...
       #> 
      -#> going through 24000 / 27730 nodes ...
      +#> going through 30000 / 46354 nodes ...
       #> 
      -#> going through 25000 / 27730 nodes ...
      +#> going through 31000 / 46354 nodes ...
       #> 
      -#> going through 26000 / 27730 nodes ...
      +#> going through 32000 / 46354 nodes ...
       #> 
      -#> going through 27000 / 27730 nodes ...
      +#> going through 33000 / 46354 nodes ...
       #> 
      -#> going through 27730 / 27730 nodes ... Done.
      +#> going through 34000 / 46354 nodes ...
      +#> 
      +#> going through 35000 / 46354 nodes ...
      +#> 
      +#> going through 36000 / 46354 nodes ...
      +#> 
      +#> going through 37000 / 46354 nodes ...
      +#> 
      +#> going through 38000 / 46354 nodes ...
      +#> 
      +#> going through 39000 / 46354 nodes ...
      +#> 
      +#> going through 40000 / 46354 nodes ...
      +#> 
      +#> going through 41000 / 46354 nodes ...
      +#> 
      +#> going through 42000 / 46354 nodes ...
      +#> 
      +#> going through 43000 / 46354 nodes ...
      +#> 
      +#> going through 44000 / 46354 nodes ...
      +#> 
      +#> going through 45000 / 46354 nodes ...
      +#> 
      +#> going through 46000 / 46354 nodes ...
      +#> 
      +#> going through 46354 / 46354 nodes ... Done.
       #> Converted ontology to: dendrogram 
      -g <- igraph::graph.full(10)
      +g <- igraph::graph.full(10)
      +#> Warning: `graph.full()` was deprecated in igraph 2.1.0.
      +#>  Please use `make_full_graph()` instead.
       g2 <- to_graph(g)
       
      @@ -282,15 +304,15 @@

      Examples

      -

      Site built with pkgdown 2.0.7.

      +

      Site built with pkgdown 2.1.1.

    - - + + diff --git a/reference/unlist_dt.html b/reference/unlist_dt.html new file mode 100644 index 0000000..5c64135 --- /dev/null +++ b/reference/unlist_dt.html @@ -0,0 +1,134 @@ + +Unlist a data.table — unlist_dt • KGExplorer + + +
    +
    + + + +
    +
    + + +
    +

    data.tables can sometimes have columns that are nested lists. +This function will either drop these columns or convert them into +character strings.

    +
    + +
    +
    unlist_dt(dat, drop = FALSE, collapse = ";")
    +
    + +
    +

    Arguments

    + + +
    dat
    +

    data.table

    + + +
    drop
    +

    Drop columns that are lists.

    + + +
    collapse
    +

    Character to collapse lists with. +Used only when drop is FALSE.

    + +
    +
    +

    Value

    +

    data.table

    +
    + +
    +

    Examples

    +
    dat <- data.table::data.table(a=1:3,b=list(1:2,3:4))
    +#> Warning: Item 2 has 2 rows but longest item has 3; recycled with remainder.
    +unlist_dt(dat)
    +#> Unlisting 2 data.table columns.
    +#>        I     a      b
    +#>    <int> <int> <char>
    +#> 1:     1     1    1;2
    +#> 2:     2     2    3;4
    +#> 3:     3     3    1;2
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.1.

    +
    + +
    + + + + + + + + diff --git a/reference/utils_.html b/reference/utils_.html index d37e71f..b5a01c0 100644 --- a/reference/utils_.html +++ b/reference/utils_.html @@ -1,9 +1,9 @@ -Utility functions — utils_ • KGExplorerUtility functions — utils_ • KGExplorer - +
    @@ -31,7 +31,7 @@
    - +
    @@ -66,9 +66,7 @@

    Utility functions

    -
    cache_dir(package = "KGExplorer")
    -
    -example_dat(
    +    
    example_dat(
       types = c("omim_id", "orphanet_id", "decipher_id", "hpo_id", "gene"),
       rm_types = NULL
     )
    @@ -77,7 +75,7 @@ 

    Utility functions

    file, tag = "latest", repo = "neurogenomics/KGExplorer", - save_dir = cache_dir(), + save_dir = cache_dir(), add_version = FALSE, overwrite = TRUE ) @@ -93,81 +91,78 @@

    Utility functions

    Arguments

    -
    package
    -

    a character string giving the name of an R package

    -
    types
    +
    types

    Types of IDs to include in the data.

    -
    file
    -

    name or vector of names of files to be downloaded. If NULL, -all assets attached to the release will be downloaded.

    - - -
    tag
    +
    file
    +

    Can be one of the following:

    • "ontology"Creates an ontology_DAG R object by + importing the OBO file directly from the official + uPheno GitHub repository.

    • +
    • "bestmatches"Returns a merged table with the best matches between + human and non-human homologous phenotypes (from multiple species). + Distributed by the official + + uPheno GitHub repository.

    • +
    • "upheno_mapping"Return a merged table with matches between human +and non-human homologous phenotypes (from multiple species). +Distributed by the + + Monarch Initiative server.

    • +
    + + +
    tag

    tag for the GitHub release to which this data should be attached.

    -
    repo
    +
    repo

    Repository name in format "owner/repo". Defaults to guess_repo().

    -
    save_dir
    -

    Directory to save data to.

    +
    save_dir
    +

    Directory to save a file to.

    -
    add_version
    +
    add_version

    Add the release version to the returned object's attributes

    -
    overwrite
    +
    overwrite

    Should any local files of the same name be overwritten? default TRUE.

    -
    v
    +
    ...
    +

    Not used at this time.

    + + +
    v

    Whether to print messages or not.

    -
    parallel
    -

    Whether to enable message print when wrapped +

    parallel
    +

    Whether to enable message print when wrapped in parallelised functions.

    Value

    - - -

    Merged data.

    - - -

    Cache directory path.

    - - -

    data.table

    - - - +

    Merged data.

    +

    data.table

    Path to downloaded file or the object itself (when ".rds" format).

    - -

    Null

    - -

    Null

    Functions

    - -
    • cache_dir(): utils_ -Cache directory

      -

      Provides the path to the package-wide cache directory.

    • -
    • example_dat(): utils_ + +

      • example_dat(): utils_ Example data

        -

        Construct an example data.table containing diseases, +

        Construct an example data.table containing diseases, phenotype, and/or genes.

      • get_data(): utils_ Get remote data

        @@ -175,23 +170,22 @@

        Functions

      • messager(): utils_ Print messages

        Conditionally print messages. - Allows developers to easily control verbosity of functions, - and meet Bioconductor requirements that dictate the message + Allows developers to easily control verbosity of functions, + and meet Bioconductor requirements that dictate the message must first be stored to a variable before passing to message.

      • report_filter(): utils_

      • report_missing(): utils_

      • stopper(): utils_ Stop messages

        Conditionally print stop messages. -Allows developers to easily control verbosity of functions, - and meet Bioconductor requirements that dictate the stop message +Allows developers to easily control verbosity of functions, + and meet Bioconductor requirements that dictate the stop message must first be stored to a variable before passing to stop.

    Examples

    -
    save_dir <- cache_dir
    -dat <- example_dat()
    +    
    dat <- example_dat()
     
    @@ -206,15 +200,15 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.1.1.

    - - + + diff --git a/sitemap.xml b/sitemap.xml index bca9830..9e2f33d 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,84 +1,41 @@ - - - - /404.html - - - /articles/KGExplorer.html - - - /articles/docker.html - - - /articles/index.html - - - /authors.html - - - /index.html - - - /news/index.html - - - /reference/add_.html - - - /reference/cache_.html - - - /reference/filter_.html - - - /reference/get_.html - - - /reference/get_ontology_github.html - - - /reference/get_ontology_robot.html - - - /reference/graph_to_plotly.html - - - /reference/index.html - - - /reference/kde_surface.html - - - /reference/link_.html - - - /reference/map_.html - - - /reference/map_genes_dt.html - - - /reference/map_upheno_data.html - - - /reference/plot_.html - - - /reference/plot_upheno.html - - - /reference/query_.html - - - /reference/query_phenoscape.html - - - /reference/query_ubergraph.html - - - /reference/to_.html - - - /reference/utils_.html - + +/404.html +/articles/KGExplorer.html +/articles/docker.html +/articles/index.html +/authors.html +/index.html +/news/index.html +/reference/add_.html +/reference/add_ancestors.html +/reference/add_db.html +/reference/add_hoverboxes.html +/reference/add_ontology_metadata.html +/reference/cache_.html +/reference/filter_.html +/reference/get_.html +/reference/get_ontology_descendants.html +/reference/get_ontology_github.html +/reference/get_ontology_robot.html +/reference/get_opentargets.html +/reference/graph_to_plotly.html +/reference/index.html +/reference/kde_surface.html +/reference/link_.html +/reference/main_.html +/reference/map_.html +/reference/map_genes_dt.html +/reference/map_upheno_data.html +/reference/plot_.html +/reference/plot_graph_visnetwork.html +/reference/plot_upheno.html +/reference/prune_ancestors.html +/reference/query_.html +/reference/query_phenoscape.html +/reference/query_ubergraph.html +/reference/set_cores.html +/reference/to_.html +/reference/unlist_dt.html +/reference/utils_.html +