This repository uses BioCypher framework for harmonization of databases with existing immunoreceptor-epitope matching information.
BioCypher is designed to facilitate the standardized integration of heterogeneous data sources through a regulated framework. The BioCypher framework implements a modular architecture where each data source is processed through dedicated transformation scripts called adapters. These adapters serve as the primary interface between raw data sources and the BioCypher knowledge graph infrastructure. This project provides adapters for the following databases:
These include data from both, original sources, extracting data directly from studies, such es McPAS-TCR, and from already pulled sources such as TRAIT. A script is provided to build a knowledge graph with all these adapters. On a consumer laptop, building the full graph typically takes 20-30 mins.
The final output is the IggyTop database, which integrates immunoreceptor-epitope matching information from all supported data sources in the unified list of AIRR cells.
- tra sequence
- trb sequence
- igh sequence
- igl sequence
- epitope
- alpha sequence to beta sequence association
- heavy sequence to light sequence association
- t cell receptor sequence to epitope association
- b cell receptor sequence to epitope association
- Poetry for dependency management
-
Clone the repository:
git clone https://github.com/biocypher/iggytop.git cd iggytop -
Install dependencies using Poetry:
poetry install
-
Print the activate command of the virtual environment to the console and run it:
poetry env activate
-
You are ready to go!
python create_knowledge_graph.py
-
create_knowledge_graph.py: the main script that orchestrates the pipeline. It brings together the BioCypher package with the data sources. To build a knowledge graph, you need at least one adapter (see below). For common resources, there may already be an adapter available in the BioCypher package or in a separate repository. You can also write your own adapter, should none be available for your data. -
tcr-epiotope.adapterscontains modules that define the adapter to the data source. -
schema_config.yaml: a configuration file (found in theconfigdirectory) that defines the schema of the knowledge graph. It is used by BioCypher to map the data source to the knowledge representation on the basis of ontology (see this part of the BioCypher tutorial). -
biocypher_config.yaml: a configuration file (found in theconfigdirectory) that defines some BioCypher parameters, such as the mode, the separators used, and other options. More on its use can be found in the Documentation.
This repo also contains a docker compose workflow to create the example
database using BioCypher and load it into a dockerised Neo4j instance
automatically. To run it, simply execute docker compose up -d in the root
directory of the project. This will start up a single (detached) docker
container with a Neo4j instance that contains the knowledge graph built by
BioCypher as the DB docker, which you can connect to and browse at
localhost:7474 (don't forget to switch the DB to docker instead of the
standard neo4j). Authentication is set to neo4j/neo4jpassword by default
and can be modified in the docker_variables.env file.
By using the BIOCYPHER_CONFIG environment variable in the Dockerfile, the
biocypher_docker_config.yaml file is used instead of the
biocypher_config.yaml. Everything else is the same as in the local setup. The
first container installs and runs the BioCypher pipeline, and the second
container installs and runs Neo4j. The files created by BioCypher in the first
container are copied and automatically imported into the DB in the second
container.
Contributions are welcome! Please feel free to submit a Pull Request or create an Issue if you discover any problems.
This project is licensed under the MIT License - see the LICENSE file for details.