Skip to content
brain-bbqsPublic

About

The Automated Standardization Helper (ASH) for BBQS.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

Data Ingest Task Force

Data ingest pipelines for the BRAIN-BBQS labs, staging raw lab data into standardized formats (BIDS / NWB) ahead of DANDI upload.

Each lab's codebase is self-contained under labs/<lab>/ — its own conversion code, tests, Python environment declaration, and Dockerfile — so labs can evolve independently without stepping on each other.

A scheduled self-hosted runner (in data-ingest-runner) periodically calls dispatch/dispatch.py, which refreshes a local copy of each lab's incoming dandiset, runs its conversion script on any new sessions, and uploads the standardized output. See dispatch/README.md for more details.

Layout

labs/
  chang/                Chang lab: partial dyadic video + behavioral events -> BEP047 BIDS
                         (see labs/chang/README.md)
  kemere/               Kemere lab: raw behavioral recordings -> BEP047 BIDS
                         (see labs/kemere/README.md)
  inman/                Inman lab: restructured .mat walk sessions -> NWB
                         (see labs/inman/README.md)
  shepherd/             Shepherd lab: multicamera mouse feeding behavior -> NWB
                         (see labs/shepherd/README.md)
  sanes/                Sanes lab: multi-animal gerbil vocal interactions -> NWB, one
                         codebase for the R34, SSA GT, and BIG_ARENA datasets, including
                         manifest-synchronized microphones and multiple cameras
                         (see labs/sanes/README.md)
  suthana/              Suthana lab, one directory per project
    in-lab/               in-lab navigation: iEEG + scalp EEG + motion capture -> NWB
                           (see labs/suthana/in-lab/README.md)
    seeber-2024/          Seeber et al. (2024/2025) derived group-subject data -> NWB
                           (see labs/suthana/seeber-2024/README.md)
  zhang/                Zhang lab, one directory per project
    ferret-hyperscanning/ ferret dyads: SpikeGadgets wireless ephys + multicamera video -> NWB
                           (see labs/zhang/ferret-hyperscanning/README.md)
  talmo/                Talmo lab: LUC3D multi-camera mouse videos -> BEP047 BIDS study,
                         with SLEAP 2D and triangulated 3D pose as native-format
                         derivatives, one codebase for MouseDyad-10M and SLAP-2M
                         (see labs/talmo/README.md)
dispatch/               Cron entrypoint driving all labs' conversions
                         (see dispatch/README.md), including its own
                         containers/dandi.Dockerfile -- the portable dandi
                         CLI runtime dispatch.py's download/upload steps
                         run inside, same pattern as a lab's own container
docs/                   Repository documentation (CI, see docs/README.md)
pyproject.toml          Repository-wide tooling (ruff)
.github/workflows/      CI: container build/test/publish + daily dev-env tests
skills/                 Agent skills for setting up a new conversion, one
                         versioned APM package each (portable SKILL.md
                         format, see AGENTS.md)
apm.yml, apm.lock.yaml  Pinned skill installation into .agents/skills/ and
                         .claude/skills/ (`apm install --frozen`, see
                         AGENTS.md)
.claude-plugin/         Claude Code plugin marketplace exposing the skills
AGENTS.md               Entry point for AI coding agents, whatever the tool

Adding a lab

Add a new labs/<lab>/ directory, self-contained the same way as labs/kemere/ (code, tests, envs/, and its own containers/<lab>.Dockerfile if it needs a container). Give the Dockerfile a lab-specific name, and register the image in .github/workflows/container_images.yml in both places its comment points at: the registry JSON (dockerfile, build context, image name, and the test suite that gates it) and the change-detection path filters.

A lab contributing more than one distinct data collection nests one self-contained directory per project instead, as labs/suthana/in-lab/ does. Everything above applies unchanged one level down, and the project's dispatch entry names both parts ("lab": "suthana", "project": "in-lab"), which keys it suthana/in-lab in dispatch/sessions.json and in dispatch.py --only. Labs with a single project stay flat. See dispatch/README.md for the field reference.

See "Starting a new conversion" below to have an AI agent do all of this from a description of the lab's data.

Starting a new conversion

Agent skills for the whole workflow live in skills/. They cover intake, planning the conversion against the data standard you pick, scaffolding the lab codebase, and registration in dispatch and CI. The set is meant to improve with use: each skill closes by reporting where it fell short, and the fixes are folded back into the skills themselves (see "Changing the skills" in AGENTS.md). External NWB know-how comes from the nwb-convert skill of catalystneuro/claude-skills, pinned to a commit in apm.yml.

After cloning, install the skills where agents look for them:

pip install apm-cli
apm install --frozen

This restores .agents/skills/ and .claude/skills/ from apm.lock.yaml with the four skills, nwb-convert, and the suggest-skill-fixes closing procedure from con/skills. Both directories are generated and ignored by git, so no agent discovers the skills until this has run (see AGENTS.md).

To use the skills from another checkout, add this repository as a Claude Code plugin marketplace:

/plugin marketplace add brain-bbqs/data-ingest-task-force
/plugin install lab-conversion@data-ingest-task-force

To start one, open a session on the most capable model your agent offers, at its highest reasoning effort. The skills check both before doing any work, and ask whether to stop when either falls short. Then give your agent the default prompt below, filled in:

Please set up a new conversion for the <lab> lab, working through the
new-conversion skills in skills/ in order: lab-intake, then
lab-conversion-plan, then stop for my review of the plan before running
lab-scaffold and lab-register. Finish by encoding anything this conversion
taught back into the skills.

- Lab / PI: <PI name, institution>
- Grant award number: <e.g. R34DA059514>
- Project name: <only if this lab will contribute more than one data collection>
- Incoming dandiset: <six-digit id or https://dandi.emberarchive.org/dandiset/... URL>
- Standardized output dandiset: <six-digit id or URL>
- Data standard: <NWB | BIDS (BEP047) | propose options for my decision>
- Associated papers: <DOIs or links, or "none">
- Source data tree: <verbatim `tree` output of one or more example sessions>
- Metadata: <subject, session, device, and electrode details, or attach files>
- Expected output example: <attach or describe, or "draft one for my review">
- Prior conversion code: <attach scripts + original author names for credit, or "none">

Fields you cannot fill yet are fine to leave as "unknown". The intake skill asks about anything that blocks planning and carries the rest forward as PROVISIONAL.

Hint: an easy way to get the filetree from an embargoed Dandiset is to navigate to its neurosift dataset view (e.g., https://neurosift.app/ember-dandiset/XYZ123) and expand a single session completely, then copy and paste all content from the page into a separate agent session with the instruction to render the "Can you convert this to a nice-looking filetree (markdown style)".

About

The Automated Standardization Helper (ASH) for BBQS.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages