Motif Studio is a browser-based tool for querying connectomes with the DotMotif motif query language.
This repository holds dependencies and dev-dependencies in requirements/. To install dependencies, run:
pip install -r requirements/requirements.inTo install dev-dependencies, run:
pip install -r requirements/dev-requirements.inThe server is configured using a config.json file in src/server. An example configuration file is provided in src/server/config.example.json.
You can optionally configure resource limits for queries to prevent long-running or memory-intensive queries from impacting server stability. Add a query_limits section with the following fields:
"query_limits": {
"max_ram_pct": 0.5,
"max_ram_bytes": 1073741824,
"max_duration_seconds": 120
}max_ram_pct is a fraction of total system memory (default: 0.5), max_ram_bytes is an absolute memory limit in bytes (optional; if set, overrides max_ram_pct), and max_duration_seconds is the maximum wall-clock time in seconds for a query (default: 120).
Note: On non-Linux/Darwin systems, install psutil to enable memory limit detection.
To run the server in "development" mode, run:
uvicorn src.server:app --reloadTo run the server in "production" mode, run:
uvicorn src.server:appTo run the tests in "development" watch mode, run:
ptwThis will run the test suite and then wait for changes to the codebase. When changes are detected, the test suite will be run again.
To run the tests once, run:
pytestThis is a Next.js project bootstrapped with create-next-app.
First, run the development server:
npm run devOpen http://localhost:3000 with your browser to see the result.
If this work is useful to your research, please cite the following paper:
Scalable graph analysis tools for the connectomics community Matelsky et al., 2022
@article{matelsky2022scalable,
title={Scalable graph analysis tools for the connectomics community},
author={Matelsky, Jordan K and Johnson, Erik C and Wester, Brock and Gray-Roncal, William},
journal={bioRxiv},
pages={2022--06},
year={2022},
publisher={Cold Spring Harbor Laboratory}
}