Running GUI dashboard for interactive exploration

Toru Maruyama

2023-12-05

library(CellInteractomeR)
library(kableExtra)
## ℹ Loading CellInteractomeR

Connect database

  • url: http://localhost:7474 is the default URL set in Neo4j
  • please use your username and password instead
con = connect_database(
  url = "http://localhost:7474",
  username = "neo4j",
  password = "yourpassword"
)

Parameters

Configuration

dashboard_config returns ci_config class object which contains the following parameters

config = dashboard_config(con)
## Warning: `as.tibble()` was deprecated in tibble 2.0.0.
## ℹ Please use `as_tibble()` instead.
## ℹ The signature and semantics have changed, see `?as_tibble`.
## ℹ The deprecated feature was likely used in the CellInteractomeR package.
##   Please report the issue to the authors.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
print(config)
## ci_config with the following parameters:
##  - spinner_color
##  - network_layout
##  - model
##  - main_entity_class
##  - intermediate_entity_class
##  - states
##  - relation_type
##  - main_relation_type
##  - relation_type_color
##  - relation_path_dfs
##  - relation_path
##  - relation_path_color
##  - node2imgpath
##  - node2base64img
##  - with_toppage
##  - title
## $spinner_color
## NULL
## 
## $network_layout
## NULL
## 
## $model
## NULL
## 
## $main_entity_class
## NULL
## 
## $intermediate_entity_class
## NULL
## 
## $states
## NULL
## 
## $relation_type
## NULL
## 
## $main_relation_type
## NULL
## 
## $relation_type_color
## NULL
## 
## $relation_path_dfs
## NULL
## 
## $relation_path
## NULL
## 
## $relation_path_color
## NULL
## 
## $node2imgpath
## NULL
## 
## $node2base64img
## NULL
## 
## $with_toppage
## NULL
## 
## $title
## NULL

Information of the graph

ci_config object has following graph information

  • model: Model of the graph
  • relation_type: Possible relation type
  • relation_path: Possible paths of the relationships between two entity types
  • states: States in the graph
config$model %>%
  kable() %>%
  kable_classic_2()
from to relation_type directed
Metabolite Microbe UPTAKE TRUE
DiffTest Gene TESTED FALSE
Cell Gene SPECIFICALLY_EXPRESS FALSE
Metabolite Gene RECEPTOR TRUE
Microbe Metabolite PRODUCE TRUE
Microbe Gene MOLECULAR_MIMICRY TRUE
Cell Cell LIGAND_RECEPTOR_COUNT TRUE
Gene Gene LIGAND_RECEPTOR TRUE
Gene Metabolite ENZYME TRUE
Cell DiffTest DIFFERENTIAL_EXPRESSION FALSE
DiffTest Microbe DIFFERENTIAL_ABUNDANCE FALSE
Cell DiffTest DIFFERENTIAL_ABUNDANCE FALSE
DiffTest Metabolite DIFFERENTIAL_ABUNDANCE FALSE
Cell Metabolite CORRELATE_WITH FALSE
Cell Cell CORRELATE_WITH FALSE
Metabolite Microbe CORRELATE_WITH FALSE
Microbe Microbe CORRELATE_WITH FALSE
Cell Microbe CORRELATE_WITH FALSE

Configuration parameters for the dashboard

You can modify dashboard by changing the following paramters

  • title: Title of the dashboard
  • with_toppage: TRUE to show toppage of the dashboard
  • relation_type_color: Color of edges to represent relationship type
  • relation_path_color: Color of edges to represent relationship path
  • node2imgpath: Image to represent entities
  • node2base64img: Base64 image to represent entities
  • spinner_color: Color of spinner/loading
# config$title = "IBD interactome" # title of the dashboard will change to "IBD interactome"
config$title
## [1] "Cell Interactome"

Threshold

default_threshold returns ci_threshold class object which contains threshold for the relationships in the graph

threshold = default_threshold(con)
print(threshold)
## ci_threshold with the following parameters in RELATIONSHIP:
##  - CORRELATE_WITH: directed, Disease, method, study, value
##  - TESTED: directed
##  - DIFFERENTIAL_ABUNDANCE: directed, Disease, fdr, logfc, method, pvalue, reference, study
##  - SPECIFICALLY_EXPRESS: directed, Disease, expression, FDR, logFC, method, rank, study
##  - LIGAND_RECEPTOR_COUNT: count, directed, Disease, ligand_complex, method, receptor_complex, specificity, study
##  - DIFFERENTIAL_EXPRESSION: directed, Disease, FDR, logFC, method, reference, study
##  - PRODUCE: directed, n, source, total, value
##  - UPTAKE: directed, n, source, total, value
##  - ENZYME: directed, source
##  - RECEPTOR: directed, source
##  - MOLECULAR_MIMICRY: alignment_score, directed, docking_score, pmid, source
##  - LIGAND_RECEPTOR: directed, source, value
## $CORRELATE_WITH
## NULL
## 
## $TESTED
## NULL
## 
## $DIFFERENTIAL_ABUNDANCE
## NULL
## 
## $SPECIFICALLY_EXPRESS
## NULL
## 
## $LIGAND_RECEPTOR_COUNT
## NULL
## 
## $DIFFERENTIAL_EXPRESSION
## NULL
## 
## $PRODUCE
## NULL
## 
## $UPTAKE
## NULL
## 
## $ENZYME
## NULL
## 
## $RECEPTOR
## NULL
## 
## $MOLECULAR_MIMICRY
## NULL
## 
## $LIGAND_RECEPTOR
## NULL

Run dashboard

Dashboard runs by the run_dashboard command

run_dashboard(con, config, threshold)