A project for creating BioCypher-driven knowledge graphs and outputs MeTTa files.
- Clone this repository.
git clone https://github.com/Habush/biocypher-metta.git
- Install the dependencies using Poetry. (Or feel
free to use your own dependency management system. We provide a
pyproject.toml
to define dependencies.)
poetry install
- You are ready to go!
poetry shell
python create_knowledge_graph.py
The project template is structured as follows:
.
│ # Project setup
│
├── LICENSE
├── README.md
├── pyproject.toml
│
│ # Docker setup
│
├── Dockerfile
├── docker
│ ├── biocypher_entrypoint_patch.sh
│ ├── create_table.sh
│ └── import.sh
├── docker-compose.yml
├── docker-variables.env
│
│ # Project pipeline
|── biocypher_metta
│ ├── adapters
│ ├── metta_writer.py
│
├── create_knowledge_graph.py
├── config
│ ├── biocypher_config.yaml
│ ├── biocypher_docker_config.yaml
│ └── schema_config.yaml
The main components of the BioCypher pipeline are the
create_knowledge_graph.py
, the configuration in the config
directory, and
the adapter module in the biocypher_metta
directory. The input adapters are used for preprocessing biomedical
databases and converting them into a BioCypher nodes and edges. The metta_writer.py
script contains code to convert
these BioCypher nodes and edges into MeTTa represntation.