https://github.com/aplbrain/motifstudio
https://github.com/aplbrain/motifstudio
bossdb grand-graphs grandiso motifs subgraph-isomorphism
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aplbrain/motifstudio
- Owner: aplbrain
- License: apache-2.0
- Created: 2023-05-09T13:27:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-06-26T18:06:57.000Z (12 months ago)
- Last Synced: 2025-07-02T03:05:22.264Z (12 months ago)
- Topics: bossdb, grand-graphs, grandiso, motifs, subgraph-isomorphism
- Language: TypeScript
- Homepage: https://motifstudio.bossdb.org
- Size: 329 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Motif Studio is a browser-based tool for querying connectomes with the DotMotif motif query language.

---
## Installation and Setup
This repository holds dependencies and dev-dependencies in `requirements/`. To install dependencies, run:
```bash
pip install -r requirements/requirements.in
```
To install dev-dependencies, run:
```bash
pip install -r requirements/dev-requirements.in
```
## Configuring the Server
The 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:
```json
"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.
## Running the Server
To run the server in "development" mode, run:
```bash
uvicorn src.server:app --reload
```
To run the server in "production" mode, run:
```bash
uvicorn src.server:app
```
## Running the Tests
To run the tests in "development" watch mode, run:
```bash
ptw
```
This 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:
```bash
pytest
```
## Running the web application
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
## Getting Started
First, run the development server:
```bash
npm run dev
```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
---
## Citation
If this work is useful to your research, please cite the following paper:
[Scalable graph analysis tools for the connectomics community](https://www.biorxiv.org/content/10.1101/2022.06.01.494307v1.abstract)
Matelsky et al., 2022
```bibtex
@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}
}
```