How maayanlab/knowledge-graph-ui works
KG-UI is a configurable knowledge-graph frontend for Neo4j-backed bioinformatics applications. A user selects a search or analysis view, submits terms or a gene set, and the interface requests graph data, resolves Neo4j results into network elements, and renders them interactively. Separate branches support enrichment, Distillery queries, downloads, and API documentation. The graph follows documented calls and SOURCE INDEX references; several API and Distillery implementations are unsampled, so uncertain connections are omitted.
Main entry points: route.ts Knowledge graph API · component_selector.tsx View selector · index.tsx Enrichment analysis · neo4j.ts Neo4j database
Components 24
UI and routing
- Page routes
app/page.tsx - View selector
app/component_selector.tsx - Query translator
components/QueryTranslator.tsx - API documentation
components/APIDoc/index.tsx
Knowledge graph
- Interactive network
components/Cytoscape/index.tsx - Knowledge graph API
app/api/knowledge_graph/route.ts - Result resolver
app/api/knowledge_graph/resolver.ts - Graph presentation helpers
app/api/knowledge_graph/helper.ts
Analysis tools
- Term and gene search
components/TermAndGeneSearch/form.tsx - Simple search
components/SimpleTermAndGeneSearch/form.tsx - Enrichment analysis
components/Enrichment/index.tsx - Gene set form
components/Enrichment/form.tsx - Enrichment actions
components/Enrichment/InteractiveButtons.tsx - Result summary
components/Enrichment/Summarizer/index.tsx - Term visualization
components/Enrichment/TermViz.tsx - Distillery interface
components/Distillery/index.tsx - Distillery endpoints
app/api/distillery - Network download
components/Download/client_side.tsx
Configuration and services
- Neo4j database
utils/neo4j.ts - Schema API
app/api/schema/route.ts - Schema initialization
utils/initialize.ts - Graph initialization
app/api/initialize/helper.ts
Data ingestion
- Neo4j ingestion
scripts/ingestion
Other components
- User
Connections 26
- User → Page routes: opens
README.md - Page routes → View selector: renders
app/page.tsx - View selector → Term and gene search: selects view
app/component_selector.tsx - View selector → Simple search: selects view
app/component_selector.tsx - View selector → Enrichment analysis: selects view
app/component_selector.tsx - View selector → Distillery interface: selects view
app/component_selector.tsx - Term and gene search → Knowledge graph API: requests graph
components/TermAndGeneSearch/form.tsx - Simple search → Knowledge graph API: requests graph
components/SimpleTermAndGeneSearch/form.tsx - Knowledge graph API → Result resolver: resolves results
app/api/knowledge_graph/route.ts - Knowledge graph API → Schema initialization: loads schema
app/api/knowledge_graph/route.ts - Result resolver → Neo4j database: reads query results
app/api/knowledge_graph/resolver.ts - Result resolver → Graph presentation helpers: formats graph data
app/api/knowledge_graph/resolver.ts - Knowledge graph API → Interactive network: returns network schema
app/api/knowledge_graph/route.ts - Enrichment analysis → Gene set form: renders
components/Enrichment/index.tsx - Enrichment analysis → Result summary: renders
components/Enrichment/index.tsx - Enrichment analysis → Enrichment actions: renders
components/Enrichment/index.tsx - Enrichment analysis → Term visualization: renders
components/Enrichment/index.tsx - Enrichment actions → Knowledge graph API: requests graph
components/Enrichment/InteractiveButtons.tsx - Distillery interface → Distillery endpoints: submits queries
- Schema API → Schema initialization: fetches schema
app/api/schema/route.ts - Schema initialization → Neo4j database: connects to
utils/initialize.ts - Graph initialization → Neo4j database: reads graph
app/api/initialize/helper.ts - Neo4j ingestion → Neo4j database: populates graph
- Query translator → Page routes: updates URL
components/QueryTranslator.tsx - Term and gene search → Interactive network: renders results
components/TermAndGeneSearch/form.tsx - Network download → User: downloads network