Clinical Knowledge Graph (CKG)

repository·master·Indexed 20 days ago

https://github.com/mannlabs/ckg

A Python-based platform for integrating and mining proteomics and clinical data from biomedical databases to support precision medicine research. CKG provides tools for batch correction using pyComBat, PCA visualization, FASTA sequence mapping via BLAST, and workflows for drug target prioritization and protein-centric prioritization using Clustergrammer2.

Tokens
52.9K
Snippets
142
Records
221
Agent score
70%

What's inside CKG

  1. Overview of Clinical Knowledge Graph (CKG)

    master

    The Clinical Knowledge Graph (CKG) is an open-source Python platform designed for analyzing proteomics and clinical data. It integrates and mines knowledge from multiple biomedical databases to support precision medicine workflows.

    Key capabilities include:

    • Representing experimental data, public databases, and literature (comprising over 16 million nodes and 220 million relationships).
    • Incorporating statistical and machine learning algorithms to accelerate proteomics analysis and interpretation.
    • Integration with the BioCypher framework.

    Note: This resource is intended for research purposes and must not substitute professional medical judgment.

  2. Use the CKG Builder modules

    master

    The ckg.graphdb_builder.builder package provides a suite of modules for constructing a Knowledge Graph database. The core components include:

    • create_user: Likely handles user or entity creation within the graph context.
    • importer: Responsible for bringing external data into the builder pipeline.
    • loader: Handles the loading of processed data into the graph database.
    • builder: The primary orchestrator for the graph construction process.
  3. Identify available data analysis methods and visualizations

    master

    The analytics_core of the Clinical Knowledge Graph (CKG) provides a variety of implemented analysis methods and visualization plots. These tools are used to perform data analysis and generate visual representations of the knowledge graph data.

    Note: The specific list of available methods and visualizations is contained in the 'Table CKG Analytics Core' within the documentation (the table itself was not provided in this segment).

  4. Explore CKG Reports notebooks

    master

    The ckg/notebooks/reports directory contains notebooks that serve as comprehensive case studies and re-analyses of published biomedical studies. These notebooks demonstrate how to use the CKG Analytics Core to reproduce or extend existing research.

    Examples of use cases include:

    • Re-analyzing published studies: Reproducing analytical pipelines for studies like the Plasma proteome profiling (liver disease) or CPTAC Glioblastoma Discovery.
    • Decision Support: Using the database as a tool to propose drug candidates by filtering differentially expressed proteins and querying known inhibitory drugs and side effects.
    • Multi-omics Integration: Using Similarity Network Fusion (SNF) to integrate proteomics, RNA sequencing, and PTM data.
    • External Data Integration: Analyzing datasets from PRIDE or using technology-specific data like Olink.
  5. Locate predefined Cypher queries in CKG

    master

    CKG uses predefined Cypher queries to extract knowledge from the graph. These queries are organized into two main categories:

    1. Graph Database Builder queries: Used to define how data is loaded into the graph. These are located in graphdb_builder/builder/cypher.yml.
    2. Report manager queries: Used for data extraction and analysis.
      • Dataset queries: Extract data for each integrated data type for use with the analytics core (found in ckg/report_manager/queries/datasets_cypher.yml).
      • Knowledge queries: Extract knowledge based on specific entities, such as annotations for proteins or drugs (found in ckg/report_manager/queries/knowledge_annotation.yml).
  6. Explore CKG Recipes notebooks

    master

    The ckg/notebooks/recipes directory contains notebooks demonstrating specific workflows and analytical tasks. Key capabilities include:

    • Access Project Reports: Load all data from a specific project (e.g., P0000001) to visualize plots, tables, and dataframes used in report generation.
    • R Integration: Use R within Jupyter to load projects, read reports, and perform network/plot analysis.
    • Interactive Visualizations: Use ipywidgets.interact to create UI controls for exploring data, such as parallel plots for protein clusters.
    • Data Management: Download data from PRIDE, convert SDRF or MzTab formats to CKG formats, and upload SDRF files programmatically.
    • Advanced Analytics: Perform Power Analysis, single sample Gene Set Enrichment Analysis (ssGSEA) with PCA, and batch effect correction.
    • Knowledge Extraction: Annotate lists of proteins or drugs using CKG knowledge via centrality or pagerank methods.
  7. Use Biomedical Database Parsers in ckg.graphdb_builder

    master

    The ckg.graphdb_builder.databases.parsers module provides a collection of specialized parser classes designed to ingest data from various biomedical databases into the CKG graph database format. Each parser is dedicated to a specific source, allowing for structured extraction of biological, chemical, and clinical relationships.

    Available parsers include:

    • Genomics & Mutations: cancerGenomeInterpreterParser, gwasCatalogParser, hgncParser, mutationDsParser, refseqParser.
    • Proteins & Pathways: goaParser, pfamParser, pspParser, reactomeParser, uniprotParser.
    • Drugs & Chemicals: drugBankParser, hmdbParser, siderParser, foodbParser, exposomeParser.
    • Interactions & Networks: corumParser, disgenetParser, drugGeneInteractionDBParser, intactParser, jensenlabParser, signorParser, stringParser.
    • Clinical & Disease: oncokbParser, pathwayCommonsParser, textminingParser.
    • Other: hpaParser, smpdbParser.

    To use these, you should import the specific parser module corresponding to the database you wish to process.

  8. How the CKG Graph Database Builder works

    master

    The graphdb_builder module generates the Knowledge Graph through a two-step process:

    1. Import: Uses specific parsers and configuration files to convert ontologies, databases, and experimental data (projects) into tab-separated values (TSV) files containing entities (nodes) and relationships. These files are stored in the data/imports directory.
    2. Loading: Loads the generated TSV files into the graph database.

    Key Requirements & Concepts:

    • Data Model: The types of nodes loaded must correspond to the defined data model.
    • Configuration: The list of entities to be loaded is defined in the builder_config.yml file under the graph key.
    • Cypher Queries: CKG uses predefined Cypher queries (defined in cypher.yml) to perform the loading. These are stored in YAML format to include metadata like query names and descriptions.
    • Database Status: The graph database must be running during the Loading step.
  9. Understand the structure of a Proteomics analysis block

    master

    Every analysis defined within the Proteomics configuration file follows a consistent schema. This allows you to define which datasets to use, which statistical tests to run, and how to visualize them.

    Each analysis block contains:

    • description: A definition of the analysis being performed.
    • data: The dataset dataframe to run the analysis on (e.g., "clinical variables", "original", or "processed").
    • analyses: The statistical analysis to run (functions are sourced from analytics_factory.py).
    • plots: The visualization to use for the results (functions are sourced from analytics_factory.py).
    • store_analysis: (boolean) If True, the resulting dataframe from the analysis is stored.
    • args: A dictionary of arguments passed directly to the analyses and plots functions.

    To find the specific arguments available for a particular analysis or plot, consult the analytics.py and viz.py modules.

  10. Compliance with Clinical Knowledge Graph (CKG) data licenses

    master
    The Clinical Knowledge Graph (CKG) incorporates data from numerous external sources. Users must comply with the individual licenses and data use restrictions of each source. CKG usage does not supersede the original terms of service or licensing agreements of the underlying databases and ontologies. Always visit the source URL provided in the reference table for specific compliance requirements.
  11. Handle non-standard data formats via configuration

    master
    CKG allows a single parser to handle multiple software output formats by using the data type configuration file. The configuration defines how information from different processing tools (e.g., MaxQuant, DIA-NN, FragPipe) should be translated into the standard nodes and relationships of that data type. This allows for high flexibility when dealing with diverse Omics software outputs.