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.