Use cases

Extract disease/phenotype-cell type associations

g <- get_monarch_kg()
g2 <- filter_kg(g, 
                to_categories = c("biolink:Disease",
                                  "biolink:PhenotypicFeature"),
                from_categories = "biolink:Cell")
plot_graph_visnetwork(g2, 
                      selectedBy = "id",
                      label_var = "name",
                      layout = "layout_nicely",
                      colour_var = "category")

Assess known animal models of human phenotypes

dat <- map_upheno_data()
upheno_plots <- plot_upheno(dat)
gm <- link_monarch(maps = list(
  c("variant","disease"),
  c("variant","phenotype"),
  c("variant","gene")
))
gm2 <- tidygraph::graph_join(gm,g)
gm2 <- filter_graph(gm2,
                    node_filters = list(category=c("disease",
                                                   "phenotype",
                                                   "phenotypicfeature",
                                                   "gene","variant")))
gm3 <- filter_graph(g = gm2,
                    size=20000)
igraph::vertex_attr(gm3,"category") <- 
  tolower(gsub("biolink:","",igraph::vertex_attr(gm3,"category")))
igraph::vertex_attr(gm3,"name") <- igraph::vertex_attr(gm3,"id")

plot_graph_visnetwork(gm3, 
                      selectedBy = "category",
                      label_var = "name",
                      layout = "layout_nicely",
                      colour_var = "category")

Session Info

utils::sessionInfo()
## R Under development (unstable) (2024-01-23 r85822)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 22.04.3 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
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] KGExplorer_0.99.0
## 
## 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