This repository handles the creation of all node types as well as edges between the nodes. Most data is dynamically pulled from the NeDRex API and subsequently inserted into the database. However, we also connect to the HPO database as well as the HMDB database for additional information.
Before you can run the script, you need to ensure the following:
- you need to download the data from the HMDB database and place it in the data folder before running the setup as this can not be done automatically
- make sure your .env file is set up correctly, follow the .env.example file
docker compose up --builddocker compose up -ddocker compose down -vFirst, create a conda environment using the provided environment.yml file:
conda env create -f environment.ymlThen, activate the environment:
conda activate DHN-databaseFinally, run the main script:
python setup_db.pyAlternatively, you can run the script in the background and log the output to a file:
nohup python -u setup_db.py > setup_db.log 2>&1 &If you calculated an extra set of edges between your nodes that you would like to add,
you can specify the path(s) to the edge files in the EXTRA_EDGES variable in the .env file.
To specify multiple files, they must be comma-separated.
Furthermore, make sure they have the following column headers:
label1 label2 pval effsize effsize_type test adj_pval
Each row should represent an edge between two nodes, where label1 and label2 are the cohort ids of the nodes.
Columns need to be separated by tabs.