docker build -t dist .
./scripts/run.sh
The script create a ./data
directory to persist Neo4j's data to the host machine. The Docker image will load a sample database if the directory ./data/databases/graph.db
does not exist (for example, at first run).
If you want to restore the sample data, simply delete ./data
and run ./scripts/run.sh
again.
./scripts/regenerate_db.sh
./scripts/backup_db.sh # will dump to ./data/init.db.bak on host machine
make logs
- Visit http://localhost:7474
- Set
Connect URL
tobolt://localhost:7687
- Set
Authentication type
toNo authentication
- Click the top left icon (Databases), it should show the currently existing node and relationship types. Click on one of them to view the graph.
- Drag the nodes far away from each other for clarity. You can also set colors for them.
- Nearest neighbors
curl --request GET 'localhost:8080/api/v1/samples/s1/nearest-neighbours'
# The result should be a JSON array of {experiement_id: str, distance: int}
- Nearest leaf in the phylogenetic tree
curl --request GET 'localhost:8080/api/v1/samples/s1/nearest-leaf-node'
# The result should look like
# {
# "distance": 7,
# "leaf_id": "l857"
# }
docker stop dist
make test_db
make test