Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

BlueBrain/morphology-synthesis-api

Repository files navigation

Warning

The Blue Brain Project concluded in December 2024, so development has ceased under the BlueBrain GitHub organization. Future development will take place at: https://github.com/openbraininstitute/morphology-synthesis-api

morphology-synthesis-api

Single cell topological synthesis service.

Build & Run

Build morphology-sythesis-api docker image:

docker build -t morphology-synthesis-api . \
--build-arg PROJECT_PATH=morphology-synthesis-api:local \
--build-arg COMMIT_SHA=$(git rev-parse HEAD)

And run:

docker run --rm --name morphology-synthesis-api -p8000:8000 \
-e DEBUG=true -e LOGGING_LEVEL=DEBUG \
--cap-add SYS_PTRACE \
morphology-synthesis-api

Usage

/synthesis-with-files

/synthesis-with-files route allows synthesizing a cell morphology passing file paths in the POST request:

curl -H 'Content-Type: application/json' \
      -X POST \
      -d '{"files": {"parameters_file": "/code/data/params_L5_TPC:B.json", "distributions_file":"/code/data/distr_L5_TPC:B.json"}, "overrides":{"apical_dendrite":{"total_extent":10.0,"randomness":0.001, "orientation":[[0.0, 0.0, 1.0]], "step_size":{"norm": {"mean": 1.0, "std": "0.1"}}, "radius":0.5}}}' \
      http://0.0.0.0:8000/synthesis-with-files

/synthesis-with-resources

/synthesis-with-files on the other hand allows to specify NEXUS resource ids instead of local files to extract the topological parameters and distributions from.

curl -H 'Content-Type: application/json' \
     -H 'nexus-token: ${NEXUS_TOKEN}'
     -X POST \
     -d '{"resources": {"parameters_id": "${PARAMETERS_ID}", "distributions_id":"${DISTRIBUTIONS_ID}"}, "overrides":{"apical_dendrite":{"total_extent":10.0,"randomness":0.001, "orientation":[0.0, 0.0, 1.0], "step_size":1.0, "radius":0.5}, "nexus_config": {"bucket": "${ORG}/${PROJ}", "endpoint": ${NEXUS_INSTANCE_ENDPOINT}}}}' \
     http://0.0.0.0:8000/synthesis-with-resources

Tests

pip install tox
tox

Acknowledgements

The development of this software was supported by funding to the Blue Brain Project, a research center of the École polytechnique fédérale de Lausanne (EPFL), from the Swiss government’s ETH Board of the Swiss Federal Institutes of Technology.

For license and authors, see LICENSE.txt and AUTHORS.txt respectively.

Copyright (c) 2024 Blue Brain Project/EPFL

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •